Hytale dedicated server base image with ARM64/AMD64 support
1.6K
A Docker image for running Hytale dedicated servers with automatic game updates and automatic authentication. Supports AMD64 and ARM64 (Apple Silicon, Raspberry Pi, AWS Graviton).
mkdir -p data universe logs mods game .cache
Game files require authentication. Run the downloader once to save credentials:
# Download the Hytale Downloader
curl -sL https://downloader.hytale.com/hytale-downloader.zip -o data/downloader.zip
unzip data/downloader.zip -d data/
# Run the downloader to authenticate (follow the browser prompt)
# On Linux:
chmod +x data/hytale-downloader-linux-amd64
./data/hytale-downloader-linux-amd64
# On macOS (via Docker, since no native binary):
docker run -it --rm --platform linux/amd64 -v "$(pwd)/data:/data" -w /data debian:bookworm-slim \
bash -c 'apt-get update && apt-get install -y ca-certificates && chmod +x hytale-downloader-linux-amd64 && ./hytale-downloader-linux-amd64'
This creates data/.hytale-downloader-credentials.json for game file downloads.
Why is this needed?
Hytale servers must authenticate with Hytale's session service to validate players connecting to your server. Without authentication, players see "Server authentication unavailable" when trying to join.
The
get-server-token.shscript performs a one-time OAuth login to get a refresh token (valid 30 days, auto-renews). This enables the container to automatically re-authenticate on every restart - no manual/auth loginneeded!
# Download and run the setup script
curl -sL https://raw.githubusercontent.com/JPyke3/hytale-server/main/get-server-token.sh -o get-server-token.sh
chmod +x get-server-token.sh
./get-server-token.sh
Follow the browser prompt to authenticate. This creates data/.hytale-server-credentials.json.
services:
hytale:
image: jpyke3/hytale-server:latest
container_name: hytale-server
restart: unless-stopped
ports:
- "5520:5520/udp"
environment:
- JVM_OPTS=-Xms2G -Xmx6G -XX:+UseG1GC -XX:MaxGCPauseMillis=200
- AUTO_UPDATE=true
volumes:
# Credentials
- ./data/.hytale-downloader-credentials.json:/server/.hytale-downloader-credentials.json:ro
- ./data/.hytale-server-credentials.json:/server/.hytale-server-credentials.json
# Server configuration (persisted)
- ./data/config.json:/server/config.json
- ./data/permissions.json:/server/permissions.json
- ./data/bans.json:/server/bans.json
- ./data/whitelist.json:/server/whitelist.json
# Game files and data
- ./game:/server/game
- ./universe:/server/universe
- ./logs:/server/logs
- ./mods:/server/mods
- ./.cache:/server/.cache
stdin_open: true
tty: true
mem_limit: 8g
mem_reservation: 2g
# Create empty config files (server will populate them)
echo '{}' > data/config.json
echo '{"users":{},"groups":{"Default":[],"OP":["*"]}}' > data/permissions.json
echo '[]' > data/bans.json
echo '[]' > data/whitelist.json
docker compose up -d
That's it! The server will:
This server uses two separate credential files:
| File | Purpose | Created By |
|---|---|---|
.hytale-downloader-credentials.json | Download game files (auto-updates) | Hytale Downloader |
.hytale-server-credentials.json | Authenticate server for player connections | get-server-token.sh |
On every container startup:
The refresh token is valid for 30 days and auto-renews on each use.
If you prefer not to use get-server-token.sh, you can authenticate manually after each container restart:
docker attach hytale-server
# In console:
/auth login device
# Follow the URL to authenticate
# Detach: Ctrl+P Ctrl+Q
Note: This must be done every time the container restarts.
| Variable | Default | Description |
|---|---|---|
JVM_OPTS | -Xms2G -Xmx6G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 | JVM memory and GC settings |
AUTO_UPDATE | true | Check for game updates on startup |
| Host Path | Container Path | Description |
|---|---|---|
./data/.hytale-server-credentials.json | /server/.hytale-server-credentials.json | OAuth refresh token for auto-auth |
./data/.hytale-downloader-credentials.json | /server/.hytale-downloader-credentials.json:ro | Game download credentials |
./data/config.json | /server/config.json | Server configuration |
./data/permissions.json | /server/permissions.json | Player permissions (OP, groups) |
./data/bans.json | /server/bans.json | Banned players |
./data/whitelist.json | /server/whitelist.json | Whitelisted players |
./game | /server/game | Game files (auto-downloaded) |
./universe | /server/universe | World saves, player data |
./logs | /server/logs | Server logs |
./mods | /server/mods | Installed mods |
./.cache | /server/.cache | Optimized files cache |
your-server-ip:5520The server isn't authenticated. Run get-server-token.sh on the host, then restart the container.
Or authenticate manually:
docker attach hytale-server
/auth login device
# Complete browser auth, then Ctrl+P Ctrl+Q to detach
Ensure permissions.json is mounted as a volume. Check that ./data/permissions.json exists on the host.
To restore OP:
# Edit permissions.json, change your user's group to "OP"
docker compose restart hytale
Server authentication failed. Check logs for auth errors:
docker logs hytale-server | grep -i auth
Re-run get-server-token.sh to get a new token:
./get-server-token.sh
docker compose restart hytale
The container automatically checks for and downloads new Hytale game versions on startup.
On every container start:
game/.current-version)Auto-updates work on ARM64 (Apple Silicon, Raspberry Pi, AWS Graviton) via QEMU emulation. The container includes qemu-user-static which runs the x86-64 Hytale downloader binary transparently.
environment:
- AUTO_UPDATE=false
For automatic idle shutdown, use with Lazytainer:
services:
lazytainer:
image: ghcr.io/vmorganp/lazytainer:latest
ports:
- "5520:5520/udp"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
- "lazytainer.group.hytale.ports=5520"
- "lazytainer.group.hytale.sleepMethod=stop"
- "lazytainer.group.hytale.inactiveTimeout=300"
- "lazytainer.group.hytale.minPacketThreshold=2"
- "lazytainer.group.hytale.pollRate=5"
restart: unless-stopped
network_mode: bridge
hytale:
image: jpyke3/hytale-server:latest
container_name: hytale-server
restart: unless-stopped
labels:
- "lazytainer.group=hytale"
network_mode: service:lazytainer
depends_on:
- lazytainer
environment:
- JVM_OPTS=-Xms2G -Xmx6G -XX:+UseG1GC -XX:MaxGCPauseMillis=200
- AUTO_UPDATE=true
volumes:
# Credentials
- ./data/.hytale-downloader-credentials.json:/server/.hytale-downloader-credentials.json:ro
- ./data/.hytale-server-credentials.json:/server/.hytale-server-credentials.json
# Server configuration (persisted)
- ./data/config.json:/server/config.json
- ./data/permissions.json:/server/permissions.json
- ./data/bans.json:/server/bans.json
- ./data/whitelist.json:/server/whitelist.json
# Game files and data
- ./game:/server/game
- ./universe:/server/universe
- ./logs:/server/logs
- ./mods:/server/mods
- ./.cache:/server/.cache
stdin_open: true
tty: true
mem_limit: 8g
mem_reservation: 2g
Content type
Image
Digest
sha256:f8a534d0c…
Size
166 MB
Last updated
9 months ago
docker pull jpyke3/hytale-server