Docker container to run a Hytale server.
- Docker and Docker Compose
- Hytale account with server access
Clone the repository and start the container:
docker-compose up -dServer files are saved in the ./server directory. On first startup, the container automatically downloads the required files via hytale-downloader.
To complete OAuth login on first startup:
- Attach to the container:
docker attach hytale-server- Run the authentication command:
/auth login device
-
Click the displayed link in your browser to authorize access
-
Detach from the container by pressing
Ctrl+Pfollowed byCtrl+Q(detach without stopping the container)
The server exposes UDP port 5520. Modify the port mapping in docker-compose.yml if needed.
Start the server:
docker-compose up -dStop the server:
docker-compose stopView logs:
docker-compose logs -fConfigure automatic daily restart at 5:00 AM using cron:
-
Make the script executable:
chmod +x restart-server.sh
-
Add cron job (replace
/path/to/hytale-server-dockerwith your actual path):crontab -e
Add this line:
0 5 * * * /path/to/hytale-server-docker/restart-server.sh
-
Test manually:
./restart-server.sh cat logs/restart.log
To force download and update the server files to the latest version:
Option 1 - Environment variable:
FORCE_UPDATE=true docker compose upOption 2 - .env file:
echo "FORCE_UPDATE=true" > .env
docker compose up
# Remove or comment out after updateNote: The update preserves your world data (universe/), logs, and configurations. Only server binaries and assets are updated.
To update the hytale-downloader tool itself, rebuild the Docker image:
docker compose build --no-cacheThis will download the latest version of hytale-downloader from the official source.
- Server files are persistent in the
./serverdirectory - OAuth credentials are saved in
./server/.hytale-downloader-credentials.json - The container automatically restarts unless manually stopped