Sanctuary

Sanctuary is a side quest and an achievement/trophy in Fallout 4.

Detailed walkthrough
Upon returning to Sanctuary Hills during When Freedom Calls, Preston Garvey will ask you to talk to Sturges about improving the settlement. If you have already scrapped the area of Sanctuary Hills, you should have enough material to complete the first step: building five beds. Just enter one of the houses, clear rooms of debris and build beds using the workshop-interface.

Upon completion talk again to Sturges. He will ask you to build a water supply. You may build a water purifier along with a suitable power generator or two water pumps. After building one of these options, you may talk again to Sturges who asks you to ensure food supply. Behind the house where the workbench is located you may find two melon-plants. Harvesting these will give you a start, as you can use them to plant another two plants. Assigning settlers to harvest these plants will progress this objective even further. You may also buy carrots or other plants from a nearby vendor, or head to Tenpines Bluff where you can find many tato plants ready to be harvested.

You will either see the Workbench interface or quest tracker if your objective is near completion. Finally, upon talking with Sturges, he asks you to build up some defenses. If you have some circuitry e.g. by telephones or military-grade circuit boards, you may build machinegun turrets which easily fulfills this task. You may also build watch posts. Please take note that watch posts have to be manned in order to count as defenses (assign a settler to a watch post in order to "activate" the post).

After you have gathered enough defense and talked to Sturges, this mission is complete.

Bugs
The quest may stop at a certain point making it impossible to complete.

Sanctuary Сэнкчуари (квест)