A simple Docker Compose setup for running an Enshrouded dedicated server with persistent data storage.
cat > docker-compose.yml <<EOF
services:
enshrouded:
image: mornedhels/enshrouded-server:latest
container_name: enshrouded
hostname: enshrouded
restart: unless-stopped
stop_grace_period: 90s
ports:
- "15637:15637/udp"
- "27015:27015/udp"
volumes:
- enshrouded-persistent-data:/opt/enshrouded
# only add ntsync device if your kernel supports it (6.14 or newer)
# devices:
# - /dev/ntsync:/dev/ntsync
environment:
- SERVER_NAME=Enshrouded Server
- SERVER_PASSWORD=password
- SERVER_SLOT_COUNT=6
- UPDATE_CRON=0 3 * * *
- PUID=4711
- PGID=4711
volumes:
enshrouded-persistent-data:
EOFdocker compose up -dIf you have https://dokploy.com/ you can use my 'Enshrouded' template.
Customize your server by editing these environment variables in the docker-compose.yml:
SERVER_NAME: Your server nameSERVER_PASSWORD: Server password (leave empty for no password)SERVER_SLOTS: Maximum players (default: 6)
For additional configuration options, see the enshrouded-server repository.
If you want to transfer your existing co-op save files to the dedicated server, follow these steps:
- Navigate to your Steam userdata directory:
userdata > (Your SteamID) > 1203620 > remote - Copy all save files from this directory
The save files need to be renamed to match the dedicated server format. Use this script to rename them:
for file in 3bd85c7d*; do
new_name="${file/3bd85c7d/3ad85aea}"
mv -- "$file" "$new_name"
done- Stop the container:
docker compose stop- Copy the renamed files to the Docker volume:
ENSHROUDED_VOLUME=enshrouded_enshrouded-persistent-data
cp remote/* /var/lib/docker/volumes/$ENSHROUDED_VOLUME/_data/server/savegame- Start the container:
docker compose start- The server data is stored in a Docker volume named
enshrouded-persistent-data - Make sure the required ports (15637/udp, 15636, 27015) are open on your firewall
- The save file ID conversion is from co-op format (3bd85c7d) to dedicated server format (3ad85aea)
- If you want to auto-connect to your server with steam, you can add to Enshrouded launch options this: "+connect PUBLIC_IP:15637 +password YOUR_PASS"