HyOS
Configuration

Configuration

Complete configuration reference for HyOS environment variables and settings

All server behavior is controlled through environment variables set in your compose.yaml or TrueNAS app configuration.

Table of Contents


User & Permissions

VariableTypeDefaultDescription
PUIDinteger568User ID for the server process. TrueNAS default is 568.
PGIDinteger568Group ID for the server process. Match to dataset ownership.
UMASKstring002File creation mask. 002 = group writable.
TZstringUTCTimezone for logs and scheduled tasks (e.g., America/New_York).
environment:
  PUID: 568
  PGID: 568
  UMASK: "002"
  TZ: America/New_York

JVM Memory

VariableTypeDefaultDescription
JAVA_XMSstring4GInitial heap size. Minimum 4G recommended.
JAVA_XMXstring8GMaximum heap size. Set to 50-75% of available RAM.
JAVA_OPTSstringAdditional JVM options (appended to the command).
JVM_XX_OPTSstringAdditional -XX: JVM options (appended).
environment:
  JAVA_XMS: 4G
  JAVA_XMX: 8G
  JAVA_OPTS: -Dfile.encoding=UTF-8

See Memory Sizing Guidelines for recommendations based on player count.

Garbage Collector

VariableTypeDefaultDescription
USE_ZGCbooleanfalseUse ZGC instead of G1GC. Better for low-latency but higher memory overhead.
G1_MAX_PAUSEinteger200G1GC max pause time in milliseconds.
G1_NEW_SIZE_PERCENTintegerG1GC new generation size as percentage of heap.
G1_MAX_NEW_SIZE_PERCENTintegerG1GC max new generation size as percentage.
G1_HEAP_REGION_SIZEstringG1GC heap region size (e.g., 16m).
ZGC_INTERVALintegerZGC collection interval in seconds.

G1GC (default) — balanced throughput and latency:

environment:
  USE_ZGC: "false"
  G1_MAX_PAUSE: "200"

ZGC — ultra-low pause times (requires more RAM):

environment:
  USE_ZGC: "true"
  ZGC_INTERVAL: "30"

Server Settings

VariableTypeDefaultDescription
SERVER_PORTinteger5520UDP port for the game server. Must match the exposed port.
PATCHLINEstringreleaseServer version channel: release, staging, or nightly.
ENABLE_AOTbooleantrueUse AOT (Ahead-of-Time) compilation cache for faster startup.

Config Generation

The container auto-generates config.json from environment variables on each startup. Set SKIP_CONFIG_GENERATION=true to manage the file manually.

VariableTypeDefaultDescription
SKIP_CONFIG_GENERATIONbooleanfalseSkip auto-generation; manage config.json manually.
SERVER_NAMEstringHytale ServerServer name displayed in the server list.
SERVER_MOTDstringMessage of the day shown to players on join.
SERVER_PASSWORDstringServer password. Leave empty for a public server.
MAX_PLAYERSinteger100Maximum concurrent players.
MAX_VIEW_RADIUSinteger32Maximum view distance in chunks.
DEFAULT_WORLDstringdefaultDefault world name on join.
DEFAULT_GAMEMODEstringAdventureDefault game mode: Adventure, Creative, or Survival.
LOCAL_COMPRESSIONbooleanfalseEnable local compression.
DISPLAY_TMP_TAGSbooleanfalseDisplay temporary tags in strings.
PLAYER_STORAGE_TYPEstringHytalePlayer data storage type.
HYTALE_CONFIG_JSONstringFull config.json override as a JSON string.
environment:
  SERVER_NAME: "My Awesome Server"
  SERVER_MOTD: "Welcome!"
  MAX_PLAYERS: "50"
  DEFAULT_GAMEMODE: Adventure

Generated config.json structure:

{
  "Version": 3,
  "ServerName": "My Awesome Server",
  "MOTD": "Welcome!",
  "Password": "",
  "MaxPlayers": 50,
  "MaxViewRadius": 32,
  "LocalCompressionEnabled": false,
  "Defaults": {
    "World": "default",
    "GameMode": "Adventure"
  },
  "ConnectionTimeouts": { "JoinTimeouts": {} },
  "RateLimit": {},
  "Modules": {},
  "LogLevels": {},
  "Mods": {},
  "DisplayTmpTagsInStrings": false,
  "PlayerStorage": { "Type": "Hytale" }
}

See Config Generation Modes for details on the three approaches.

Whitelist

VariableTypeDefaultDescription
WHITELIST_ENABLEDbooleanfalseEnable player whitelist.
WHITELIST_LISTstringComma-separated list of allowed usernames.
WHITELIST_JSONstringFull whitelist.json override as a JSON string.

Using a comma-separated list:

environment:
  WHITELIST_ENABLED: "true"
  WHITELIST_LIST: "player1,player2,player3"

Using full JSON override:

environment:
  WHITELIST_ENABLED: "true"
  WHITELIST_JSON: '{"enabled": true, "players": ["player1", "player2"]}'

Auto-Update

VariableTypeDefaultDescription
AUTO_UPDATEbooleanfalseCheck for and apply updates at container startup.
AUTO_UPDATE_INTERVALinteger3600Interval between update checks in seconds (background mode).
AUTO_UPDATE_TIMEstringSpecific time to check for updates (HH:MM format, e.g., 04:00).
AUTO_UPDATE_RESTARTbooleantrueAutomatically restart the server after applying an update.
AUTO_UPDATE_BACKUPbooleantrueCreate a backup before applying updates.
VERSION_CHECK_ENABLEDbooleantruePeriodically refresh version.json for the Manager UI.
VERSION_CHECK_INTERVALinteger3600Seconds between version checks.

Startup auto-update:

environment:
  AUTO_UPDATE: "true"
  AUTO_UPDATE_BACKUP: "true"

Scheduled updates at a specific time:

environment:
  AUTO_UPDATE: "true"
  AUTO_UPDATE_TIME: "04:00"

Cron-based updates on the host:

# Check once per hour, update and restart if needed
0 * * * * docker exec hyos-server /opt/scripts/cmd/auto-update.sh --once

Hytale CLI Options

All Hytale server CLI options are exposed as HYTALE_* environment variables.

Core

VariableTypeDefaultDescription
HYTALE_ACCEPT_EARLY_PLUGINSbooleanfalseAccept early/experimental plugins.
HYTALE_ALLOW_OPbooleanfalseAllow operator commands.
HYTALE_AUTH_MODEstringAuthentication mode: authenticated or offline.
HYTALE_BAREbooleanfalseRun in bare mode (minimal).
HYTALE_SINGLEPLAYERbooleanfalseRun in singleplayer mode.

Backups

VariableTypeDefaultDescription
HYTALE_BACKUPbooleanfalseEnable automatic backups.
HYTALE_BACKUP_DIRstring/data/backupsBackup directory path.
HYTALE_BACKUP_FREQUENCYinteger30Backup frequency in minutes.
HYTALE_BACKUP_MAX_COUNTintegerMaximum number of backups to keep.
environment:
  HYTALE_BACKUP: "true"
  HYTALE_BACKUP_FREQUENCY: "30"
  HYTALE_BACKUP_MAX_COUNT: "10"

Debug & Logging

VariableTypeDefaultDescription
HYTALE_DISABLE_SENTRYbooleanfalseDisable Sentry error reporting.
HYTALE_DISABLE_FILE_WATCHERbooleanfalseDisable file watcher for hot reloading.
HYTALE_EVENT_DEBUGbooleanfalseEnable event debugging.
HYTALE_LOGstringLog level or configuration.

Plugins & Mods

VariableTypeDefaultDescription
HYTALE_MODSstringPath to mods directory. Auto-detects /data/mods if present.
HYTALE_EARLY_PLUGINSstringPath to early plugins.
DEBUG_CLASSLOADINGbooleanfalseEnable verbose JVM class loading output for mod diagnostics.
SKIP_BROKEN_MODSbooleanfalseAuto-quarantine mods that failed to load on previous startup.

Worlds & Universe

VariableTypeDefaultDescription
HYTALE_UNIVERSEstringPath to universe data.
HYTALE_WORLD_GENstringWorld generator configuration.
HYTALE_BOOT_COMMANDstringCommand to run on server boot.

Advanced

VariableTypeDefaultDescription
HYTALE_DISABLE_ASSET_COMPAREbooleanfalseDisable asset comparison checks.
HYTALE_DISABLE_CPB_BUILDbooleanfalseDisable CPB build.
HYTALE_FORCE_NETWORK_FLUSHintegerForce network flush interval.
HYTALE_GENERATE_SCHEMAbooleanfalseGenerate schema files.
HYTALE_MIGRATE_WORLDSstringMigrate worlds from path.
HYTALE_MIGRATIONSstringMigration configuration.
HYTALE_OWNER_NAMEstringServer owner name.
HYTALE_PREFAB_CACHEstringPrefab cache path.
HYTALE_SHUTDOWN_AFTER_VALIDATEbooleanfalseShutdown after validation.
HYTALE_TRANSPORTstringTransport protocol configuration.
HYTALE_VALIDATE_ASSETSbooleanfalseValidate assets on startup.
HYTALE_VALIDATE_PREFABSstringValidate prefabs.
HYTALE_VALIDATE_WORLD_GENbooleanfalseValidate world generation.
HYTALE_EXTRA_ARGSstringAdditional server arguments (passthrough).

API Plugin

The built-in REST API plugin enables remote server management via the HyOS Manager.

VariableTypeDefaultDescription
API_ENABLEDbooleantrueEnable the REST API plugin.
API_PORTinteger8080HTTP port for the API.
API_CLIENT_IDstringhyos-managerClient ID for API authentication.
API_CLIENT_SECRETstringClient secret (password) for API authentication. Required if API is enabled.
API_WEBSOCKET_ENABLEDbooleantrueEnable WebSocket support for real-time updates.
API_WEBSOCKET_STATUS_INTERVALinteger1WebSocket status broadcast interval in seconds.
API_REGENERATE_CONFIGbooleanfalseForce regenerate API config on startup to sync password from environment.
environment:
  API_ENABLED: "true"
  API_PORT: "8080"
  API_CLIENT_SECRET: "your-secure-password"
  API_WEBSOCKET_ENABLED: "true"

The API plugin password is bcrypt-hashed before being written to config. The plaintext password is never stored on disk.

Token Injection

For automated deployments (hosting providers), pre-inject authentication tokens to skip the interactive OAuth flow entirely.

VariableTypeDescription
HYTALE_SERVER_SESSION_TOKENstringPre-authenticated session token.
HYTALE_SERVER_IDENTITY_TOKENstringPre-authenticated identity token.
HYTALE_OWNER_UUIDstringServer owner's UUID.
environment:
  HYTALE_SERVER_SESSION_TOKEN: "eyJhbGciOiJSUzI1NiIs..."
  HYTALE_SERVER_IDENTITY_TOKEN: "eyJhbGciOiJFUzI1NiIs..."
  HYTALE_OWNER_UUID: "12345678-1234-1234-1234-123456789abc"

Debug

VariableTypeDefaultDescription
DEBUGbooleanfalseEnable debug logging in entrypoint scripts.
NO_COLORbooleanfalseDisable colored output in logs.
DEBUG_CLASSLOADINGbooleanfalseEnable verbose JVM class loading output.

Memory Sizing Guidelines

Server TypeMin Heap (JAVA_XMX)RecommendedSystem RAM
Personal (1–10 players)4 GB6 GB8 GB
Small (10–30 players)8 GB12 GB16 GB
Medium (30–50 players)12 GB16 GB24 GB
Large (50+ players)16 GB+24 GB+32 GB+

Set JAVA_XMX to 50–75% of available system RAM. Always leave headroom for the OS, Docker, and the Manager UI.


Config Generation Modes

There are three ways to manage config.json:

1. Environment Variables (default)

Set individual env vars (SERVER_NAME, MAX_PLAYERS, etc.) and the container generates config.json on each startup. This is the simplest approach and recommended for most users.

2. Full JSON Override

Set HYTALE_CONFIG_JSON to a complete JSON string. The container writes it directly to config.json, ignoring individual env vars.

environment:
  HYTALE_CONFIG_JSON: '{"Version":3,"ServerName":"Custom","MaxPlayers":20}'

3. Manual Management

Set SKIP_CONFIG_GENERATION=true and edit /data/server/config.json directly on the host. The container will not overwrite your changes.

environment:
  SKIP_CONFIG_GENERATION: "true"

On this page