keepcalculator

06 Numbers and Powers

How to Host a Sons of the Forest Server

Card No. 06·62163 · Updated · Standard formula, shown below

This guide walks you through setting up your own Sons of the Forest dedicated server, either on your own PC or a rented machine. You’ll learn the exact steps to get a stable multiplayer world running for you and your friends, including port forwarding, configuration, and common fixes.

What You’ll Need

  • A copy of Sons of the Forest on Steam (the host needs it; friends just need the game).
  • SteamCMD – a free command-line tool from Valve for downloading server files.
  • A PC that can run the server 24/7 (or at least while you play). Minimum specs: 4-core CPU, 8 GB RAM, 10 GB free storage. More players or mods mean more RAM.
  • Optional: a static IP or a dynamic DNS service if you want friends to join reliably.
  • Router access to forward ports (if hosting from home).

Step-by-Step

  1. Install SteamCMD
    Download SteamCMD from Valve’s official site. Extract it to a folder like C:\steamcmd. On Linux, use apt install steamcmd or download the tarball.
  2. Download the server files
    Open a terminal/command prompt in the SteamCMD folder. Run:
    steamcmd +login anonymous +force_install_dir C:\sotf-server +app_update 2465200 validate +quit
    Replace the path with where you want the server. Wait for the download to finish (it’s about 2 GB).
  3. Find the server executable
    Navigate to your install folder. On Windows, you’ll see SonsOfTheForestDS.exe. On Linux, it’s SonsOfTheForestDS (a shell script).
  4. Run the server once to generate config files
    Double-click the exe (or run the script). It will open a console window, create default settings, and then close after a few seconds. This generates the ServerConfig.cfg file.
  5. Edit the server config
    Open the generated ServerConfig.cfg (in the same folder) with a text editor. Key settings:
    • ServerName – what shows in the server browser.
    • ServerPassword – leave blank for open, or set one.
    • ServerPasswordAdmin – for admin commands.
    • ServerMaxPlayers – default 8, max 8.
    • ServerGamePort – default 8766.
    • ServerQueryPort – default 27016.
    • ServerSteamPort – default 8767 (only if you change the game port).
    • ServerVisibility – 0 = LAN, 1 = public, 2 = friends only.

    Save the file.

  6. Forward ports on your router
    Log into your router (usually 192.168.1.1). Find Port Forwarding. Forward these UDP ports to your PC’s local IP:
    • 8766 (game)
    • 27016 (query)
    • 8767 (steam) – only if you changed the game port

    Make sure your PC has a static IP (set it in network settings, or use DHCP reservation).

  7. Start the server
    Run the executable again. It will load the world and print “Server started” in the console. Keep the window open.
  8. Join the server
    In Sons of the Forest, go to Multiplayer → Server List. Your server should appear if it’s public. If not, use Join by IP and enter your public IP (find it by searching “what’s my IP”) and port 8766.
  9. Test with a friend
    Have a friend try to join. If they can’t, check the firewall (see Troubleshooting).

Common Mistakes

  • Forgetting to forward UDP ports – TCP is not used; only UDP. Many routers default to TCP.
  • Using the wrong local IP – Your PC’s IP changes after restart. Set a static IP.
  • Editing the config while the server is running – Changes are overwritten on exit. Stop the server first.
  • Not running the server as admin – On Windows, right-click and “Run as administrator” to avoid permission issues.
  • Expecting a GUI – The dedicated server is a console window, not a graphical interface.
  • Using the same port for multiple servers – Each server needs unique ports.

Tips

  • Set a daily restart – Long-running servers can lag. Schedule a restart using Task Scheduler (Windows) or cron (Linux).
  • Back up your save – The world saves in %USERPROFILE%\AppData\LocalLow\Endnight\SonsOfTheForest\Saves (or ~/.config/unity3d/Endnight/SonsOfTheForest on Linux). Copy that folder regularly.
  • Use a dedicated machine – Hosting on your gaming PC is fine for a few friends, but a separate old PC or a VPS gives better stability.
  • Keep the server updated – After game updates, rerun the SteamCMD command to update the server files.
  • Set a strong admin password – The admin password allows console commands like kick and ban.

Troubleshooting

  • Server doesn’t appear in the list – Check ServerVisibility is 1 (public). Wait 2–3 minutes for Steam to register it. Also verify the query port is forwarded.
  • Friends can’t connect – Check your firewall: allow the executable (or ports 8766, 27016) through Windows Defender Firewall. Also confirm your public IP hasn’t changed.
  • Server crashes on start – Delete the ServerConfig.cfg and let it regenerate. If it still crashes, verify the game files via SteamCMD (add validate).
  • High ping / lag – Make sure no one is downloading on the host’s network. Consider lowering ServerMaxPlayers to 4.
  • Console says “Port already in use” – Another process is using the port. Change the game port in the config and forward the new one.
  • Server runs but world doesn’t save – Check the save folder is writable. On Linux, set permissions with chmod -R 755 on the save directory.

Frequently Asked Questions

Do I need to own the game to host a server?

Yes, you need a copy of Sons of the Forest on Steam, but you don’t need to be in-game to host. The dedicated server runs separately.

Can I host a server on Linux?

Yes, the server is cross-platform. Use the Linux version of SteamCMD and run the SonsOfTheForestDS script. The config file format is the same.

How many players can join?

The official max is 8 players per server, including the host. There is no official way to exceed that.

Can I use mods on my server?

Yes, but you’ll need to install them manually on the server as well as on each client. The server files are separate from the game files, so mods must be placed in both locations.

Why does my server show as “LAN” instead of public?

Check ServerVisibility in the config. Set it to 1 for public. Also, if your router uses strict NAT, Steam may not list it publicly; use the “Join by IP” method instead.

How do I update my server after a game patch?

Rerun the SteamCMD command from step 2. It will download the latest files. Stop the server first, then update, then restart.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →