Docker version for dedicated server of Foundry
10K+
This Docker image simplifies hosting your own Foundryβ dedicated server. π
Tested and confirmed to work on Linux (Ubuntu/Debian). π§ Source code, issues and contributions: github.com/luxusburg/docker-foundryβ
backup.sh tool to list/create/restore from the CLI or the web UI.LOG_LEVEL control.| Tag | Meaning |
|---|---|
latest | Current release, automatic backups on by default |
non_cron | Same image, automatic backups off by default (set BACKUPS=true to enable) |
1.7, 1.7-non_cron | Release 1.7 build (pinned version of the above) |
Create a directory for the server data first, e.g. mkdir ~/foundry-server && cd ~/foundry-server, then:
docker run -d \
--name foundry-server \
-p 3724:3724/udp \
-p 27015:27015/udp \
-v ./server:/home/foundry/server_files \
-v ./data:/home/foundry/persistent_data \
-e TZ="Europe/Paris" \
-e SERVER_NAME="Foundry Docker by Luxusburg" \
-e SERVER_PWD=change_me \
luxusburg/docker-foundry:latest
Or with docker-compose.yml:
services:
foundry:
container_name: foundry-server
image: luxusburg/docker-foundry:latest
network_mode: bridge
environment:
- TZ=Europe/Paris
- WORLD_NAME=myworld
- SERVER_PWD=change_me_strong_password
- SERVER_NAME=Foundry Docker - by Luxusburg
- SERVER_MAX_PLAYERS=10
- SERVER_IS_PUBLIC=true
- PAUSE_SERVER_WHEN_EMPTY=false
- AUTOSAVE_INTERVAL=300
- MAX_TRANSFER_RATE=8192
# Backups (already on by default)
- BACKUPS=true
- BACKUP_INTERVAL=0 * * * * # every hour; do NOT quote this value
- BACKUP_RETENTION=10 # keep the last 10 backup files
# - ENABLE_MODS=true
# - PUID=1000
# - PGID=1000
volumes:
- ./server:/home/foundry/server_files:rw
- ./data:/home/foundry/persistent_data:rw
ports:
- "3724:3724/udp"
- "27015:27015/udp" # only needed if SERVER_IS_PUBLIC=true
restart: unless-stopped
Then docker compose up -d and check docker logs -f foundry-server β a startup banner shows the effective configuration.
/home/foundry/server_files (e.g. ./server): game server files, app.cfg, mods./home/foundry/persistent_data (e.g. ./data): world saves (save/<WORLD_NAME>/), backups (backup/), logs.π‘ Tip: fine-tune via ./server/app.cfg after the first run, or fully manage it yourself with CUSTOM_CONFIG=true. All official app.cfg options: Foundry Dedicated Server Docsβ
Backups are on by default: an in-container scheduler (no cron daemon) runs them on your BACKUP_INTERVAL, honoring TZ, as the foundry user, visible in docker logs. Archives go to ./data/backup/foundry_backup-*.tar.gz, each integrity-checked before keeping; a disk-space guard (MIN_FREE_MB) skips instead of filling your volume.
docker exec foundry-server /home/foundry/scripts/backup.sh --list
docker exec foundry-server /home/foundry/scripts/backup.sh --create
docker exec foundry-server /home/foundry/scripts/backup.sh --restore latest
docker restart foundry-server # restore is applied safely on next start
β»οΈ Restore is deferred by default: it is applied on the next container start, before the server boots, and the save that was active is always kept in a pre_restore_* safety folder. Manual tar -xzvf ./data/backup/foundry_backup-<name>.tar.gz -C ./data/ works too (overwrites current saves!).
environment:
- WEBUI=true
- WEBUI_TOKEN=*** # REQUIRED - UI refuses to start without it
ports:
- "8080:8080" # only map if you want it reachable
Open http://<host>:8080/, enter the token: live server status, create/list/restore backups, edit app.cfg, tail logs, restart the container β all in the browser. β οΈ The token is the only gate: keep the port private or firewalled, use a long random token. (The game server has no RCON, so no in-game commands β by design.)
| Variable | Default | Description |
|---|---|---|
TZ | Europe/Paris | Container timezone π |
WORLD_NAME | FoundryDockerWorld | World / save folder name πΊοΈ (case-sensitive; the container warns before it would split an existing save by case) |
SERVER_PWD | (none) | Server password π β highly recommended |
SERVER_NAME | Foundry Docker Server | Server browser name π’ |
MAP_SEED | (game default) | Map seed π± (written as the official mapseed option; legacy map_seed= lines migrate automatically) |
SERVER_MAX_PLAYERS | 10 | Max players π§βπ€βπ§ |
PAUSE_SERVER_WHEN_EMPTY | false | Pause when nobody is connected βΈοΈ |
AUTOSAVE_INTERVAL | 300 | Autosave every N seconds β±οΈ |
SERVER_IS_PUBLIC | false | List on the Steam server browser π |
SERVER_PORT | 3724 | Game port π |
SERVER_QUERY_PORT | 27015 | Steam query port π‘ (public servers) |
MAX_TRANSFER_RATE | 1024 | Client transfer rate, KiB/s, max 8192 πΆ |
CUSTOM_CONFIG | false | true = never touch your own app.cfg π |
LOG_LEVEL | info | error / warn / info / trace π |
BACKUPS | true | Enable automatic backups |
BACKUP_INTERVAL | 0 * * * * | Cron schedule β do NOT quote the value ποΈ |
BACKUP_RETENTION | 10 | Number of backup files kept |
MIN_FREE_MB | 500 | Free-space guard before a backup runs π‘οΈ |
NO_CRON | (unset) | Legacy: any value disables backups entirely |
PUID / PGID | 1000 | File ownership on your volumes (id $(whoami)) |
BETANAME / BETAPASSWORD | (none) | Steam beta branch β no quotes around the values π§ͺ |
ENABLE_MODS | false | Download subscribed mods at startup π§© |
WEBUI / WEBUI_TOKEN / WEBUI_PORT | false / β / 8080 | Optional admin UI π₯οΈ |
docker compose pull && docker compose up -d.Set ENABLE_MODS=true and copy your client-generated modList.json into ./server/Mods/ (Windows client: ...\Steam\steamapps\common\FOUNDRY\Mods\modList.json). Mods download/update at startup; per-mod settings live in ./data/mod_settings/.
Feedback, bug reports and pull requests are welcome on GitHubβ β open an issue or a PR!
Content type
Image
Digest
sha256:4874970b0β¦
Size
512.8 MB
Last updated
5 days ago
docker pull luxusburg/docker-foundry