Running a The Forest Dedicated Server on Linux
How to install and run a The Forest dedicated server on Linux using SteamCMD, configure Server.cfg at the correct Unity path, open firewall ports with UFW, and set up a systemd service for automatic startup.
The Forest Dedicated Server on Linux
The Forest's dedicated server supports Linux natively. The setup mirrors the Windows process with differences in paths and service management.
Step 1: Install SteamCMD
On Debian/Ubuntu:
sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install steamcmd
On RHEL/Fedora:
sudo dnf install steamcmd
Or download the standalone tarball from Valve and extract manually:
mkdir ~/steamcmd && cd ~/steamcmd
curl -sSL https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz | tar xz
Step 2: Download the Server
steamcmd +login anonymous \
+force_install_dir /opt/theforest \
+app_update 556450 validate \
+quit
This downloads the server files to /opt/theforest using AppID 556450 with anonymous login.
Step 3: First Launch to Generate Server.cfg
cd /opt/theforest
./TheForestDedicatedServer -batchmode -nographics -nosteamclient
Let it initialize, then Ctrl+C to stop it. The config file is generated at:
~/.config/unity3d/SKS/TheForestDedicatedServer/ds/server.cfg
This is the standard Unity persistent data path on Linux. Edit this file to configure your server.
Step 4: Open Firewall Ports (UFW)
sudo ufw allow 8766/tcp
sudo ufw allow 8766/udp
sudo ufw allow 27015/tcp
sudo ufw allow 27015/udp
sudo ufw allow 27016/tcp
sudo ufw allow 27016/udp
sudo ufw reload
Step 5: Create a systemd Service
Create the service file:
sudo nano /etc/systemd/system/theforest.service
Paste the following (adjust User and paths to match your setup):
[Unit]
Description=The Forest Dedicated Server
After=network.target
[Service]
Type=simple
User=gameserver
WorkingDirectory=/opt/theforest
ExecStart=/opt/theforest/TheForestDedicatedServer -batchmode -nographics -nosteamclient
Restart=on-failure
RestartSec=15s
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable theforest
sudo systemctl start theforest
Managing the Service
# Check status
sudo systemctl status theforest
# View live logs
sudo journalctl -u theforest -f
# Stop the server
sudo systemctl stop theforest
# Restart the server
sudo systemctl restart theforest
Updating the Server
Stop the service, run SteamCMD again, then restart:
sudo systemctl stop theforest
steamcmd +login anonymous +force_install_dir /opt/theforest +app_update 556450 validate +quit
sudo systemctl start theforest
Notes
- The Linux server uses the same launch flags as Windows:
-batchmode -nographics -nosteamclient - Server.cfg lives under the Unity config path (
~/.config/unity3d/...), not the installation directory - Run the server under a dedicated non-root user (e.g.
gameserver) for security