You’ve finally found the perfect property to live off the grid. Your goal is self-sustainability to the maximum extent possible. While energy and water sources are mandatory criteria for self-sustainability, a reliable source of food also is of paramount importance. So preparing for your new garden on your homestead should be one of the first goals.
1. Where should I place it?
Gardens need sunlight, good soil, and water to thrive. Choose a location where the garden will get at least eight hours of sun a day. If there are trees nearby, they can be detrimental or beneficial. Make sure any nearby tree shadows don’t cause too much shade. However, if you live in a windy part of the country, and the wind predominantly comes from one direction, a stand of trees blocking from your garden is beneficial. For example, if you live in Idaho or Montana, where wind usually blows in from the north, a great location for your garden would be south of a stand of trees.
Good soil is important, too. If you’re fortunate enough to live in an area with soil  naturally rich in organic matter, and relatively free of clay, it will need little amendment.
Most garden locations in the United States will require at least some supplemental water in addition to rainfall. In parts of the southeast, northwest, southern Alaska, and eastern edges of the Hawaii islands, precipitation may be all the water you’ll need. I live in the Central Valley of California where it rains in the winter and almost never in the summer. So in the summer I have to water my garden regularly. Regardless of the amount of supplemental watering, make sure adequate water is readily available.
While some water is good for your garden, ponded water is not. So if you have clayey soil that water can’t penetrate through, make sure water can drain from your garden. However, if the garden is on too much of a slope, then erosion of the soil can occur. Soil with poor drainage does not mean you can’t grow a garden in that location, but the soil will have to be amended.
2. In-ground or raised bed?
After selecting the right location, the next decision is whether the garden will be in-ground or in raised beds . Both have advantages and disadvantages.
In-ground gardens are a lot easier, especially if there is good soil. But if you have deep clayey soil that will inhibit drainage, amending the soil may not be worth the effort.
Raised bed gardens can be expensive and labor intensive to build. Some sort of structure has to be constructed to contain the garden soil. Lumber (2’ by 6’ or similar), concrete (poured or in blocks), tree trunks, used railroad ties, or even mounded soil walls have all been used.
Some people caution against railroad ties because they contain creosote. But if they are used ties, exposure to sunlight and moisture over the years has caused most of the dangerous chemical in the creosote to leach away. New ties, or those sticky or oozing with creosote, should not be used. However, used railroad ties are such a cheap and effective method for constructing large raised beds that I consider them a viable option.
Raised bed gardens also have two other potential disadvantages. First, if you’re a garden tiller, then you really can’t do that with a standard-sized bed. Second, if have raised beds, you have to fill them with soil rich in organic compost . Some people buy these ridiculously expensive bags of compost or amended soil. But if you live off the grid you can do better. One option is to simply get some soil from somewhere else on your property and amend it with compost from your homestead. Or you can use the Hugelkultur  method.
In-ground and raised bed gardens have advantages and disadvantages. I solved this by using both in my garden. I have a problem with gophers and moles where I live. So I grow a lot of smaller vegetables  like carrots, lettuce, the Brassica family, pepper, and beans in raised beds. The bottom of each raised bed is protected by tough metal screen to prevent gophers from ruining my crops. For vegetables that use more space like corn, tomatoes,  and squash, I grow them in-ground and combat gophers in other (less effective) ways.
3. Does the garden need a fence?
While security on homesteads often refers to protection from other humans, here I’m talking about our four-legged friends like deer, raccoons and rabbits. Depending on the danger posed by these animals, you may need up to a 7-foot fence securely anchored to the ground. That way, deer can’t jump it, raccoons can’t climb it, and rabbits can’t burrow underneath it.
Gardens are hard work but their reward is healthy, inexpensive food you can produce on your homestead. By selecting the right location with enough sunlight, good soil, and sufficient water, you’ve taken a big step forward in enjoying a rewarding garden.