A dedicated server for The Forest is a separate program that keeps your peninsula running on its own, so friends can drop in, build and survive the nights even when the person who started the world is offline. Endnight’s free The Forest Dedicated Server tool runs on Windows, takes about 4–6 GB of RAM, reads its settings from Server.cfg, and needs ports 8766, 27015 and 27016 open. This guide covers the download, every config line that matters, the Steam token that stops saves from vanishing, and the errors people hit most.
Quick note before you start: this is the 2014 original. For the sequel, Sons of the Forest (the game people search for as “The Forest 2”), follow our Sons of the Forest dedicated server guide instead. And if you landed here looking for 99 Nights in the Forest, that’s a separate Roblox game with its own Discord server, codes and private server links. Nothing below applies to it.
What is The Forest dedicated server?
The Forest dedicated server is a stand-alone version of the game with no player attached. It loads a save slot, waits for connections and keeps the world in memory until you stop it. The alternative is regular multiplayer, where one player hosts from their own game and the session ends when they quit. Dedicated servers arrived in update v0.59 and gained Steam server-browser joins in v0.68.
| Hosted from the game | Dedicated server | |
|---|---|---|
| Who keeps it running | The host’s game. It closes when they leave | The server program, on any PC or rented machine |
| Can friends join mid game? | Only while the host plays | Yes, any time it’s running |
| Default player limit | 8 | 8 (serverPlayers) |
| Rules and difficulty | Picked when the host starts | Set in Server.cfg or launch parameters |
| Shows in the in-game list | Friends join through Steam | Under the Dedicated (Internet) or (LAN) list |
So, to the question people ask most: yes, you can join mid game. On a dedicated server, anyone with the password can connect whenever the server is up, without waiting for the host.
The Forest dedicated server requirements
The Forest server requirements are modest. Plan on 4–6 GB of free RAM for the server alone, a CPU with decent single-core speed, an SSD with 10–20 GB free, and Windows. The game itself lists 4 GB of RAM as its minimum, so if you want to play on the same PC that runs the server, you need room for both.
- RAM: 4–6 GB for the server. The popular Docker image suggests 4 GB+ as a minimum for 2–4 players and 8 GB+ as comfortable.
- CPU: 2–4 cores with good clock speed. Enemies are a big share of the server’s work, which is why Endnight spent a patch cutting their CPU cost.
- OS: The tool is a Windows program. There’s no native Linux build (see the Linux section below).
- Internet: a stable upload and a router you can forward ports on. Some ISPs put you behind a shared IP where that’s impossible.
- A Steam account token for the server, so saves stick. It’s free, and covered below.
Don’t want a PC running all week? The Forest server hosting skips the hardware question entirely.
How to set up a dedicated server for The Forest
The setup takes three steps: download the tool, start it once so it creates Server.cfg, then edit that file with your server name, password, save slot and Steam token. You can make the server through the Steam client or through SteamCMD, which works without signing in to Steam at all. Both give you the same files.
Step 1: Download The Forest dedicated server
Through Steam: open your Library, switch the filter to Tools, find The Forest Dedicated Server and install it. If the server won’t show up on the internet list when you launch it from Steam, Endnight suggests launching the .exe directly instead.
Through SteamCMD: the dedicated server’s Steam app ID is 556450 (the game itself is 242760). The same command updates it later:
steamcmd +force_install_dir C:\TheForestServer +login anonymous +app_update 556450 validate +quit
Step 2: Start it once
Run TheForestDedicatedServer.exe, let it reach the point where it prints Game autosave started, then close it. That first start creates the config file. Until it exists, there’s nothing to edit, which is the step most guides skip.
For a server that runs quietly in the background, add -batchmode to the shortcut. The community troubleshooting guide’s tried-and-tested shortcut is -batchmode -dedicated -nographics -nosteamclient, with “Run this program as an administrator” ticked.
Step 3: Configure Server.cfg
The file sits in C:\Users\<you>\AppData\LocalLow\SKS\TheForestDedicatedServer\ds\Server.cfg. Every line is a key, a space and a value; lines starting with // are comments. Stop the server before you edit it. A working minimum looks like this:
serverIP 192.168.1.47:27015
serverSteamPort 8766
serverGamePort 27015
serverQueryPort 27016
serverName My Peninsula
serverPlayers 8
serverPassword friends-only
serverPasswordAdmin something-long-and-private
serverSteamAccount YOUR_LOGIN_TOKEN
serverAutoSaveInterval 15
difficulty Normal
initType Continue
slot 1
showLogs on
serverIP is the PC’s local address (run ipconfig and use the IPv4 address), not your public IP. Endnight’s default file appends the game port to it, as above. Launch parameters override matching lines in the file, so if a setting refuses to change, check the shortcut first.
The Forest server settings explained
Everything you can set lives in the same file, and each key has a matching launch parameter (for example -serverplayers 8 or -treeregrowmode). These are the defaults Endnight ships and what each one does:
| Setting | Default | What it does |
|---|---|---|
serverName |
The Forest Game | Name shown in the server list |
serverPlayers |
8 | Maximum number of players |
serverPassword |
blank | Join password; blank means anyone can connect |
serverPasswordAdmin |
blank | Password that unlocks admin commands |
serverSteamAccount |
blank (anonymous) | Your Steam login token |
enableVAC |
off | Valve Anti-Cheat on the server |
serverAutoSaveInterval |
15 | Minutes between autosaves (15 is the minimum) |
difficulty |
Normal | Peaceful, Normal or Hard |
initType |
New | New starts a fresh world, Continue loads the slot |
slot |
1 | Save slot, 1 to 5 |
showLogs |
off | Opens the log window. Turn it on while setting up |
veganMode |
off | No enemies at all |
vegetarianMode |
off | No enemies during the day |
resetHolesMode |
off | Resets floor holes made with the hole cutter when a save loads |
treeRegrowMode |
off | Regrows 10% of cut trees when players sleep |
allowBuildingDestruction |
on | Whether players and enemies can destroy buildings |
allowEnemiesCreativeMode |
off | Enemies in creative games |
allowCheat |
off | Lets clients use the built-in debug console |
saveFolderPath |
blank | Custom folder for save slots |
targetFpsIdle / targetFpsActive |
5 / 60 | Server frame rate with nobody on / with players on |
The -realisticPlayerDamage parameter makes player-versus-player hits much harder, if your group wants PvP to matter. To keep a separate config for a second server, point the launcher at it with -configfilepath "d:/Your/Path/MyServer.cfg" (forward slashes; the folder must exist, the file is created for you).
Get a Steam login token (or your saves won’t stick)
A Steam login token gives your server a fixed identity on Steam. Without one, the server runs “anonymous”, and that’s the usual reason a dedicated server is not saving: players come back to an empty inventory and a fresh start in the plane. Character saves are linked to the server’s ID, so an anonymous server can’t find them again.
- Go to Steam Game Server Account Management and sign in.
- Under “Create a new game server account”, enter app ID
242760(the game, not the server tool) and any memo. - Copy the token into
serverSteamAccount(or-serversteamaccount <token>) and restart.
Treat the token like a password and don’t share it. Each server needs its own.
The Forest dedicated server ports and port forwarding
The Forest dedicated server uses three ports: 8766 for Steam communication, 27015 for game traffic and 27016 for queries, which is the port the server browser and Steam favorites use. Endnight says to open all three for both TCP and UDP, on your router and in Windows Firewall, forwarding them to the PC’s local IP.
| Port | Setting | Protocol | Used for |
|---|---|---|---|
| 8766 | serverSteamPort |
TCP + UDP | Steam communication |
| 27015 | serverGamePort |
TCP + UDP | Game traffic |
| 27016 | serverQueryPort |
TCP + UDP | Server list queries and favorites |
Running two servers on one internet connection? Give the second one its own set of three ports. If your router’s WAN address starts with 10, 172 or 192, your ISP has you on a shared address and inbound ports can’t be opened at all. The workarounds are a VPN that hands out a public IP, a Hamachi-style virtual LAN for a small private group, or a hosted server.
How to favorite a server in The Forest
Adding a server to favorites happens in Steam, not in the game. Open Steam, choose View > Servers, go to the Favorites tab, click Add a Server and type the IP with the query port, for example 203.0.113.10:27016. Using 27015 there is the classic mistake.
How to connect to your server
Start The Forest, choose Multiplayer, then Join, and pick the Dedicated source. Friends look in the Internet list; you, on the same network as the server, will usually only see it in the LAN list. That’s normal and doesn’t mean it’s hidden from the internet. Since v0.68 friends can also join through the Steam server browser, or through “Join game” in the Steam friends list when someone is already playing on it. Enter the password if you set one.
Admin and console commands
To become admin, set serverPasswordAdmin, then enter that password when you join. Admin commands go in the multiplayer chat: press Enter and type them with a slash.
| Command | What it does |
|---|---|
/help |
Lists the commands the server knows |
/save 1 |
Saves to slot 1–5. It overwrites that slot without asking |
/kick <name or Steam ID> |
Kicks a player (by name since v0.67) |
/ban <name or Steam ID> |
Bans a player |
/shutdown |
Stops the server. Run /save first |
/restart |
Restarts the server. The community wiki warns it can reset the save, so back up first |
/treeregrowmode on |
Turns tree regrowth on or off |
/allowbuildingdestruction off |
Makes buildings indestructible |
/allowenemiescreative on |
Enemies in creative mode |
The game’s own developer console (cheats) is a separate thing, controlled by allowCheat in the file (-allowcheats on the command line).
The Forest dedicated server save location and transferring a save
The server keeps five save slots and loads the one named by slot. Slots live in the server’s own save folder, or wherever saveFolderPath points. Your local co-op and single-player saves are on your PC under %userprofile%\AppData\LocalLow\SKS\TheForest, in a folder named after your Steam ID.
To transfer a save to the dedicated server:
- Stop the server and back up its save folder.
- Copy the whole slot folder from your multiplayer saves (all of its files, not single files) into the matching slot in the server’s save folder.
- Set
slotto that number andinitTypetoContinue. - Start the server and check the log for
Game autosave started.
Two rules prevent most lost worlds. Boot once on New to generate a world, then switch to Continue for good: left on New, the server makes a fresh world every start and your buildings are gone. And log off after a save, not before. The server saves the players who are online at that moment, and since v0.60 it also autosaves as soon as the last player leaves.
Running The Forest dedicated server on Linux or Docker
There’s no Linux build of The Forest dedicated server, but the Windows one runs fine under Wine on Ubuntu or Debian, and that’s how every Linux option works. Most people use the community Docker image jammsen/the-forest-dedicated-server, which bundles Wine and SteamCMD and downloads app 556450 for you:
services:
the-forest-dedicated-server:
image: jammsen/the-forest-dedicated-server:latest
restart: always
env_file:
- ./default.env
ports:
- 8766:8766/udp
- 27015:27015/udp
- 27016:27016/udp
volumes:
- ./game:/theforest
Put your login token in SERVER_STEAM_ACCOUNT_TOKEN and change the passwords in default.env before the first docker compose up -d: the image deliberately crash-loops on default passwords. Extra settings go in game/config/config.cfg. If you’d rather click than type, a game server manager such as Pterodactyl has a ready-made The Forest egg that runs the same Windows build headless under Wine.
Mods, PS4 and other questions
Mods: The Forest has no official mod support on dedicated servers, so plan on vanilla rules, tuned with the settings above.
PS4: the dedicated server is a Steam tool for the PC version. PS4 players can’t run it or join a PC server, so a PS4 group plays co-op hosted from one player’s console.
Old tutorials: Endnight’s own guide was last updated in January 2019 for game version v1.07, which is why setup videos and posts from 2018, 2021 and 2022 still show the same files and ports.
Common The Forest server problems and fixes
| Problem | Most likely cause | Fix |
|---|---|---|
| Server not showing up in the Internet list | Ports closed, or you’re on the same network (it shows in LAN only for you) | Ask a friend to search by name; check 27016 is open; launch the .exe directly instead of from Steam |
| Dedicated server only in LAN | Normal on the server’s own network, or blocked ports for everyone else | Test from outside; forward 8766, 27015 and 27016 |
| Not saving, inventories reset, start in the plane again | No Steam login token | Add a token made for app 242760 |
| Buildings gone after a restart | initType New |
Restore the slot from a backup, then set initType Continue |
| “Incorrect password” with the right password, or none | Missing token, or the tool’s app ID | Add the token; the community fix is setting steam_appid.txt next to the .exe to 242760 |
| “Server is running a different patch release” | Server and game on different versions | Update the server through Steam or the SteamCMD command |
| “Server setup incorrectly” or timeout, could not connect | Query port unreachable, or the PC has two network connections (often a VPN) | Open the ports, disconnect the extra adapter, restart the server |
| Could not connect to Steam master server / could not start Steam game server | The server can’t reach Steam: blocked outbound traffic, firewall, or no admin rights | Allow the .exe through the firewall, run it as administrator, check the log |
| Black screen when the server starts | If it still appears in the server list, it’s running and the window simply shows nothing | Set showLogs on to see what it’s doing |
| Old world doesn’t load after copying a save | Wrong slot number, or initType New |
Match slot to the folder you copied and set Continue |
Skip the setup: The Forest server hosting
Running it yourself means a Windows PC that stays on, three forwarded ports, a Steam token and a config file that only appears after the first start. With The Forest server hosting on GameTeam, the server is up in minutes, you pay per GB of RAM (from $0.49/GB a week, so a 4 GB server is $1.96 a week, or $1.99/GB billed monthly), and slots are unlimited, though The Forest itself is built around 8 players. The built-in AI copilot handles the fiddly parts: tell it “turn on tree regrowth, set autosave to 15 minutes and restart the server” and it edits the config and restarts, or ask “why did everyone lose their stuff last night?” and it reads the server log and tells you what happened. When your group leaves the island, switch the same server to the next game.
FAQ
Is The Forest dedicated server free?
Yes. The tool is a free download from Steam Tools or SteamCMD. What costs money is the PC that runs it around the clock, or a rented server.
How do I play The Forest in multiplayer?
Either one player hosts from the Multiplayer menu and friends join through Steam, or everyone joins a dedicated server from the Dedicated list. The first is quicker; the second keeps the world up when the host logs off.
How many players can join a dedicated server?
The default is 8, set with serverPlayers. That’s the session size the game is built for.
Do I need to own The Forest to run the server?
No. The SteamCMD download works with an anonymous login. Every player who joins needs the game, though, and the server needs a Steam login token from an account to save properly.
Can I run the server and play on the same PC?
Yes. Since v0.61 the server doesn’t hook into the Steam client, so it runs alongside the game. Give the PC enough RAM for both.
Why can’t my friends connect to my server?
Nine times out of ten it’s port forwarding: 8766, 27015 and 27016, TCP and UDP, to the server PC’s local IP, plus a firewall rule. If your ISP uses a shared address, ports can’t be opened at all and you need a VPN, a virtual LAN like Hamachi, or a host.
How do I host a dedicated Valheim server?
Different game, same idea: a free Steam tool, a launch line and two UDP ports. Our Valheim dedicated server guide walks through it.
