📥 Container installation
Method A: Docker CLI
Run this command in your terminal to start the server immediately:
docker run \
--name hytale-server \
-e SERVER_IP="0.0.0.0" \
-e SERVER_PORT="5520" \
-e TZ="UTC" \
-p 5520:5520/udp \
-v "hytale-server:/home/container" \
-v "/etc/machine-id:/etc/machine-id:ro" \
--restart unless-stopped \
-t -i \
shotah/hytale-server:alpine
Method B: Docker compose
- Prepare a Directory: Create a dedicated folder inside your home directory to keep your project organized:
mkdir ~/hytale-server && cd ~/hytale-server -
Configuration: Create a file named
docker-compose.ymlinside this new folder.nano docker-compose.ymladd this docker-compose.yml information to the file:
services: hytale: image: shotah/hytale-server:alpine container_name: hytale-server environment: SERVER_IP: "0.0.0.0" SERVER_PORT: "5520" TZ: "UTC" restart: unless-stopped ports: - "5520:5520/udp" volumes: - ./data:/home/container - /etc/machine-id:/etc/machine-id:ro tty: true stdin_open: trueFor more configuration options, see the examples folder.
-
Now get out of the nano text editor and save the file:
Operating System Step 1: Write Out Step 2: Confirm Filename Step 3: Exit Editor Linux / Windows (WSL) Press Ctrl + O Press Enter Press Ctrl + X macOS Press Control + O Press Return Press Control + X Automatic folder creation: When you start the container, a
datafolder will be created automatically next to yourdocker-compose.yml.[IMPORTANT] Your game files, world data, and configurations will be stored in this
datafolder. Because this folder is mapped to the container, your progress is saved even if you stop or delete the Docker container. -
Run the docker compose file!
docker compose upTip: do not use -d. We need to use the terminal to authenticate the server.
Windows Users (Docker Desktop with WSL)
If you’re running Docker Desktop on Windows with WSL, the default /etc/machine-id volume binding won’t work. Follow these steps instead:
-
Modify the volume binding in your
docker-compose.yml:Change this:
volumes: - ./data:/home/container - /etc/machine-id:/etc/machine-id:roTo this:
volumes: - ./data:/home/container - ./machine-id:/etc/machine-id:ro -
Generate a machine-id file by opening PowerShell in the same directory as your
docker-compose.ymland running:[guid]::NewGuid().ToString("N") | Out-File -Encoding ascii -NoNewline .\machine-id -
Restart the server and authenticate it. You’ll be fine going forward.
Note: This creates a local
machine-idfile that persists with your project, ensuring consistent authentication across container restarts.
**Go to the Next page!