Sign inSign up

luxusburg/docker-foundry

By luxusburg

β€’Updated 5 days ago

Docker version for dedicated server of Foundry

Image
5

10K+

luxusburg/docker-foundry repository overview

⁠Foundry Dedicated Server Docker Container 🏭

Docker Hub Docker Pulls Image Size Github GitHub last commit

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⁠

⁠✨ Features

  • πŸ’¨ Easy setup β€” a few environment variables and you are running.
  • πŸ”„ Game server updated automatically on every container start (SteamCMD).
  • πŸ’Ύ Working, integrity-checked hourly backups with retention and a disk-space guard β€” plus a backup.sh tool to list/create/restore from the CLI or the web UI.
  • πŸ–₯️ Optional token-protected web admin UI (status, backups, config editor, log tail, restart) β€” no extra container.
  • 🧩 Mod support and πŸ§ͺ Steam beta branch support.
  • πŸ” Clean timestamped logging with a startup config banner and LOG_LEVEL control.
  • πŸ›‘οΈ Weekly automatic image rebuilds keep base-image security patches flowing.

⁠🏷️ Image Tags

TagMeaning
latestCurrent release, automatic backups on by default
non_cronSame image, automatic backups off by default (set BACKUPS=true to enable)
1.7, 1.7-non_cronRelease 1.7 build (pinned version of the above)

β πŸš€ Quick Start

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.

β πŸ—‚οΈ Volumes

  • /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 & Restore

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!).

⁠πŸ–₯️ Web Admin UI (optional, off by default)

    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.)

β πŸ”§ Environment Variables

VariableDefaultDescription
TZEurope/ParisContainer timezone 🌍
WORLD_NAMEFoundryDockerWorldWorld / 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_NAMEFoundry Docker ServerServer browser name πŸ“’
MAP_SEED(game default)Map seed 🌱 (written as the official mapseed option; legacy map_seed= lines migrate automatically)
SERVER_MAX_PLAYERS10Max players πŸ§‘β€πŸ€β€πŸ§‘
PAUSE_SERVER_WHEN_EMPTYfalsePause when nobody is connected ⏸️
AUTOSAVE_INTERVAL300Autosave every N seconds ⏱️
SERVER_IS_PUBLICfalseList on the Steam server browser 🌐
SERVER_PORT3724Game port πŸ”Œ
SERVER_QUERY_PORT27015Steam query port πŸ“‘ (public servers)
MAX_TRANSFER_RATE1024Client transfer rate, KiB/s, max 8192 πŸ“Ά
CUSTOM_CONFIGfalsetrue = never touch your own app.cfg πŸ“
LOG_LEVELinfoerror / warn / info / trace πŸ”
BACKUPStrueEnable automatic backups
BACKUP_INTERVAL0 * * * *Cron schedule β€” do NOT quote the value πŸ—“οΈ
BACKUP_RETENTION10Number of backup files kept
MIN_FREE_MB500Free-space guard before a backup runs πŸ›‘οΈ
NO_CRON(unset)Legacy: any value disables backups entirely
PUID / PGID1000File ownership on your volumes (id $(whoami))
BETANAME / BETAPASSWORD(none)Steam beta branch β€” no quotes around the values πŸ§ͺ
ENABLE_MODSfalseDownload subscribed mods at startup 🧩
WEBUI / WEBUI_TOKEN / WEBUI_PORTfalse / β€” / 8080Optional admin UI πŸ–₯️

β πŸ”„ Staying Up to Date

  • The game server updates via SteamCMD on every container start.
  • The Debian base + packages refresh via weekly automated image rebuilds (Mondays, UTC).
  • To pick up a newer image: docker compose pull && docker compose up -d.

⁠🧩 Mods

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/.

β πŸ’– Contributing

Feedback, bug reports and pull requests are welcome on GitHub⁠ β€” open an issue or a PR!

Tag summary

Content type

Image

Digest

sha256:4874970b0…

Size

512.8 MB

Last updated

5 days ago

docker pull luxusburg/docker-foundry