hytale-docker
hytale-docker copied to clipboard
A Dockerized Hytale server with automatic updates, configurable environment variables, persistent server storage, and optional authenticated provider tokens.
Hytale dedicated server in Docker. The container supports automatic updates on the server startup via the official Hytale Downloader CLI and runs HytaleServer.jar with custom launch options based on environment
Quick start
Copy .env.example to .env and edit as needed.
On linux can be done via:
cp .env.example .env
Start the server with docker compose up -d or make up
Follow logs with docker compose logs -f or make logs
Authentication
Attach to the running container and authenticate using the server console:
docker attach hytale
auth login device
To persist authentication across restarts, enable machine ID access in docker-compose.yml and run:
auth persistence Encrypted
Compose setup
docker-compose.yml uses:
- Container name
hytale - UDP port
5520 - Named volume
hytale-datamounted at/hytale -
.envfile for configuration
Makefile helpers
The Makefile wraps common docker compose commands:
build, up, down, restart, status, logs, in, attach, update, update-hytale-downloader
Run make for descriptions
Environment variables
Defaults are defined in Dockerfile and .env.example and can be overridden in your .env file
Server and networking
-
HYTALE_PORT(default5520): UDP port to listen on -
BIND_ADDR(default0.0.0.0): bind address
Assets and auth mode
-
ASSETS_PATH(default/hytale/Assets.zip): assets zip path in the container -
AUTH_MODE(defaultauthenticated):authenticated,offline, orinsecure
Optional server provider tokens (only passed when set in .env. file):
-
SESSION_TOKEN: adds--session-token -
IDENTITY_TOKEN: adds--identity-token -
OWNER_UUID: adds--owner-uuid
Updates
-
ENABLE_AUTO_UPDATE(defaulttrue): download and update the server on container start -
SKIP_DELETE_ON_FORBIDDEN(defaultfalse): keep downloader credentials on403 Forbidden
The downloader binary also checks for its own updates on every start.
JVM and server flags
-
JAVA_XMS(default4G): initial heap size -
JAVA_XMX(default4G): max heap size -
JAVA_CMD_ADDITIONAL_OPTS: extra JVM options appended tojava -
USE_AOT_CACHE(defaulttrue): add-XX:AOTCache=HytaleServer.aotif present -
ACCEPT_EARLY_PLUGINS(defaultfalse): add--accept-early-plugins -
ALLOW_OP(defaultfalse): add--allow-op -
DISABLE_SENTRY(defaultfalse): add--disable-sentry -
HYTALE_ADDITIONAL_OPTS: additional server options appended at the end
Backups
-
BACKUP_ENABLED(defaultfalse): enable backups -
BACKUP_DIR(default/hytale/backups): backup output directory -
BACKUP_FREQUENCY(default30): minutes between backups
Notes
- If the downloader fails with
403 Forbidden, the startup script may remove~/.hytale-downloader-credentials.jsonunlessSKIP_DELETE_ON_FORBIDDEN=true. - The server data lives in the
hytale-datavolume at/hytale.
Links
- Server Provider Authentication Guide: https://support.hytale.com/hc/en-us/articles/45328341414043-Server-Provider-Authentication-Guide
- Hytale Server Manual: https://support.hytale.com/hc/en-us/articles/45326769420827-Hytale-Server-Manual