Configuration

All configuration is done through a .env file in the repository root. Copy .env.example to .env and adjust the values for your environment.

Variable reference

MySQL database

VariableDescriptionDefault
MYSQL_ROOT_PASSWORDMySQL root user passwordchangeme_root
MYSQL_DATABASEDatabase nameMuOnline97
MYSQL_USERDatabase usermu_admin
MYSQL_PASSWORDDatabase user passwordchangeme_pass
DB_HOSTMySQL container host (leave as-is)mysql
DB_PORTMySQL port3306
DB_USERUser for server connectionmu_admin
DB_PASSPassword for server connectionchangeme_pass
DB_NAMEDatabase name for the serverMuOnline97

DB_USER and DB_PASS must match MYSQL_USER and MYSQL_PASSWORD.

Game server

VariableDescriptionDefault
PUBLIC_IPVPS public IP. The game client connects to this IP.(empty)

Web panel

VariableDescriptionDefault
WEB_PORTWeb container internal port8080
SESSION_SECRETSession signing secret. Change to a long random string.change-this-secret
TURNSTILE_SITE_KEYCloudflare Turnstile site key (login captcha). Optional.(empty)
TURNSTILE_SECRET_KEYCloudflare Turnstile secret key. Optional.(empty)
ADMIN_USERAdmin panel usernameadmin
ADMIN_PASSAdmin panel password. Must be changed.123456
TRUST_PROXY1 if using a reverse proxy like Nginx Proxy Manager1

Server editor (optional)

VariableDescriptionDefault
EDITOR_ENABLED1 to enable the editor service, 0 to disable0
EDITOR_PORTEditor service internal port8090
EDITOR_API_URLInternal URL for web panel to reach the editorhttp://mu-editor:8090
EDITOR_MAX_BACKUPSMaximum backups per file5
EDITOR_MAX_SNAPSHOTSMaximum full snapshots5

Test data and timezone

VariableDescriptionDefault
SEED_TEST_DATA1 to load test accounts on startup. For testing only.0
TZSystem timezoneAmerica/Argentina/Buenos_Aires
TIMEZONEGame server timezoneAmerica/Argentina/Buenos_Aires

Cloudflare Turnstile setup (captcha)

To add captcha to the admin login form:

  1. Create a site at Cloudflare Turnstile
  2. Copy the keys to .env:
TURNSTILE_SITE_KEY=0x4AAAAAAA...
TURNSTILE_SECRET_KEY=0x4AAAAAAA...

If the variables are empty, captcha is automatically disabled.

Running behind a reverse proxy

If the web panel runs behind Nginx or Nginx Proxy Manager:

TRUST_PROXY=1

This allows the panel to correctly read the real client IP from the X-Forwarded-For header.

Editing game data

Game data (items, monsters, rates, shops, etc.) can be configured from the admin panel at https://your-domain.com/admin/ (or http://YOUR_IP:8085/admin/ if accessing directly without a reverse proxy).

You can also directly edit .txt files in the Docker volume of mu-server:

Server .txt files must be saved in ANSI/Windows-1252 encoding without BOM. UTF-8 breaks accented characters in the client.