- Shell 88.6%
- Dockerfile 11.4%
| .forgejo/workflows | ||
| bin | ||
| .dockerignore | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| README.md | ||
Astroneer Dedicated Server (Docker)
A simple Docker setup for running an Astroneer dedicated server on Linux. It uses Wine (from Proton-CachyOS) to run the Windows server binary headlessly.
Inspired by birdhimself/astroneer-docker and barumel/docker-astroneer-server, but takes a different approach: no extra launcher tools, no JavaScript wrapper; just a Fish shell entrypoint that talks directly to Wine and steamcmd.
Requirements
- Docker and Docker Compose
- Linux host with x86_64 CPU (AVX2 minimum)
- (Optional) NTSync support in your kernel for better Wine performance (
/dev/ntsync)
Image Variants
Two images are published to the registry:
| Tag | CPU Requirement | Use When |
|---|---|---|
:v3 |
AVX2 (most CPUs from ~2015+) | Default — works on most hardware |
:v4 |
AVX-512 (some Intel/AMD CPUs) | You know your CPU supports AVX-512 |
Check your CPU with grep -o 'avx512f' /proc/cpuinfo. If it returns nothing, use :v3.
Quick Start
-
Clone the repo and
cdinto it. -
Create a
.envfile with your server settings:
ASTRO_SERVER_NAME=My Astroneer Server
ASTRO_SERVER_PASSWORD=changeme
ASTRO_SERVER_OWNER_NAME=YourSteamName
- Set the image tag in your compose file (
:v3or:v4):
image: git.ryot.foo/toph/astroneer-docker:v3
- Start the server:
docker compose up -d
The first boot takes a while -- it downloads the game files via steamcmd and sets up Wine. After that, restarts are fast because everything is cached in the ./data/ directory.
- Check the logs:
docker compose logs -f
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
ASTRO_SERVER_NAME |
Yes | -- | Name shown in the server browser |
ASTRO_SERVER_PASSWORD |
Yes | -- | Password to join the server |
ASTRO_SERVER_OWNER_NAME |
Yes | -- | Steam name of the server owner |
ASTRO_SERVER_PORT |
No | 5520 |
UDP port the server listens on |
ASTRO_SERVER_PUBLIC_IP |
No | Auto-detected | Public IP address for the server |
ASTRO_SERVER_DOMAIN_NAME |
No | -- | Domain name to resolve for the public IP |
ASTRO_SERVER_AUTO_SAVE_INTERVAL |
No | 60 |
Auto-save interval in seconds |
If you don't set ASTRO_SERVER_PUBLIC_IP or ASTRO_SERVER_DOMAIN_NAME, the entrypoint will auto-detect your public IP using ipify.org.
Data and Persistence
All game data lives in bind-mounted directories on your host:
./data/astroneer/ - Game files, saves, Wine prefix (everything the server needs)
./data/backup/ - Automatic backups
Don't delete ./data/astroneer/ unless you want a fresh install. The Wine prefix and game files are cached there so you don't have to wait for setup again.
Backups
The server automatically backs up your save files every 10 minutes. Older backups get moved to a daily/ folder every hour.
./data/backup/ - Recent backups (last hour)
./data/backup/daily/ - Older backups (one per day)
./data/backup/restore/ - Drop files here to restore them
Restoring a Save
- Stop the server:
docker compose down - Copy the
.savegamefile you want to restore into./data/backup/restore/ - Start the server:
docker compose up -d
The entrypoint will pick up the file and put it in the right place on boot.
Health Checks
The entrypoint watches for corrupted or duplicate save files every 20 seconds. If it detects a problem, it automatically copies the latest good backup to the restore folder and restarts the container. With restart: always in the compose file, it comes back up on its own.
NTSync
The compose file passes through /dev/ntsync from the host. This is a Linux kernel feature that speeds up Wine's thread synchronization. If your kernel supports it, the server will use it automatically. If not, you can remove the devices section from docker-compose.yml and things will still work fine -- just a bit slower.
How It Works
The whole startup flow is handled by a single Fish shell script:
- Updates steamcmd and installs/updates the Astroneer server (with retry logic)
- On first run, sets up a Wine prefix and copies the needed DLLs from Proton
- Generates the server config files if they don't exist yet
- Applies your environment variables to the config files
- Restores any saves from the restore folder
- Starts the server with Wine
- Runs the backup and health check loops in the background
- Handles graceful shutdown on SIGTERM/SIGINT
The Windows server binary runs through Wine from Proton-CachyOS. It uses software Vulkan rendering (Mesa lavapipe) so no GPU is needed. The server communicates over UDP, not TCP.
Ports
The server uses UDP port 5520 by default. Make sure your firewall and port forwarding are set up for UDP, not TCP.
Troubleshooting
Server won't start / crashes with segfault
- The compose file includes
init: trueandsecurity_opt: [seccomp:unconfined]. Both are required —initprevents Wine from crashing when Fish runs as PID 1, andseccomp:unconfinedallows system calls that Wine needs. If you removed either, add them back. - Check the logs with
docker compose logs. Make sure all three required env vars are set. - If the server crashes silently, you might be using
:v4on a CPU without AVX-512. Switch to:v3.
Server starts but exits after ~60 seconds
- If you set
ASTRO_SERVER_PUBLIC_IPto a private/internal IP, the server may shut itself down. Either remove it (auto-detection will find your real public IP) or set it to your actual public IP.
First boot is very slow
- That's normal. steamcmd is downloading the game (~2 GB) and Wine is being set up. It only happens once.
Can't connect from the game
- Make sure port
5520/udp(or your custom port) is forwarded on your router and open in your firewall. - Check that the public IP in the logs matches what you expect.
NTSync errors in logs
- Your kernel might not support NTSync. Remove the
devicessection fromdocker-compose.yml.