A Docker containerization setup for running a Hytale game server. This project provides a complete Docker Compose configuration with an automated build process to download and run the Hytale server.
This project containerizes the Hytale server using Docker, making it easy to deploy and manage the server with consistent configuration. It includes:
- Automated Hytale server download and installation
- Docker Compose configuration for easy orchestration
- Configurable server options through environment variables
- Volume mounting for persistent data storage
- Automated backup functionality
A pre-built Docker image is available on GitHub Container Registry:
- Image:
ghcr.io/machinastudios/hytale - Usage: You can use this image directly without building it yourself
- Docker Engine (version 20.10 or later)
- Docker Compose (version 1.29 or later)
Create a docker-compose.yml file:
services:
hytale:
image: ghcr.io/machinastudios/hytale
stdin_open: true
tty: true
ports:
- "5520:5520/udp"
volumes:
- ./backups:/hytale/backups
- ./mods:/hytale/mods
- ./logs:/hytale/logs
- ./universe:/hytale/universe
environment:
- SERVER_ACCEPT_EARLY_PLUGINS=true
- SERVER_BIND=0.0.0.0:5520
- SERVER_BACKUP_DIR=/hytale/backups
- SERVER_BACKUP_INTERVAL=10
- SERVER_MAX_VIEW_RADIUS=12Then start the server and attach to the console:
# Using the run script (recommended)
./run.sh # Linux/macOS
run.cmd # Windows
# Or manually
docker-compose up -d
docker attach hytaleTip: Press
Ctrl+P,Ctrl+Qto detach from the console without stopping the server.
For detailed documentation, see:
The Hytale Docker setup supports remote Java debugging using JDWP (Java Debug Wire Protocol). This allows you to attach a debugger from your IDE to the running server.
To enable Java debugging, set the JAVA_DEBUG environment variable to true in your docker-compose.yml:
services:
hytale:
image: ghcr.io/machinastudios/hytale
ports:
- "5520:5520/udp"
- "5005:5005/tcp" # JDWP debug port
environment:
- JAVA_DEBUG=trueThe debug port 5005 is automatically exposed when debug mode is enabled. The server will start with JDWP agent configured to listen on *:5005.
- Create or update
.vscode/launch.json:
{
"configurations": [
{
"name": "Attach to Hytale Server",
"type": "java",
"request": "attach",
"hostName": "localhost",
"port": 5005
}
]
}- Start the server with debug enabled
- Set breakpoints in your code
- Press
F5or use the Debug panel to attach to the server
- Go to Run → Edit Configurations...
- Click + → Remote JVM Debug
- Configure:
- Name:
Hytale Server Debug - Host:
localhost - Port:
5005 - Debugger mode:
Attach to remote JVM
- Name:
- Click OK and start debugging
- Go to Run → Debug Configurations...
- Right-click Remote Java Application → New
- Configure:
- Name:
Hytale Server Debug - Project: Select your project
- Host:
localhost - Port:
5005
- Name:
- Click Debug
When JAVA_DEBUG=true, the server starts with the following JVM argument:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
transport=dt_socket: Uses socket transport for debuggingserver=y: Server mode (waits for debugger to attach)suspend=n: Server starts immediately without waiting for debuggeraddress=*:5005: Listens on all interfaces on port 5005
- Suspend on Start: To make the server wait for the debugger before starting, you can modify the entrypoint script or use
JAVA_JVM_ARGSwithsuspend=y - Remote Debugging: If debugging from a different machine, ensure port
5005is accessible and use the server's IP address instead oflocalhost - Performance: Debug mode may slightly impact server performance. Disable it in production environments
- The Hytale server requires Java 22 (provided by the OpenJDK base image)
- The downloader URL is:
https://downloader.hytale.com/hytale-downloader.zip - Server files are stored in
/hytaleinside the container - The entrypoint script handles all server configuration dynamically
- All environment variables are optional; the server will use defaults if not set
This project is a Docker setup for the Hytale server. Please refer to Hytale's official terms of service and licensing for server usage.
For issues related to:
- Docker setup: Check this repository's issues
- Hytale server: Refer to official Hytale documentation and support channels
- Server configuration: Review the Hytale Server Manual for available options
