as root user
apt update
apt upgrade -y
apt install -y software-properties-common
dpkg --add-architecture i386
add-apt-repository multiverse
apt update
# Need to accept lizence
apt install -y steamcmd
# Prepare wine
mkdir -pm755 /etc/apt/keyrings
wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources
apt update
apt install -y --install-recommends winehq-staging
apt install -y cabextract winbind screen xvfb x11vnc
useradd -m steam -s /bin/bash
echo 'export PATH="/usr/games/:$PATH"' >> /home/steam/.bashrc
if you have only 4G Memory add a swapfile
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
su -l steam
steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir '/home/steam/Foundry-Server' +login anonymous +app_update 2915550 validate +quit
For Config option see also: Dedicated Foundry Server
Available Options:
- server_world_name
- Sets the server world name. This is the folder where the save files will be stored.
- Example: server_world_name=MyFancyFactory
- server_password
- Sets the server password.
- Example: server_password=only_friends
- pause_server_when_empty
- Will the server pause when nobody is connected.
- Example: pause_server_when_empty=true
- autosave_interval
- Sets the autosave frequency in seconds.
- Example: autosave_interval=300
- server_is_public
- Sets whether the server is listed on the Steam server browser.
- Example: server_is_public=true
- server_port
- Sets the network port used by the game. Default is 3724.
- Example: server_port=3724
- server_query_port
- Sets the network port used by the Steam server browser to query information about the game. This is only used if the server is set to public. Default is 27015.
- Example: server_query_port=27015
- mapseed
- Sets the map seed used to generate the world.
- Example: mapseed=42938743982
- server_persistent_data_override_folder
- Sets the absolute folder where things like logs and save files will be stored. This is mostly used by server providers so that they can run multiple dedicated servers on a single machine.
- Example: server_persistent_data_override_folder=C:\Server01
- server_name
- This is the name of the server listed in the Steam server browser.
- Example: server_name=HappyPlace
- server_max_players
- This sets the max amount of players on a server.
- Example: server_max_players=32
/home/steam/Foundry-Server/App.cfg
server_password=game4all
pause_server_when_empty=true
autosave_interval=120
server_is_public=true
server_world_name=Die Welt ist nie Genug
server_name=Die Welt ist nie Genug
server_max_players=32
You need a vnc viewer client on your computer e.g. Tiny VNC Viewer (Windows) or Remote Desktop on MacOS
# if you are current root
su -l steam
# start Server in background
xvfb-run wine /home/steam/Foundry-Server/FoundryDedicatedServer.exe &
# Wait some seconds
sleep 10
x11vnc -display :99 -forever
On your local computer open a vnc connection to the ip address of the server.
After some time there will be a dialog to confirm download files
Wait until in the terminal the server says Foundry server is VAC Secure.
Now close the vnc connection, and cancel with Ctl-C the x11vnc
to stop the server:
sudo pkill xvfb-run
# best to restart the server.... The shutdown process is not really stable
DONE
The save games are stored in the wine drive_c
/home/steam/.wine/drive_c/users/steam/AppData/LocalLow/Channel 3 Entertainment/FoundryDedicatedServer/save/SERVER_WORLD_NAME_WITHOUT_SPACES
Save follow file in /etc/systemd/system/foundry.service
[Unit]
Description=Foundry Server
Wants=network-online.target
After=network-online.target
[Service]
User=steam
Group=steam
WorkingDirectory=/home/steam/Foundry-Server
ExecStartPre=/usr/games/steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir '/home/steam/Foundry-Server' +login anonymous +app_update 2915550 +quit
ExecStart=/usr/bin/xvfb-run wine /home/steam/Foundry-Server/FoundryDedicatedServer.exe
Restart=always
[Install]
WantedBy=multi-user.target
To enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable foundry.service
sudo systemctl start foundry.service