Back to Setup Guides
    Docker

    Hytale Server Setup with Docker

    Deploy a Hytale dedicated server using Docker for easy management, updates, and portability.

    Prerequisites

    • Docker and Docker Compose installed
    • Hytale account for server authentication
    • UDP port 5520 available

    1Create Project Directory

    Create a directory structure for your Hytale server.

    mkdir -p ~/hytale-docker/server-files
    cd ~/hytale-docker

    2Create Docker Compose File

    Create a docker-compose.yml file with the Hytale server configuration.

    docker-compose.yml
    version: '3.8'
    
    services:
      hytale:
        image: indifferentbroccoli/hytale-server:latest
        container_name: hytale-server
        restart: unless-stopped
        ports:
          - "5520:5520/udp"
        volumes:
          - ./server-files:/data
        environment:
          - JAVA_MEMORY=4G
          - TZ=UTC
        stdin_open: true
        tty: true

    Environment Variables

    • JAVA_MEMORY - Server memory allocation (default: 4G)
    • TZ - Server timezone

    3Start the Server

    Start the Hytale server container.

    # Start the server in detached mode
    docker-compose up -d
    
    # View logs
    docker-compose logs -f hytale

    4Authenticate Your Server

    Attach to the container and authenticate with your Hytale account.

    # Attach to the server console
    docker attach hytale-server
    
    # In the console, type:
    /auth login device
    1. A code will be displayed (e.g., ABCD-1234)
    2. Go to accounts.hytale.com/device
    3. Enter the code and authorize
    4. Press Ctrl+P then Ctrl+Q to detach

    Important

    The authentication is required only once and persists across container restarts.

    5Manage Your Server

    Common Docker commands for managing your Hytale server.

    # Stop the server
    docker-compose down
    
    # Restart the server
    docker-compose restart
    
    # Update to latest version
    docker-compose pull
    docker-compose up -d
    
    # View logs
    docker-compose logs -f
    
    # Attach to console
    docker attach hytale-server

    6Server File Structure

    After first run, your server-files directory will contain:

    server-files/
    ├── Server/
    │   ├── HytaleServer.jar    # Main server executable
    │   └── HytaleServer.aot    # AOT cache for faster startup
    ├── Assets.zip              # Game assets
    ├── .cache/                 # Optimized file cache
    ├── logs/                   # Server log files
    ├── mods/                   # Installed mods
    ├── universe/               # World and player data
    │   └── worlds/             # Individual world folders
    ├── bans.json               # Banned players
    ├── config.json             # Server configuration
    ├── permissions.json        # Permission configuration
    └── whitelist.json          # Whitelisted players

    Connecting to Your Server

    Once your server is running and authenticated, players can connect using:

    • Direct Connect: Use your public IP and port (e.g., 123.45.67.89:5520)
    • Find your IP: Run curl ifconfig.me