I recommend living near the open ocean. You can fish for food, and evaporate sea water to make fresh water. The sandy soil is also easier to dig into to bury your toilet waste (remember, sewers may not work in a blackout).
You’re seriously underestimating how conditions change during real large-scale blackouts or wartime collapse. You won’t be able to safely leave your home at all without a real risk of being robbed, assaulted, or kidnapped.
Coastlines near oceans or seas would likely be heavily mined, making even approaching or swimming near the shore extremely dangerous. Beaches are typically mined to prevent amphibious landings, while naval and anti-ship mines would be present in coastal waters, turning the entire near-shore zone into a high-risk area.
The same applies to forests: they are likely to be contaminated with anti-personnel mines, making activities like foraging or hunting effectively suicidal. Even routine actions, such as walking to a nearby store, become unsafe when cities are under artillery or rocket fire.
Attempting to flee an urban area under such conditions is also extremely dangerous — roads become high-risk zones where civilians may be robbed, killed, stripped of vehicles and belongings, or simply fired upon.
Assuming you can casually go outside, fish, dig, and move around freely is extremely unrealistic once law enforcement and basic order break down.
At first glance, living in a sparsely populated settlement may seem safer under such conditions, but this assumption is questionable. Smaller towns (up to roughly 100000 residents) are often reduced to rubble during active hostilities, leaving little or nothing intact. In large cities, the likelihood of total physical destruction may be lower, setting aside the risk of nuclear strikes. However, prolonged power outages and supply disruptions make survival in a major city extremely difficult, while attempting to evacuate during ongoing combat carries a very high risk of injury or death.
I was in a large city during an active military assault, and it is not something anyone would willingly want to experience. Even so, it is difficult for me to say which is safer during a war — a large city or a small one. Nearby smaller cities were completely destroyed, reduced to ruins, while conditions in the large city were also extremely harsh and dangerous. Based on this experience, my only practical recommendation is that, if possible, leaving the country before a war begins is the safest option. Once hostilities start, doing so becomes extremely difficult, especially for men.
In any case, it is advisable to choose housing located far away from any kind of schools, kindergartens, hospitals, major industrial facilities, and political or government buildings, as such sites are more likely to become targets or be affected during hostilities. Ideally, such facilities should be located no closer than approximately 2–3 kilometers from the chosen residence. This is because a bomb detonation at a shorter distance is likely to generate sufficient blast overpressure to shatter windows and even tear window and door frames out entirely. This is particularly critical during winter, as the loss of windows in freezing conditions can quickly make the space uninhabitable due to severe heat loss. It is also important to choose single-story housing located at a safe distance from dense multi-story residential developments.