docs: add self-contained setup reference configs (emulator + nitro) and bold-link buttons
Deploy / release (push) Skipped
Deploy / deploy (push) Failing after 33s

This commit is contained in:
openhands committed 2026-07-20 20:54:26 +02:00
1 parent c4532dd340
commit 43a624bbe7
7 files changed
+233 -4

No files matched your search

+66
View File
@@ -0,0 +1,66 @@
# ===========================================================================
# Polaris Emulator — reference config.ini
# Copy this to /var/www/emulator/Emulator/target/config.ini and fill in the
# values marked CHANGE_ME. The emulator reads this file on startup.
# Full guide: https://github.com/duckietm/Complete-Retro-on-Ubuntu
# ===========================================================================
# ---- Database configuration ----
db.hostname=127.0.0.1
db.port=3306
db.database=habbo # DB name (shared with the CMS)
db.username=root # Username
db.password=CHANGE_ME # Password
db.params=?characterEncoding=utf8&useSSL=false&serverTimezone=Europe/Amsterdam
db.pool.minsize=25
db.pool.maxsize=100
db.pool.connection_timeout_ms=10000
db.pool.idle_timeout_ms=600000
db.pool.max_lifetime_ms=1800000
db.pool.validation_timeout_ms=5000
db.pool.leak_detection_ms=20000 # set to 0 to disable leak detection
# ---- Game configuration ----
# Host IP. Use 0.0.0.0 in most cases. Use 127.0.0.1 for LAN only.
game.host=0.0.0.0
game.port=3000
# ---- RCON configuration ----
# Leave host at 127.0.0.1 if the CMS runs on the same server as the emulator.
rcon.host=127.0.0.1
rcon.port=3001
rcon.allowed=127.0.0.1;127.0.0.2
# ---- Nitro secure runtime assets (disabled by default) ----
nitro.secure.assets.enabled=false
nitro.secure.api.enabled=false
nitro.secure.session_ttl_sec=900
nitro.secure.config.root=
nitro.secure.gamedata.root=
# Set a persistent secret when using Cloudflare or multiple backend requests.
nitro.secure.master_key=change-me-to-a-long-random-secret
# ---- Login ----
login.remember.enabled=true
login.remember.duration.days=30
# Optional: set a persistent remember-me JWT secret here.
login.remember.jwt.secret=
login.news.limit=5
# ---- Secure runtime ECDH session TTL in seconds ----
# (kept for compatibility; unused when secure assets are disabled)
# ---- WebSockets (Nitro client) ----
ws.enabled=true
ws.host=0.0.0.0
ws.port=2096
# Header used to obtain the real client IP when behind a proxy
# (usually X-Forwarded-For, or CF-Connecting-IP behind Cloudflare).
ws.ip.header=X-Forwarded-For
# ---- Console / emulator_settings ----
# Run these SQL statements ONCE, after importing the emulator database:
# USE habbo;
# UPDATE emulator_settings SET `value` = '0' WHERE `key` = 'console.mode';
# UPDATE emulator_settings SET `value` = 'MY_DOMAIN.COM,*.MY_DOMAIN.COM,localhost,127.0.0.1' WHERE `key` = 'websockets.whitelist';
# console.mode MUST be 0 and the whitelist MUST match your domain.
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
# Launcher for the Polaris emulator.
# Place at /var/www/emulator/Emulator/target/emulator and chmod +x.
# Update the JAR name to match the version built by `mvn clean package`.
file_name_emulator=emulator.log
current_time=$(date "+%H%M_%d-%m-%Y")
file_name=$file_name_emulator.$current_time
# Rotate the previous log
mkdir -p /var/log/emu
mv /var/log/emu/emulator.log /var/log/emu/$file_name 2>/dev/null || true
# -Xmx4096m = 4 GB. 1 GB=1024, 2 GB=2048, 3 GB=3072, 4 GB=4096
java -Dfile.encoding=UTF8 -Xmx4096m \
-jar /var/www/emulator/Emulator/target/Habbo-*-jar-with-dependencies.jar \
>/var/log/emu/emulator.log
+25
View File
@@ -0,0 +1,25 @@
[Unit]
Description=Habbo Emulator
# Make sure the database has started before the emulator can start
After=mariadb.service
Requires=mariadb.service
# If you want to run as a less privileged account, change User below.
# Make sure that account has the right permissions on the working directory and target folders.
[Service]
User=root
# Working directory where config.ini and the JAR live
WorkingDirectory=/var/www/emulator/Emulator/target
# The launcher script we created below. It is a shell wrapper that calls the JAR.
ExecStart=/var/www/emulator/Emulator/target/emulator
SuccessExitStatus=143
TimeoutStopSec=10
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target