Here is how to create your own settlement anywhere, working just like the vanilla ones. I got this from the article
here. But I found that half the steps listed in the article were unnecessary and sometimes only caused issues.
If it does not already have one, start by placing a Map Marker in your settlement and giving it a unique name. Then place a COCMarkerHeading next to it. Finally place an XMarkerHeading the center of the settlement, and name it something like (Settlement Name)LocationCenterMarker.
If your new settlement does not already have one, create a Location for it (under WorldData -> Location). Add an Encounter Zone. Then click the Select Reference button under World Location Marker Ref. Select your Map Marker. Then in the Keywords field add:
LocTypeClearable
LocTypeSettlement
LocTypeWorkshopSettlement
LocTypeWorkshop
If it is an interior cell add LocTypeInteriorCell” as well.
Create your Workshop and place it somewhere in your settlement. You can find them under WorldObjects -> Container -> WorkshopWorkbench. A handy tip, you can make it unobtrusive by setting the Scale to make it very small, allowing you to put somewhere out of the way if you like.
Double click on the workbench and click on the Scripts tab edit "workshopscript" Under flags, set "OwnedByPlayer" to true and EnableAutomaticPlayerOwnership” to false. Next just to be safe, set the following to false:
MinRecruitmentAllowRandomAfterPlayerOwned
AllowAttacksBeforeOwned
AllowAttacks
Click Ok to close the script menu, then click ok to accept the changes to the Workshop.
Place an XMarkerHeading in front of your workshop. You do not need to name it. Go into the Workshop's properties to the Linked Ref tab. Add the XMarkerHeading, and give it the keyword WorkshopLinkSpawn.
Go to WorldObjects -> Activators, and select a DefaultEmptyTrigger. Drag and drop one around your Workshop. Rename it something like SettlementNameWorkshopSandboxArea (that is how the vanilla ones are named). Make it large enough to cover your entire settlement area. Go to its Linked Ref tab, double click and "Select in Render Window." Select your workshop and for the Keyword, choose "WorkshopLinkedPrimitive". Then click ok and close the Trigger window.
Double click on your Workshop, select the Linked Ref tab, click "Select in Render Window", and select the "Default Empty trigger" you’ve just been working with. Set its Keyword to "WorkshopLinkSandbox".
Go to Static -> Workshop. Pick a Workshop Border and put it around your settlement. Give it a unique name. Open its properties and go to the Linked Ref tab. Link it to your workshop, with the keyword of WorkshopLinkedBuildAreaEdge