2.2 KiB
Running Hytale Server with Docker
It's recommended to run the Hytale server in a containerized environment like Docker for easier management and isolation. The server is new and there maybe be security issues or bugs that could cause harm on a production system, Docker helps mitigate these risks.
If you want to use Docker after having the /opt/Hytale/Server configured, follow these steps:
Prerequisites
- A working setup of the Hytale server. See the main README for installation instructions.
- Docker and Docker Compose installed on your system. You can follow the official Docker installation guide.
Setup
- Create a
docker-compose.ymlfile in a convenient location (e.g.,/opt/Hytale/):
services:
hytale-server:
image: eclipse-temurin:latest
container_name: hytale-server
restart: unless-stopped
working_dir: /opt/Hytale/Server
volumes:
- /opt/Hytale/Server:/opt/Hytale/Server
ports:
- "5520:5520/udp"
- "5523:5523" # if you're using the https://github.com/nitrado/hytale-plugin-webserver plugin
command: java -jar HytaleServer.jar --assets Assets.zip --disable-sentry
stdin_open: true
tty: true
- Start the server:
docker-compose up -d
- View server logs:
docker-compose logs -f
- Stop the server:
docker-compose down
The result will be the same as running it natively, but now encapsulated in a Docker container.
Configuration Notes
Java Version
The configuration uses eclipse-temurin:latest which may not always be compatible. If you need a specific Java version, update the image tag:
image: eclipse-temurin:24-jre # For Java 24
# or
image: eclipse-temurin:23-jre # For Java 23
Migration from Native Setup
Since you're already running the server natively in /opt/Hytale/Server:
- Stop your native Java process
- Create the
docker-compose.ymlfile - Run
docker-compose up -d - Your server will continue using the same files and configuration
No data migration is needed since the Docker container mounts your existing directory directly.