Repository navigation
v2.0.0 - Protected servers, Cloudflare from one token, local install
Every hotel now gets a protected server, a Cloudflare setup from one API token, health alerts and a local install mode, on Linux and Windows. Run the same install command again on an existing hotel to get all of it; your settings and passwords are kept.
Protected by default (both setup guides)
- Request limits in nginx and IIS for login, registration, password reset and housekeeping. 20 game connections per visitor.
- fail2ban bans an address after 5 failed SSH logins. SSH password login goes off only when your login already uses an SSH key.
- Security updates install every day at 05:00 and restart the server only when needed. Windows gets the same update policy.
- Nightly backup of the database, the settings and your uploads at 04:00, 7 kept. Logs are rotated and kept 14 days.
- The hotel answers only Cloudflare's addresses, refreshed every Sunday. Nobody can go around Cloudflare to reach the server.
Cloudflare from one API token
At the end, the installer shows the setup guide and asks for a Cloudflare API token (Enter skips it). With the token it adds the DNS records, installs a 15-year origin certificate, turns on Full (strict), Always Use HTTPS, TLS 1.2+, WebSockets, Browser Integrity Check and Bot Fight Mode, and adds a rate limit and two firewall rules. The guide explains how to create the token and which 6 permissions it needs. The token is used once and never saved.
Health alerts
An optional Discord webhook. A check runs every 5 minutes (emulator, game port, website, database, disk, backup, certificate, Cloudflare refresh) and sends one message when something fails and one when it works again.
CrowdSec (advanced guide, Linux)
An opt-in that reads the nginx and SSH logs, detects attack patterns and uses the shared CrowdSec blocklist, with the firewall and nginx bouncers.
Local install
sudo bash install.sh --local or .\install.ps1 -Local puts the whole hotel on your own PC at http://localhost, on Debian, Ubuntu, Windows 10, 11 or Server. No HTTPS, Cloudflare, firewall, SSH or update changes, and no rate limits. Three questions, Enter accepts each. Ports in use are named before anything is installed.
Emulator
nginx and IIS now pass the visitor address to the emulator on the game connection. PlusEMU reads it since plus-emulator/PlusEMU#690 and limits connections and failed logins per visitor.