FishMMO
A modular, open-source MMO framework built on Unity 6.6, FishNet, QUIC/WebTransport, and PostgreSQL.
Table of Contents
- Overview
- Supported Platforms
- Prerequisites
- Installation Guide
- Database Setup
- Unity Project Setup
- Configuration
- Infrastructure Setup
- Web Server Configuration
- Running the Servers
- FishMMO-AppHealthMonitor
- Optional Services
- Client Setup
- Production Deployment
- Architecture
- License
Overview
FishMMO is a complete multiplayer online game framework consisting of:
| Component | Description |
|---|---|
| FishMMO-Unity | Unity project containing client, server, and shared game code (about 3,600 C# files: the core and 18 optional modules) — a unified client-side prediction pipeline with lag-compensated hit resolution, modular character visuals, tick-driven archetype AI with threat and pet systems, ECA trigger system |
| FishMMO-Auth | Transport-agnostic .NET authentication library (SRP-6a, X25519 ECDH, token auth, TOTP 2FA) |
| FishMMO-Database (FishMMO-DB) | PostgreSQL data-access layer using Entity Framework Core + Npgsql (74 tables, 74 services) |
| FishMMO-WebTransport | C++ native library wrapping MsQuic (QUIC/HTTP3) — P/Invoked from C# as a FishNet transport plugin |
| FishMMO-Installer | Cross-platform .NET 8 console tool that automates dependency installation |
| FishMMO-Dependencies | Centralised NuGet dependency aggregator (42 packages, netstandard2.1) — copies DLLs to Unity |
| FishMMO-Logger | Flexible logging library with file, email, and console backends |
| FishMMO-SharedUtility | Pure C# utility library shared between client and server projects |
| FishMMO-AppHealthMonitor | Daemon that monitors, auto-restarts, and health-checks server processes |
| FishMMO-WebServers | ASP.NET Core 8.0 web services — IPFetch (8080), Patcher (8090), WebGL static server (8000), and the Control Panel (8100) |
| FishMMO-Patcher | Client-side updater that applies versioned patch files |
| FishMMO-Setup | Configuration templates — nginx.conf, server .cfg files, appsettings.json |
| FishMMO-DiscordBot | Discord bot bridging in-game chat with a Discord guild |
| FishMMO-ControlPanel | ASP.NET Core 8.0 operator and player-services dashboard, under FishMMO-WebServers/ — accounts, characters, moderation, support, server monitoring and control, maintenance, bandwidth and the daemon control plane, all against PostgreSQL |
The server architecture uses three server types:
- LoginServer — Handles account creation, SRP-6a authentication, character select, and TOTP 2FA.
- WorldServer — Manages world state, character routing, and scene server orchestration.
- SceneServer — Runs gameplay simulation for individual world scenes (chat, combat, inventory, guilds, etc.).
All three are launched from a single GameServer executable with a command-line argument (LOGIN, WORLD, or SCENE).
Core and modules
The Unity code is split into a core and optional modules. The core is what every game needs: log in, create a
character, enter a world scene, move, fight, chat and save. A module is a feature a game may leave out: delete its
folder under FishMMO-Unity/Assets/FishMMO/Modules/ and the game still compiles, builds and runs. Its database tables
and rows stay in place, unused. The core never names a module; modules plug in through assembly attributes
(GameModule, CharacterPart, CharacterPersistence, HarmRelation, OperatorCommandProvider) and Addressables
labels (SceneServer_Systems for server systems, ClientWorldGUI_Panels for windows).
| Module | What it is | Remove together with |
|---|---|---|
| Ability Crafting | Crafting new abilities at an ability crafter | |
| Archetypes | A player's archetype: set, announced, saved, checked | |
| Commerce | Merchants, mail, corpse loot, player trade | |
| Factions | Faction standings, the aggression toggle | |
| Housing | Plots, building, rent, guests, the house vault | |
| Leaderboards | PvP and PvE boards | |
| Matchmaking | Group finder, dungeon finder and instances, arenas | |
| Quests | Quests, the quest log, quest givers | |
| Social | Friends, party, guild | |
| Staff and Support | /gm, /admin, the staff console, reports and tickets |
|
| Travel | Waypoint discovery and fast travel | |
| World Simulation | Sky, time, weather, climate, biomes, the atlas | All world modules |
| Water | Sea, shores, rivers, lakes, lava | All world modules |
| Terrain | GPU drawing of trees, props, grass and scatter | World Test Bed, World Design, Naming |
| Ambient Life | Birds, sea life, motes, leaves, site effects | |
| Naming | The name generator | World Design |
| World Design | The world generator and its editor tools (editor only) | |
| World Test Bed | The world test bed's probes (development only) | World Design, Naming |
Without the world modules a world scene is lit by its own sun under a plain sky colour, and the scene's Unity terrain draws itself. Each module's README lists the seams it uses and what it leaves in the core; the layout, the seams and the removal check (the module gate) are in FishMMO-Unity/Assets/FishMMO/README.md.
Networking Architecture
FishMMO uses QUIC/WebTransport (RFC 9000) as its sole transport protocol — there is no TCP or WebSocket fallback for game traffic:
| Layer | Technology | Purpose |
|---|---|---|
| Transport | QUIC (UDP) via MsQuic C++ library | Encrypted, multiplexed transport with 0-RTT support |
| Reliable Channel | QUIC bidirectional streams | FishNet Channel 0 (game state, RPCs, broadcasts) |
| Unreliable Channel | QUIC DATAGRAM frames (RFC 9221) | FishNet Channel 1 (position updates, snapshots) |
| WebGL/Browser | Browser WebTransport API → HTTP/3 | Native browser QUIC without plugin |
| Reverse Proxy | NGINX L4 UDP stream + L7 HTTP | L7: TLS termination for HTTP APIs. L4: zero-copy UDP forwarding (no TLS termination for game traffic) |
| HTTP TLS | TLS 1.2/1.3 terminated by NGINX | NGINX handles HTTPS for api.fishmmo.com and play.fishmmo.com |
| Game TLS | QUIC/TLS 1.3 terminated by each game server | NGINX cannot terminate QUIC TLS — raw UDP packets pass through unmodified. Each game server must have certificates configured |
Default Architecture: Loopback + NGINX Reverse Proxy
All backend servers (LoginServer, WorldServer, SceneServer, IPFetch, Patcher, WebGL) are configured to bind to 127.0.0.1 (loopback) by default. NGINX acts as the sole public-facing reverse proxy, forwarding traffic to these loopback-bound upstream servers. This is a deliberate security posture:
- Backend servers are never directly exposed to the internet — only NGINX ports 80 and 443 (and UDP 7770-7999 via the stream module) are public.
- NGINX handles TLS for HTTP APIs (api.fishmmo.com, play.fishmmo.com) at Layer 7.
- NGINX does NOT terminate TLS for game traffic. QUIC/WebTransport uses UDP at Layer 4 — NGINX forwards raw encrypted QUIC packets without inspecting them. Each game server must have valid TLS certificates configured in its
.cfgfile (CertificatePath/PrivateKeyPath) because it terminates its own QUIC/TLS session. There is no way for NGINX to do this on the game server's behalf. - The real client IP is recovered via a one-time connection token from the HTTP API, since game servers only see NGINX's loopback address.
When to bind to 0.0.0.0 or a specific IP: Only when a backend server runs on a different machine than NGINX. In that case, change the Address in the server's .cfg file (or the BACKEND_IP env var for stream config generation) to the server's network-facing IP, and ensure NGINX's proxy_pass targets that IP instead of 127.0.0.1.
For the complete end-to-end connection flow, see CONNECTION_PIPELINE.md. For server startup, see SERVER_INITIALIZATION_ORDER.md.
Supported Platforms
| Platform | Client | Server |
|---|---|---|
| Windows 10/11 | Yes | Yes |
| Linux (Ubuntu/Debian, Arch/CachyOS) | Yes | Yes |
| macOS | Yes | Yes |
| WebGL | Yes (via browser WebTransport) | N/A |
| Requirement | Version |
|---|---|
| Unity | 6.6 (6000.6.8f1) |
| .NET SDK | 8.0+ |
| PostgreSQL | 14+ |
| CMake | 3.20+ (for WebTransport C++ library) |
| C++ Compiler | GCC 9+/Clang 10+/MSVC 2022+ (C11/C++17) |
| Scripting Backend | IL2CPP |
Prerequisites
- Git for cloning the repository
- .NET 8.0 SDK
- Unity Hub with Unity 6.6 (6000.6.8f1) (the installer can install these for you)
- CMake 3.20+ and a C++17 compiler (for building the WebTransport native library)
- OpenSSL 3+ development headers (libssl-dev / openssl-devel)
- PostgreSQL 14+ (the installer can install this for you)
- Administrator/root privileges for system-level installs
- Internet connectivity
Note: The C++ WebTransport library links statically against msquic (fetched automatically by CMake), so you do not need to install msquic separately. OpenSSL is the only system-level dependency needed beyond a C++ compiler.
Installation Guide
1. Clone the Repository
git clone https://github.com/jimdroberts/FishMMO.git
cd FishMMO
Tip: Use the
devbranch if it is more up-to-date thanmain:git checkout dev
2. Build the FishMMO-Installer
The FishMMO-Installer is the recommended way to set up all dependencies. It automates installing .NET, PostgreSQL, NGINX, PgBouncer, Unity Hub, building all C# projects, and setting up the database.
cd FishMMO-Installer
dotnet build
dotnet run --project FishMMO-Installer
Or run the compiled binary directly:
- Windows:
Builds\FishMMO-Installer\Debug\net8.0\FishMMO-Installer.exe - Linux:
./Builds/FishMMO-Installer/Debug/net8.0/FishMMO-Installer
Windows: Run from an elevated PowerShell (Administrator) for system-level installs. Linux: You will be prompted for
sudowhen needed.
3. Run the Installer
The installer supports two modes: interactive menu (default) and CLI-driven (for headless/automated deployment).
Interactive Menu Mode (default)
Run with no arguments to enter the menu:
=== FishMMO Installer ===
1 : Runtime & Tooling — .NET EF Tool, ASP.NET Runtime, VS Build Tools
2 : Database — PostgreSQL, PgBouncer, DB management
3 : Web Server — NGINX, Let's Encrypt SSL, Firewall, Services
4 : Unity & Build — Unity Hub, Unity Editor, C# project builds
5 : Configuration — appsettings.json, secrets & environment
6 : Uninstall — remove PostgreSQL or the secrets file
0 : Quit
Sub-Menu: Runtime & Tooling
1 : Install DotNet EF Tool (dotnet-ef)
2 : Install ASP.NET Runtime
3 : Install Visual Studio Build Tools (Windows Only)
0 : Back
Sub-Menu: Database
1 : Configure Secrets & Environment (database, mail, service — one file)
2 : Install PostgreSQL
3 : Install PgBouncer (Connection Pooler)
4 : Install FishMMO Database (User/Schema/Initial Migration)
5 : Create New Database Migration
6 : Grant User Permissions on Database
7 : Delete FishMMO Database (DANGEROUS!)
8 : Configure PgBouncer (generate pgbouncer.ini + userlist.txt, Linux)
9 : Configure Server Keys (gate secret, HMAC key, KEK → database)
A : Create Admin Account (Control Panel sign-in, two-factor; needs 9 first)
0 : Back
Sub-Menu: Web Server
1 : Install NGINX (Web Server/Reverse Proxy)
2 : Install/Renew Let's Encrypt Certificate (NGINX)
3 : Deploy FishMMO nginx.conf (from FishMMO-Setup/)
4 : Configure Firewall Rules (open 443/tcp, 7770-7999/udp)
5 : Register FishMMO Web Servers as Services
6 : Install/Renew Local Development Certificates (Linux)
7 : Point DNS Records at This Host (Porkbun)
0 : Back
- 1 also installs the NGINX stream module (
nginx-mod-stream/libnginx-mod-stream), which forwards the game's UDP ports. - 2 asks which challenge to use. On Linux, DNS through the Porkbun API (the default) needs no open port 80 and no nginx yet, and issues one wildcard certificate (
example.com+*.example.com) for every host. HTTP needs nginx already serving/.well-known/acme-challenge/on port 80 and every host name listed. Both issue with--reuse-key(see Client TLS Certificate Pinning), copy the certificate to the game servers and install the renewal hook and timer — see TLS Certificates. - 3 asks for your root domain and substitutes it for the template's
fishmmo.com, then for the LAN address NGINX listens on for the UDP game ports (default: this machine's address on the default route, e.g.192.168.1.2). That must be the address the router forwards UDP 7770-7999 to, and it must stay fixed (static address or DHCP reservation). It cannot be0.0.0.0: the game servers use the same port numbers on127.0.0.1, which0.0.0.0includes. It refuses to run until the certificate exists, installs the stream module if missing, raises NGINX's open-file limit, runsgen-fishmmo-stream-config.shwith that address, restarts NGINX and checks UDP 7770 is listening. - 6 issues a 13-day
localhostcertificate from a local development CA, for running everything on one machine without a domain. It is never needed for a public deployment, and option 2 retires it. - 7 creates or updates the
Arecordsapi,play,gameandpanel(or names you give) at Porkbun with this server's public IPv4 address (detected through Porkbun, or entered), using the API keys stored by option 2. It shows the planned changes and asks before applying; the bare domain,wwwand all other records are left alone, and a name that is aCNAMEis reported rather than changed. The same command,sudo /etc/letsencrypt/fishmmo-porkbun-hook.py records, can run on a timer to follow a changing home IP.
Sub-Menu: Unity & Build
1 : Install Unity Hub
2 : Install Unity Editor (+Modules)
3 : Build all C# Projects
4 : Build FishMMO-Unity (Client/Server/Addressables)
0 : Back
Sub-Menu: Configuration
1 : Configure Web Server Settings (IPFetch, Patcher, WebGL, Control Panel)
2 : Configure Discord Bot Settings
3 : Configure Secrets & Environment (database, mail, service — one file)
0 : Back
Sub-Menu: Uninstall
1 : Uninstall PostgreSQL completely (DELETES EVERY ACCOUNT AND CHARACTER!)
2 : Delete Secrets & Environment File (every FishMMO process loses its credentials)
0 : Back
CLI / Non-Interactive Mode
For headless servers and CI/CD pipelines, use CLI arguments:
# Show help
FishMMO-Installer --help
# Show version
FishMMO-Installer --version
# Install a single component
FishMMO-Installer --component postgresql
# Run health checks on all installed components
FishMMO-Installer --validate
# Simulate without making changes
FishMMO-Installer --dry-run --component nginx
# Unattended installation from a config file (-f is an alias for --config)
FishMMO-Installer --non-interactive -f install-config.json
# Unattended install using the bundled quickstart template
FishMMO-Installer --quickstart
# Other flags
FishMMO-Installer --list-components # Print component names and exit
FishMMO-Installer --accept-defaults # (-y / --yes) Skip confirmation prompts
FishMMO-Installer --generate-checksums # Generate SHA256 hashes for downloaded files
FishMMO-Installer --log-file /path/to.log # Tee log output to a file
install-config.json format:
{
"components": ["dotnet-sdk", "postgresql", "nginx", "firewall", "systemd-services"],
"configureFirewall": true,
"firewallPorts": [443, "7770-7999/udp"],
"registerSystemdServices": true,
"validateAfterInstall": true
}
firewallPorts entries are either a bare port number (TCP) or a string with an optional range and protocol: 443, "443/tcp", "7770-7999/udp". Ranges are inclusive and the protocol defaults to tcp when omitted.
Available component names for CLI use (--list-components prints this list):
dotnet-ef, aspnet-runtime, vs-build-tools, postgresql, pgbouncer, fishmmo-db, nginx, letsencrypt, dev-certificates, unity-hub, unity-editor, build-projects, build-unity, appsettings, create-migration, firewall, systemd-services, all
dev-certificates is deliberately excluded from all. There is no component for Deploy FishMMO nginx.conf; use the menu (Web Server → 3).
Pre-flight checks automatically run before any CLI-mode installation, verifying internet connectivity, disk space, memory, admin/sudo access, and port conflicts.
Download integrity: Downloaded files are verified against SHA256 checksums in
checksums.json. Corrupt or tampered downloads are rejected.
Pre-built Install Config Templates
FishMMO-Setup/Development/ includes three ready-to-use install configs:
| Template | Purpose |
|---|---|
install-config.quickstart.json |
Minimal dev setup (postgresql, fishmmo-db, nginx, firewall) |
install-config.web.json |
Web server setup (postgresql, fishmmo-db, nginx, letsencrypt, firewall, systemd-services) |
install-config.full.json |
Complete production setup (all components including UDP game port firewall rules) |
The full template maps to:
{
"components": ["dotnet-ef", "aspnet-runtime", "postgresql", "pgbouncer",
"fishmmo-db", "nginx", "letsencrypt", "firewall", "systemd-services", "appsettings"],
"configureFirewall": true,
"firewallPorts": [443, "7770-7999/udp"],
"registerSystemdServices": true,
"webServers": ["ipfetch", "patcher", "webgl", "controlpanel"],
"validateAfterInstall": true
}
Recommended Installation Order (Fresh Setup)
| Step | Menu | Action | Windows | Linux |
|---|---|---|---|---|
| 1 | Runtime & Tooling | Install DotNet EF Tool | Yes | Yes |
| 2 | Runtime & Tooling | Install ASP.NET Runtime | Yes | Yes |
| 3 | Runtime & Tooling | Install VS Build Tools | Yes | (skip) |
| 4 | Unity & Build | Build all C# Projects | Yes | Yes |
| 5 | Unity & Build | Install Unity Hub | Yes | Yes |
| 6 | Unity & Build | Install Unity Editor (+Modules) | Yes | Yes |
| 7 | Database | Configure Secrets & Environment (DB credentials) | Yes | Yes |
| 8 | Database | Install PostgreSQL | Yes | Yes |
| 9 | Database | Install FishMMO Database | Yes | Yes |
| 10 | Database | Install PgBouncer | Yes | Yes |
| 11 | Database | Configure PgBouncer | (manual) | Yes |
| 12 | Database | Configure Server Keys (REQUIRED) | Yes | Yes |
| 13 | Web Server | Install NGINX (with the stream module) | Yes | Yes |
| 14 | Web Server | Install/Renew Let's Encrypt Certificate (before step 15) | Optional | Yes, for a public server |
| 15 | Web Server | Deploy FishMMO nginx.conf (asks for your domain) | Yes | Yes |
| 16 | Web Server | Configure Firewall Rules | Yes | Yes |
| 17 | Web Server | Register FishMMO Web Services | Optional | Yes |
| 18 | Configuration | Configure Web Server Settings | Yes | Yes |
The certificate comes before the nginx config (steps 14 → 15). Every HTTPS server block in
nginx.confnames the certificate, songinx -tcannot pass until it exists, and the deploy step refuses to run without it. On Linux the DNS challenge (the default) needs no nginx and no open port 80, so nothing has to be bootstrapped. The HTTP challenge needs nginx answering on port 80 first; see TLS Certificates."Configure Server Keys" (step 12) is required. Without the gate secret, KEK, and connection token HMAC key in the database, game servers and web servers will refuse to start. This step runs
SecurityKeyInstallerwhich generates all three keys and stores them in thedeployment_secretsandconnection_token_keystables.After the Installer, open Unity and run these Editor tools (see Unity Project Setup):
- FishMMO Dashboard → Game Settings → Client Secret — pulls the gate secret from the database and writes
ClientApiSecret.generated.cs- FishMMO Dashboard → Game Settings → Certificate Pins — connects to your live hosts and writes
CertificatePins.generated.cs"Build all C# Projects" discovers and builds all
.csprojfiles under the repository root, including:
FishMMO-Dependencies— resolves 43 NuGet packages and copies their DLLs intoFishMMO-Unity/Assets/Dependencies/FishMMO-Auth— authentication library (copies DLL to Unity Dependencies)FishMMO-Database/FishMMO-DB— database libraryFishMMO-Logger— logging library (copies DLL to Unity Dependencies)FishMMO-SharedUtility— shared utility library (copies DLL to Unity Dependencies)FishMMO-WebServers/IPFetchASP.NET— login server discovery APIFishMMO-WebServers/PatcherASP.NET— patch delivery serverFishMMO-WebServers/WebGLServerASP.NET— WebGL static file serverFishMMO-WebServers/FishMMO-ControlPanel— operator and player-services dashboardFishMMO-AppHealthMonitor— server health monitor daemonFishMMO-DiscordBot— Discord chat bridge bot
4. Build the WebTransport C++ Library
The WebTransport native library (libfishmmo_webtransport) is a C++ shared library that wraps Microsoft's MsQuic QUIC implementation. It is P/Invoked from C# as FishNet's transport plugin. This must be built before running the game server — the Unity project expects the native binary at Assets/Plugins/FishNet/Plugins/WebTransport/Plugins/{platform}/.
Linux (Native Build)
Prerequisites:
# Arch / CachyOS
sudo pacman -S cmake openssl gcc
# Ubuntu / Debian
sudo apt-get install cmake libssl-dev build-essential
# Fedora
sudo dnf install cmake openssl-devel gcc-c++
Build:
cd FishMMO-WebTransport
./build_linux.sh
Output: libfishmmo_webtransport.so placed directly into ../FishMMO-Unity/Assets/Plugins/FishNet/Plugins/WebTransport/Plugins/linux_x86_64/
No native binary is tracked for any platform (the plugin subdirectories are gitignored), so this step is required on Linux too, on a fresh clone as much as on a deployment server. After a pull that changes
FishMMO-WebTransport/src/, rebuild: the transport checks the library's ABI version at start-up and refuses a stale one with the rebuild command in the log.
Windows (Native Build)
Prerequisites (default):
- Visual Studio 2022+ with the C++ desktop workload — nothing else
Build:
cd FishMMO-WebTransport
.\build_windows.ps1
The default build compiles only the wrapper sources against the prebuilt
Microsoft.Native.Quic.MsQuic.OpenSSL NuGet package, whose msquic.dll has quictls built in.
That is the flavour that loads the PEM certificate/key files the server configs point at
(CertificatePath / PrivateKeyPath). msquic's Schannel flavour cannot (it reads the Windows
certificate store only), so it is not a server option; -Tls Schannel exists for client-only builds.
Output: fishmmo_webtransport.dll + msquic.dll in .../Plugins/windows_x86_64/
Optional static build (.\build_windows.ps1 -Static) fetches and builds msquic + quictls with
CMake 3.20+ (winget install Kitware.CMake; Ninja recommended) and needs an OpenSSL install for the
configure step (vcpkg install openssl:x64-windows). It produces a single self-contained
fishmmo_webtransport.dll and is slow the first time.
Windows Cross-Compile from Linux (Zig)
If you develop on Linux but need a Windows .dll for client builds:
Prerequisites:
# Arch / CachyOS
sudo pacman -S zig
# Or download from https://ziglang.org/download/
Build:
cd FishMMO-WebTransport
./build_windows_cross.sh
This script:
- Downloads the OpenSSL flavour of the msquic NuGet package (
Microsoft.Native.Quic.MsQuic.OpenSSL/2.5.9) — the one that loads PEM certificates - Extracts headers and DLL from the NuGet package
- Compiles all
.cppfiles withzig c++ -target x86_64-windows-gnu - Links into a DLL importing
msquic.dll - Copies both
fishmmo_webtransport.dllandmsquic.dllto the Unity plugins directory (the same pair the default native build produces; only-Staticfolds msquic into a single DLL)
macOS (Native Build)
Must be built on a Mac:
brew install cmake openssl@3
cd FishMMO-WebTransport
./build_macos.sh
Output: libfishmmo_webtransport.dylib in .../Plugins/mac_x86_64/
What CMake Does
The CMakeLists.txt:
- Fetches msquic v2.5.9 from GitHub (
FetchContent) and statically links it - Uses
quictls(OpenSSL fork) as msquic's TLS backend - Finds system OpenSSL because msquic's
quictlsbuild requires it at configure time — the wrapper itself never calls OpenSSL directly, and withWT_STATIC_MSQUIC=ONit does not link the system OpenSSL either (TLS comes from the quictls copy inside msquic) - Compiles 7
.cppsource files (server, client, session, stream_manager, datagram_queue, http3, webtransport_api) - Outputs the shared library directly to the Unity project's Plugins directory
Build Options
| CMake Option | Default | Description |
|---|---|---|
BUILD_SHARED_LIBS |
ON | Build as shared library (.so/.dylib/.dll) |
WT_STATIC_MSQUIC |
ON | Statically link msquic (recommended) |
WT_BUILD_TESTS |
OFF | Build test programs |
5. Open the Unity Project
After building all C# projects and the WebTransport native library, open the Unity project:
- Open Unity Hub
- Click ADD → Select the
FishMMO-Unitydirectory - Open the project with Unity 6.6 (6000.6.8f1)
- Wait for the initial asset import and script compilation to complete
- Follow the Unity Project Setup section below
Database Setup
The FishMMO-Installer automates database creation (Database menu, option 4 — Install FishMMO Database), but here is what happens under the hood:
- PostgreSQL Installation — The installer installs PostgreSQL via your platform's package manager (option
2). - Database + User Creation — Creates the
fishmmodatabase and a dedicatedfishmmouser role (option4). - EF Core Migration — Creates and applies an initial Entity Framework Core migration (option
4). - Permissions — Grants the user full privileges on the
publicschema (options4and6).
Manual Database Setup (Without the Installer)
If you prefer to set up the database manually:
# Linux — become the postgres user
sudo -u postgres psql
CREATE USER fishmmo WITH PASSWORD 'your_secure_password';
CREATE DATABASE fishmmo OWNER fishmmo;
GRANT ALL PRIVILEGES ON DATABASE fishmmo TO fishmmo;
\c fishmmo
GRANT ALL ON SCHEMA public TO fishmmo;
Then apply the EF Core migrations:
cd FishMMO-Database/FishMMO-DB-Migrator
dotnet run
Starting Fresh (Dropping the Database)
To discard every account, character and key and rebuild the schema from the current entity model (for example before a launch):
- Stop everything that connects: game servers, web servers, the Control Panel, the AppHealthMonitor and Discord bot, and Unity Play Mode.
DROP DATABASErefuses while sessions are open. - Empty
Migrations/at the repository root (it is gitignored, so nothing tracked is lost). The next step only scaffolds a newInitialmigration when that folder is empty; otherwise it applies whatever chain is there, which may no longer match the model. - Installer → Database → 7 — Delete FishMMO Database. Needs the PostgreSQL superuser password; type
DELETEto confirm. The application role and PgBouncer's auth file are left alone. - Installer → Database → 4 — Install FishMMO Database. Scaffolds
Initialfrom the current model and applies it as the superuser. - Installer → Database → 9 — Configure Server Keys. A new database has no gate secret, KEK or connection-token key, and every server refuses to start without them.
- Unity → FishMMO Dashboard → Game Settings → Client Secret → Fetch from Database, then Write Secret to File. The gate secret changed, so regenerate
ClientApiSecret.generated.csand rebuild every client; an old client is refused by IPFetch and the Patcher (401, "signature mismatch" in their log). - Installer → Database → A — Create Admin Account. See Closed Beta: First Administrator and Beta Codes.
Creating New Migrations
When your data model changes, create a new migration via the Installer (Database menu, option 5 — Create New Database Migration) or manually:
cd FishMMO-Database/FishMMO-DB
dotnet ef migrations add YourMigrationName \
--startup-project ../FishMMO-DB-Migrator \
--output-dir ../../Migrations
# The scaffolder writes the model snapshot to the project default rather than
# --output-dir, where the SDK glob also compiles it — move it and remove the folder.
mv Migrations/NpgsqlDbContextModelSnapshot.cs ../../Migrations/
rmdir Migrations
cd ../FishMMO-DB-Migrator
dotnet run
Three things about this are not obvious:
--startup-projectis mandatory.FishMMO-DBtargetsnetstandard2.1, which has no runtime, so the EF tooling refuses to run against it alone.FishMMO-DB-Migratoris the only executable project that references it.- Migrations live at the monorepo root, in
Migrations/, which is.gitignored and compiled intoFishMMO-DBvia<Compile Include="..\..\Migrations\*.cs" />. Hence--output-dir ../../Migrationsand the snapshot move above. - Review the scaffold before running it. The model currently carries two pre-existing drifts (
character_pet.abilitiesandcharacter_abilities.ability_eventsaretextin the database butList<int>in the model) that every new migration re-scaffolds as a destructiveALTER … TYPE integer[]. Strip those fromUpandDownunless you are deliberately converting them.
To review the generated SQL without touching a database — dotnet ef database update ignores FISHMMO_CONNECTION_STRING and resolves the design-time factory, which points at your live local database:
dotnet ef migrations script PreviousMigration YourMigrationName \
--startup-project ../FishMMO-DB-Migrator --idempotent
Database Configuration
Environment-based overrides: The database library supports layered configuration in this priority order:
appsettings.json(required)appsettings.{Environment}.json(optional — e.g.,appsettings.Development.json)- Environment variables (highest priority, use
__for nesting)
Set the environment via FISHMMO_ENVIRONMENT (preferred), DOTNET_ENVIRONMENT, or ASPNETCORE_ENVIRONMENT.
Environment variable overrides for database credentials:
DB credentials are resolved by the DatabaseSecrets class, checking environment variables first, then the platform secrets file (/etc/fishmmo/db-secrets.env on Linux, %ProgramData%\FishMMO\db-secrets.env on Windows):
| Variable | Maps To |
|---|---|
FISHMMO_ENVIRONMENT |
Environment name (Development, Production) |
FISHMMO_DB_HOST |
PostgreSQL host |
FISHMMO_DB_PORT |
PostgreSQL port |
FISHMMO_DB_NAME |
Database name |
FISHMMO_DB_USERNAME |
Database user |
FISHMMO_DB_PASSWORD |
Database password |
Example (fish shell):
set -Ux FISHMMO_ENVIRONMENT Production
set -Ux FISHMMO_DB_PASSWORD super_secret
Example (bash):
export FISHMMO_ENVIRONMENT=Production
export FISHMMO_DB_PASSWORD=super_secret
Every timestamp is stored in UTC. The timestamp columns are timestamp without time zone, and CURRENT_TIMESTAMP is a timestamptz — assigning it converts to the session's time zone, so on any server not running in UTC the value written was local time while everything reading it compared against DateTime.UtcNow. Every default and every raw-SQL write now uses timezone('UTC', CURRENT_TIMESTAMP) instead. This matters most for last_pulse: the liveness query already compared in UTC, so a non-UTC database made servers appear stale or fresh by exactly the UTC offset.
Rows written before this change keep whatever offset they were written with.
last_pulsecorrects itself on the next heartbeat; historicaltime_createdvalues do not.
Unapplied migrations are caught at startup. Migrations are generated per developer and applied locally rather than shared through source control, so pulling someone else's entity change brings no migration with it and nothing applies one on your behalf — the server starts and authenticates perfectly, and the mismatch surfaces much later as a query failing on a column that does not exist, which typically reaches a player as missing data rather than as a schema problem. NpgsqlDbContextFactory.ValidateSchemaAsync reports what it finds and Server.VerifyDatabaseSchema logs it with the command that fixes it:
| State | Meaning | Startup | Fix |
|---|---|---|---|
| Pending migrations | Migrations exist that this database has not run | Refused | dotnet ef database update |
| Check unavailable | The migration history could not be read at all | Proceeds, warns | Depends on the reason logged |
Pending migrations are fatal on purpose. A server running against a database that is behind the migration set does not fail loudly — it fails as missing player data, and every write it accepts meanwhile is made against a schema the model does not agree with. A check that could not run at all is only a warning: that leaves the schema unverified rather than known-bad, and a failed diagnostic should not take down a server that is otherwise fine. The check runs concurrently with behaviour initialization and is joined just before the transport opens, so it costs no startup latency.
Model drift is not detected. An entity changed with no migration generated for it leaves nothing pending, so this check passes and the schema is quietly wrong. A drift check lived here and never worked once — EF builds
ModelSnapshot.Modelwith an empty convention set, so the relational model its differ needs is never attached and the comparison threw on every startup. EF Core 5 exposes no supported way to rebuild it at runtime, so the check was removed rather than left reporting a failure forever (#162). Generate a migration whenever you change an entity — nothing will remind you. Catching this properly belongs in CI, where the design-time package is available and a scaffolded migration can be asserted empty.
Unity Project Setup
Client Security Setup (REQUIRED before building)
Before building the client, you must generate two security files from within Unity. Both live in the FishMMO Dashboard → Game Settings panel (FishMMO → FishMMO Dashboard, Ctrl+Shift+D), alongside the Host Configuration and Constants sections.
1. Client Secret (Game Settings → Client Secret section)
- Reads the gate secret from the
deployment_secretsdatabase table - Writes
ClientApiSecret.generated.cs— the shared secret forX-FishMMO-ClientHMAC header signing - Requires database access (uses the same
FISHMMO_DB_*credentials) - Run once per deployment or when the gate secret is rotated
2. Certificate Pins (Game Settings → Certificate Pins section)
- Fetch Pins connects to your live hosts over TLS to download leaf certificates; Write Pins to File then saves them
- Computes SHA-256 SPKI hashes and writes
CertificatePins.generated.cs - Minimum 2 pins (active + backup) required for release builds
- Only hosts serving HTTPS on port 443 work — QUIC-only game hostnames will fail, so pin the API/IPFetch/play hosts
- Run whenever TLS certificates are renewed with new key pairs
Without these files, release client builds will fail. The build validator blocks any build with missing or sentinel-placeholder values. Development builds are exempt.
Build World Scene Details
This caches important game world details (spawn points, teleporters, boundaries, scene metadata) for both clients and servers. Run this whenever you add or modify a scene.
FishMMO Dashboard (FishMMO → FishMMO Dashboard, Ctrl+Shift+D): World → World Scene Details → Rebuild World Scene Details
This generates WorldSceneDetailsCache assets that are loaded at runtime by the WorldServer and SceneServer for scene routing and character placement.
World map bake. FishMMO Dashboard → World → World Map → Bake Maps renders a map definition and image for every
world scene, replacing what is there, and FishMMO Dashboard → World → World Map → Remove Baked Maps deletes them
again. A client Addressables build bakes only the scenes whose map is missing or older than the scene file, rebuilds the world scene details cache so
it references the baked definitions, builds the bundles, then removes the addressable group and rebuilds the cache
without the references. The maps stay for the next build. Server builds skip all of it — a server never draws a
map. A bake that fails is logged as a warning and does not fail the build; the world map simply
falls back to a plain background without its image.
Everything the bake produces is a per-machine cache and is gitignored — Assets/Generated/,
Assets/AddressableAssetsData/AssetGroups/ClientWorldMaps.asset* and their
Schemas/ClientWorldMaps_* — so a bake must never be committed. If an interrupted client build leaves the
committed cache pointing at a bake, WorldMapDefinitionTests.TheCommittedCache_CarriesNoBakeLeftovers
fails; run FishMMO Dashboard → World → World Scene Details → Rebuild World Scene Details.
Versioning
Manage the project's semantic versioning from the FishMMO Dashboard.
Unity Menu: FishMMO → FishMMO Dashboard (Ctrl+Shift+D) → Select Version in the Core category
The Version panel provides:
| Control | Effect |
|---|---|
| Increment Major | Major++, resets Minor and Patch to 0 |
| Increment Minor | Minor++, resets Patch to 0 |
| Increment Patch | Patch++ |
| Pre-Release Tag | Free-text tag (e.g., alpha, beta, rc1) appended to the version |
| Reset to 0.0.0 | Resets all version fields to zero (with confirmation) |
The panel also shows the current full version, asset path, and Addressable registration status. The VersionConfig.asset is automatically registered as an Addressable under the Shared_Static_Permanent group and label. The final version is written to version.txt in the build output directory during the build process.
FishMMO Builds
Use the FishMMO Dashboard to configure and execute builds.
Unity Menu: FishMMO → FishMMO Dashboard (Ctrl+Shift+D) → Select Build in the Core category
The Build panel provides:
Configuration:
| Setting | Options | Description |
|---|---|---|
| Build Type | Server / Client | Selects which executable to build |
| OS Target | Windows x64 / Linux x64 / WebGL | Target platform for the build |
| Environment | Development / Production | Controls .cfg and appsettings.json copy source and loopback binding |
Actions:
| Button | Description |
|---|---|
| Apply Platform Settings | Switches the Unity Editor to the selected build target |
| Build Addressables | Builds all Addressable asset bundles required by client and server |
| Build Game | Executes the build for the selected Build Type, OS Target, and Environment |
| Update Linker | Regenerates the IL2CPP link.xml file |
The Dashboard also shows the current build settings, active build target, and background task progress (compilation, asset import).
Build Settings via Menu: Individual build settings can also be changed via FishMMO → Build → Build Type, FishMMO → Build → OS Target, and FishMMO → Build → Environment.
Build Environments:
| Environment | Address Binding | Use Case |
|---|---|---|
| Development | 127.0.0.1 (loopback) |
Local testing — all servers on the same machine |
| Production | Configurable via .cfg files |
Production deployment — default is 127.0.0.1 (behind NGINX); change to server's network IP only if NGINX is on a separate machine |
The build process copies the appropriate .cfg and appsettings.json files from FishMMO-Setup/Development/ or FishMMO-Setup/Production/ into the build output.
Important: Build Addressables first, then build the game. The game build depends on the Addressable bundles produced in the first step.
Client Addressables builds bake the world maps before building bundles and remove them afterwards — see Build World Scene Details. Server builds do neither.
How Addressables content is organized. The committed groups hold only what the game asks for by name, and every build works out the rest itself.
- Entries are roots: scenes, the permanent label sets (
Shared_Static_Permanent— templates and shared prefabs, constant data both sides load at launch;Client_Static_Permanent— shaders, fonts, UI;Server_Static_Permanent— NavMeshes and server catalogues), AssetReference targets, and assets loaded by address. A scene's own content (prop prefabs, look materials and textures, terrain chunks, details) is not an entry: it travels in the scene's bundle and loads and unloads with the scene. Generating a scene registers only the scene, its NavMesh and any AssetReference targets. - Duplicates are isolated at build time. Before bundling, the build simulates itself (
AddressablesBuildPlan: which groups it includes — server builds drop everyClientgroup, client builds everyServergroup — and how each group splits into bundles; PackSeparately is one bundle per entry). Every implicit dependency two or more bundles would each copy is registered in the temporaryBuild_Shared_Dependenciesgroup, packed by the set of bundles that use it, and removed after the build (gitignored, likeGenerated_Biome_Art). - The server ships nothing visual. Server content builds remove materials, shaders, image textures, sprites and fonts (
ServerContentPacking); meshes, TerrainData (with its control maps), TerrainLayers, animation, NavMesh and gameplay data stay. A server build of 34 GB on 2026-11-06 was 46 GB (uncompressed) of look textures copied into hundreds of scene bundles; this is what removes them. - Addressables Dashboard: Analyze simulates the client and the server build and reports, per build, entries, bundles and shared dependencies, plus AssetReference targets that are not addressable (they fail at run time), redundant entries, label mismatches, address collisions and stale entries. Only missing AssetReference targets, collisions and stale entries block Build. Fix All registers missing AssetReference targets, corrects labels and resolves collisions. Smart Group routes prefabs, assets and scenes (never materials, textures or models — they travel with what uses them), routes the Default Group's project assets, and offers to remove redundant entries.
Headless builds and the build-target switch. A CLI build (-batchmode -executeMethod) that has to switch build target used to be rejected for running while scripts were compiling, producing no artifact — and re-running the identical command immediately afterwards succeeded, because by then the target already matched and no switch happened. SwitchActiveBuildTarget is synchronous and already recompiles for the new target, and the AssetDatabase.Refresh(ForceUpdate) that follows settles the define symbols; the extra ForceEditorScriptRecompile on top of that queued a further compile, and under -executeMethod nothing turns the editor loop over until the method returns, so it stayed pending for the rest of the invocation. That recompile is now skipped in batch mode — interactive Dashboard builds keep it, where the editor loop can service it. RunCliBuild also fails fast, naming the reason, if scripts somehow are still compiling: nothing on that thread can advance a pending compile in batch mode, so waiting cannot help and sleeping would block the very thread that runs compilation.
A batch-mode build never reports success without a player. The two failure modes above were both silent in the same way, and the shared guard that starts every build could still reproduce it: when scripts are compiling, CustomBuildTool declines to start and returns. Interactively that is right — it warns, offers a dialog, and the player tries again. Under -batchmode nothing services the pending compile and nothing surfaces the warning, so the process exited 0 having produced no player, while Addressables had already run and written real bundles; the output directory still held the previous build, and the only way to notice was to compare a timestamp. Adding a single editor script is enough to trigger it, because the recompile outlives the Addressables step and the guard then fires. In batch mode that path now logs an error naming the cause and exits 1.
Headless builds need an explicit output path. BuildExecutor falls back to EditorUtility.SaveFolderPanel when it is not given a root path, and under -batchmode that returns an empty string and cancels the player build — while Addressables has already run and written real bundles, and the process still exits 0. The result is a build that reports success and produces no player. RunCliBuild therefore resolves an output path before building: -fishmmoOutputPath <dir> when supplied, otherwise Builds/Server or Builds/Client (chosen by the entry point invoked) in the parent of the editor's working directory — the repository root when Unity is launched from FishMMO-Unity/. Because that default depends on the working directory, CI should pass the path explicitly.
The CLI entry points are BuildClientCLI, BuildServerCLI, BuildAddressablesCLI, BuildClientWithAddressablesCLI and BuildServerWithAddressablesCLI on FishMMO.Shared.CustomBuildTool.Core.CustomBuildTool. OS target is read from -fishmmoOSTarget; -fishmmoBuildType applies only to BuildAddressablesCLI, which otherwise defaults to Client.
Unity -batchmode -quit -projectPath FishMMO-Unity \
-executeMethod FishMMO.Shared.CustomBuildTool.Core.CustomBuildTool.BuildServerWithAddressablesCLI \
-fishmmoOSTarget Linux -fishmmoOutputPath /srv/fishmmo/Builds/Server
Patching — PatchGenerator and Updater
PatchGenerator
A custom Unity Editor window for creating delta patches between game builds.
Unity Menu: FishMMO → FishMMO Dashboard (Ctrl+Shift+D) → Select Patch Generator in the Core category
- Select the new and old build directories.
- Configure options, exclusions, and version details.
- Click Generate Patch to create delta files and a manifest.
Patch files are ZIP archives named <from_version>-<to_version>.zip (e.g., 1.0.0-1.0.1.zip). This naming scheme is a contract between the generator, the patcher server's index, the launcher's download path (Constants.GetPatchFileName), and the Updater's lookup — changing it requires changing all four.
Updater
The FishMMO Updater is a standalone .NET 8 executable that applies one patch archive to the client. It is launched automatically by the game launcher.
Updater.exe -version=1.0.0 -latestversion=1.0.1 -pid=1234 -exe=FishMMOClient.exe [-patches=D:\FishMMO\Patches]
It looks for exactly one archive — {version}-{latestversion}.zip in the patches directory, by default Patches/ resolved relative to its own base directory — and applies it. -patches= overrides that directory and must be absolute; a relative, missing, or unreadable path is ignored with a warning and the default is used. The launcher applies the identical rule to its own Launcher.PatchDirectory setting and passes the resolved path here explicitly, so the two cannot disagree — and a disagreement is silent: the Updater finds no archive, does nothing, restarts the client at the same version, and the launcher detects the same mismatch again on the next run, forever. -patches changes only where a verified archive is read from; the launcher has already checked it against the server-supplied SHA-256 before the Updater is invoked at all, and it does not relocate the install. There is no multi-step chaining: if the server only publishes 1.0.0-1.0.1 and 1.0.1-1.0.2, a 1.0.0 client cannot reach 1.0.2 in one run. Publish a direct 1.0.0-1.0.2 patch for every version you intend to support upgrading from.
Behaviour:
| Aspect | Detail |
|---|---|
| Transaction | Per-file backup with full rollback on any critical failure; parallel file writes, sequential deletes and moves for finalization |
| Verification | SHA-256 hash verification on both sides of each diff |
| Archive lifecycle | Deleted after a successful apply; left in place after a failure so the same run can be retried without re-downloading |
| Exit code | Always 0. Failure is not signalled via exit code — by the time the Updater finishes, the launcher it was reporting to has already been killed by PID. Read its console output for the result |
| Launcher shutdown | Process.CloseMainWindow() on Windows; on Linux/macOS the Updater P/Invokes kill(pid, SIGTERM) from libc, because CloseMainWindow is Windows-only. A forced kill follows if the graceful request is not honoured |
| Restart | The client executable named by -exe is started again on every exit path, patched or not |
| Single writer | A lock file under the install root makes one updater the only process working on it. Two updaters over the same tree would interleave their moves, and each one's rollback would describe a state the other had already changed |
| Crash recovery | Every displaced or created file is recorded in an append-only journal inside the staging directory before the filesystem is touched, and the journal is fsynced so it survives a power loss. An updater that dies mid-apply leaves an install that is neither version; the next updater to run replays the journal and restores it before attempting anything else |
| Manifest checks | Refuses a manifest in which two entries write the same target path, and refuses an archive whose manifest describes a different upgrade than the one requested — the filename says {from}-{to}, but nothing had checked that the contents agreed |
| Permissions | Original POSIX permission bits are re-applied to each replacement, and a newly created file is detected as executable from its own content (ELF, Mach-O or shebang) rather than its extension. On Linux and macOS a patched binary that loses its executable bit is an install that no longer starts |
| Parallelism | Bounded to the machine's core count, so a large patch does not saturate the I/O queue of the disk it is rewriting |
The
Patchesdirectory name is a three-way contract: the Unity client resolves it viaConstants.Configuration.PatchesDirectoryName/Constants.GetPatchesDirectory(), the standalone Updater defaults to"Patches"(it cannot reference the Unity assembly), and the patch server reads it fromPatches:DirectoryNameinappsettings.Patcher.json. Change one, change all three. The player-facingLauncher.PatchDirectoryoverride sits on top of that default and is carried across the launcher → Updater handoff by-patches=, so overriding it does not require touching any of the three.
Patch Server
Build the PatcherASP.NET web server and place your generated patch .zip files in the directory named by Patches:DirectoryName (default Patches, resolved relative to the application base directory — the server refuses to start if it resolves outside). The files are indexed and hashed at startup, and only indexed files are reachable — no caller-controlled string is ever concatenated into a filesystem path.
| Route | Behaviour |
|---|---|
GET/HEAD /latest_version |
{ latest_version } |
GET/HEAD /latest_version?from={clientVersion} |
{ latest_version, up_to_date: true } when the client is current; { latest_version, patch_available: false } when no indexed patch upgrades that version; otherwise { latest_version, patch_available: true, sha256, size } so the launcher can verify the download |
GET /{version} |
Streams {version}-{latest}.zip as application/octet-stream (range requests enabled, rate-limited by the PatchDownload policy). Returns 204 No Content when the client is already current, and 404 when no patch path exists from that version |
Both /latest_version forms send a weak ETag, Cache-Control: public, max-age=30, and an X-FishMMO-Version-Signature HMAC over the manifest (signed with the shared gate secret, so a spoofed origin cannot forge a version answer). A matching If-None-Match short-circuits to 304. Download responses carry X-Patch-Sha256, X-Patch-Size, a strong ETag, and Cache-Control: public, max-age=3600, immutable.
Configuration
Constants.cs — Client Domains
The file FishMMO-Unity/Assets/FishMMO/Shared/Implementation/Constants.cs contains domain endpoints used by the client to connect to your infrastructure.
These values are not literals in Constants.cs — each one reads from HostConfig, a tracked class whose sentinel defaults are overridden by the gitignored, generated HostConfig.generated.cs (written by the dashboard, or substituted at build time by CI or the FishMMO-Installer). A fresh clone has no generated file and still compiles; the sentinel values are intentionally invalid, and the build validator blocks release builds that still contain them.
public static class Configuration
{
/// Unified API Host URL. NGINX routes to the correct backend by path.
public static readonly string APIHost = HostConfig.ApiHost;
/// Game server hostname. Clients connect to this host via QUIC/WebTransport (UDP).
/// NGINX forwards game traffic at Layer 4 to loopback-bound game servers.
public static readonly string GameHost = HostConfig.GameHost;
/// Launcher HTML/news page URL.
public static readonly string LauncherHtmlUrl = HostConfig.LauncherHtmlUrl;
}
| Field | HostConfig source |
Purpose |
|---|---|---|
APIHost |
ApiHost (CI: FISHMMO_API_HOST) |
Base URL for IPFetch and Patcher API calls — NGINX reverse-proxies to loopback web servers |
GameHost |
GameHost (CI: FISHMMO_GAME_HOST) |
Hostname for game QUIC/WebTransport connections — NGINX forwards UDP to loopback game servers |
LauncherHtmlUrl |
LauncherHtmlUrl (CI: FISHMMO_ROOT_DOMAIN) |
Page the launcher fetches its news panel from |
SmtpFromAddress / SmtpFromName |
SmtpFromAddress / SmtpFromName |
From-address and display name for verification emails |
Write these values from the Unity Editor via FishMMO Dashboard → Game Settings, which regenerates HostConfig.generated.cs. HostConfig also carries PlayHost (WebGL/player-facing hostname) and RootDomain (TLS certs and email).
For local development, point the hosts at
https://localhost/andlocalhost, or configure your hosts file. Prefer theGlobalSettingsoverride mechanism (seeApiHostResolver) over editing generated constants for one-off testing. When running without NGINX, setAPIHostto your web server's address directly andGameHostto the game server's address.
Server Configuration Files
Each server type reads a .cfg file from its working directory. Templates are in FishMMO-Setup/Development/ and FishMMO-Setup/Production/.
Only the templates under
FishMMO-Setup/are tracked. The.cfgfiles a server actually reads are per-deployment copies and are gitignored, so edits to them never reach source control — change the template, not the copy. In the Editor,Constants.GetWorkingDirectory()resolves to the repository root, so running a server from Play Mode dropsLoginServer.cfg,WorldServer.cfg, andSceneServer.cfgthere; the root.gitignoreexcludes those three paths by name. Runtimeappsettings.jsonfor the web servers is copied to$(OutDir)/$(PublishDir), both underBuilds/<project>/, which the root/Builds/ignore rule covers.
LoginServer.cfg
ServerName=LoginServer
MaximumClients=4000
Address=127.0.0.1
Port=7770
StaleSceneTimeout=5
CertificatePath=/etc/fishmmo/certs/fullchain.pem
PrivateKeyPath=/etc/fishmmo/certs/privkey.pem
WorldServer.cfg
ServerName=World Server
MaximumClients=4000
Address=127.0.0.1
Port=7780
StaleSceneTimeout=5
CertificatePath=/etc/fishmmo/certs/fullchain.pem
PrivateKeyPath=/etc/fishmmo/certs/privkey.pem
SceneServer.cfg
ServerName=Scene Server
MaximumClients=4000
Address=127.0.0.1
Port=7790
StaleSceneTimeout=5
StaleInstanceSceneTimeout=2
CertificatePath=/etc/fishmmo/certs/fullchain.pem
PrivateKeyPath=/etc/fishmmo/certs/privkey.pem
| Key | Description | Default |
|---|---|---|
ServerName |
Display name for logs and monitoring | varies |
MaximumClients |
Maximum concurrent connections | 4000 |
Address |
Bind address — 127.0.0.1 when behind NGINX (default); set to the server's network IP only if NGINX runs on a different machine |
127.0.0.1 |
Port |
Listen port (Login=7770, World=7780, Scene=7790+) | varies |
StaleSceneTimeout |
Minutes an empty open-world scene instance stays loaded before it is unloaded and its scene row deleted. SceneServer only. The templates ship 5; the code's fallback when the key is missing is also 5 |
5 |
StaleInstanceSceneTimeout |
Minutes an empty Group/PvP (instanced) scene stays loaded. Deliberately shorter than StaleSceneTimeout: a dungeon instance belongs to one character or party, so once it empties it is unlikely to be wanted again, while each one holds a full physics scene. Long enough to survive a wipe-and-run-back or a relog. SceneServer only; the code's fallback is 5 |
2 |
MaxInstanceLifetimeMinutes |
Minutes an instanced scene may exist before it is closed regardless of who is inside. SceneServer only. Measured from the scene row's creation, so it includes the time spent queued and loading. StaleInstanceSceneTimeout only ever reclaims an empty instance, so an occupied one had no upper bound at all — and since a party may hold only one instance at a time, a dungeon nobody finishes locks that party out of every other. Occupants are warned at 10 / 5 / 1 minutes and then returned to the open world through the ordinary leave-instance path. Open-world scenes are exempt. A dungeon difficulty that declares its own LifetimeMinutes overrides this for instances opened at it — a timed challenge is one of the few levers that changes how a dungeon plays without touching a number in combat — and this remains the backstop for everything that declares nothing. Not present in either template — it exists only as a code fallback, so add the key by hand to override it. Code's fallback when the key is missing is 120 |
120 |
CertificatePath |
PEM certificate for QUIC/TLS (game servers terminate their own TLS) | platform-dependent |
PrivateKeyPath |
PEM private key for QUIC/TLS | platform-dependent |
ConnectionTokenHmacKeyBase64 |
Leave empty. Loaded at runtime from the connection_token_keys database table |
empty |
AutoVerifyAccounts |
LoginServer only — skip email verification at account creation and at login (Development builds only, never in Production) | true (Dev) / false (Prod) |
AllowedOrigins |
LoginServer only — comma-separated CORS origins permitted for WebGL clients | https://play.fishmmo.com |
VerifyEmail / VerifySms / VerifyDiscord |
LoginServer only — which channels send an account-verification code. Any one code verifies. All three off verifies every account at creation (two-factor enrolment still happens). A missing value counts as true. Must match the Control Panel's Verification section |
Prod: false / false / false (admission is by beta code) |
BetaMode / BetaPrograms |
LoginServer only — closed test. With BetaMode=true, creating an account needs a beta code of one of BetaPrograms (comma-separated program keys), and sign-in refuses accounts below GameMaster that hold none. Staff are never refused. Must match the Control Panel's Beta section. See Closed Beta |
Prod: true / closed_beta; Dev: false |
Smtp:Host / Smtp:Port / Smtp:Username / Smtp:Password / Smtp:FromAddress / Smtp:FromName / Smtp:UseSsl / Smtp:DrainQueue |
LoginServer only — verification-email relay. The LoginServer only enqueues mail; the Control Panel sends it unless Smtp:DrainQueue=true. UseSsl=true performs STARTTLS on port 587; port 465 (implicit TLS) is not supported by this sender |
localhost / 587 / — / — / noreply@fishmmo.com / FishMMO / true (Dev: false) / false |
AuthMaxPendingConnections |
Connections allowed to be mid-authentication at once. On the LoginServer a handshake past it joins the login queue, so this is the queue's threshold; unset there, it is AuthSrpVerifyChannelCapacity + AuthSrpProofChannelCapacity. A player at the two-factor prompt does not count against it; the whole pending set, prompts included, is held to ten times the cap instead. Commented out in the templates |
1000 Login (500 + 500) / 10000 World, Scene |
AuthTwoFactorWindowSeconds |
LoginServer only — seconds a player has to answer each two-factor prompt before the connection is dropped. Clamped 30–600. Not in the templates | 120 |
LoginQueueUpdateRateSeconds |
LoginServer only — how often queued clients receive position updates | 2.0 |
LoginQueueMaxSize |
LoginServer only — queue capacity; excess clients are rejected outright | 500 |
LoginQueueAdmissionRatePerSecond |
LoginServer only — admission rate from the queue | 50.0 |
LoginQueueTimeoutSeconds |
LoginServer only — maximum wait before a queued client is timed out | 300 |
Format: Simple key=value per line. Lines starting with # or ; are comments. The SMTP settings can be overridden via FISHMMO_SMTP_HOST, FISHMMO_SMTP_PORT, FISHMMO_SMTP_USERNAME, FISHMMO_SMTP_PASSWORD, FISHMMO_SMTP_FROM_ADDRESS, FISHMMO_SMTP_FROM_NAME, and FISHMMO_SMTP_USE_SSL.
IPv6 is not supported at the native QUIC layer. The
EnableIPv6andIPv6Addresskeys appear commented out in the templates and are reserved for future implementation — IPv6 clients must reach the servers through an IPv6-enabled NGINX L4 proxy.
The Production login-queue defaults (
500/50.0/300) are conservative, sized for roughly 500 concurrent players. The template's own tuning note suggests a queue of1000–8000and a timeout of120–600sfor a launch-scale deployment, and raising the admission rate only alongside more SRP proof workers: 50/s sits under what the proof stage completes on the default two workers (near 100/s), so the queue drains into the pipeline without refilling the cap.
Certificate paths are required on every game server.
CertificatePathandPrivateKeyPathmust point to valid PEM files on each server. NGINX cannot terminate QUIC TLS — it only forwards raw UDP. If certificates are missing, the server will fail to start or clients will be unable to connect. See TLS Certificate Setup for Game Servers.
Production: Edit the
Production/templates before building. Each SceneServer needs a unique port if running multiple instances (e.g., 7790, 7791, 7792...).
About the bind address: All server
.cfgtemplates default toAddress=127.0.0.1— servers listen on loopback and NGINX forwards public traffic to them viaproxy_pass. This keeps backend servers off the public network. Only changeAddressif the server runs on a different machine than NGINX; in that case, set it to the machine's network-facing IP and update the corresponding NGINX upstream or stream config to point to that IP.
Platform-Specific Certificate Paths
| Platform | Default Certificate Path |
|---|---|
| Linux | /etc/fishmmo/certs/fullchain.pem |
| Windows | C:\ProgramData\FishMMO\certs\fullchain.pem |
| macOS | /usr/local/share/fishmmo/certs/fullchain.pem |
| Other | certs/fullchain.pem (relative to working directory) |
Editing the CFGs from the Build dashboard
FishMMO Dashboard → Build → Server CFG Setup edits the three templates of the selected Working Environment
(FishMMO-Setup/<environment>/LoginServer.cfg, WorldServer.cfg, SceneServer.cfg). It edits those same files; there
is no separate copy of CFG values in EditorPrefs.
- Keys come from the templates, so a new CFG setting appears without a new dashboard control. Booleans are toggles, numbers are numeric fields, everything else is text. Comments become tooltips, and a search box filters the names.
- Secrets are masked: password, HMAC and secret values, even when they look like numbers.
- Add setting takes optional or custom keys. Remove deletes every duplicate spelling of a key, so an older duplicate cannot take effect again.
- Saving: a valid change saves when a toggle flips or an edit is committed (Enter or focus loss). An invalid value reports an error and leaves the file alone. Reload from disk discards pending changes; edits made outside the dashboard are detected, not overwritten.
- The file stays as written: comments, key order, blank lines, newline style and the UTF-8 BOM are kept, and the
file is replaced atomically. Parsing matches the servers:
#/;comments, split on the first=, keys case-insensitive, the last duplicate wins. - Checks: basic port and client-count checks, and Production cannot turn on
AutoVerifyAccounts(the same rule the server enforces at startup). The servers' own startup validation is still the full check. - The Fast registration: auto-verify accounts toggle writes
AutoVerifyAccountsin LoginServer.cfg. It skips verification for new registrations in development; it does not create accounts at login.
Existing server builds: choose the build folder that holds the three CFGs (the default is
Builds/Server/Linux Server/FishMMO GameServer Linux), then Apply CFGs to existing server build. Every setting and
destination file is checked before anything is copied. Restart the servers afterwards; a CFG-only change needs no
player rebuild. Pick the environment that matches the build. If you change ServerName, change AppHealthMonitor's
PulseServerName to match (the field's tooltip says so; the dashboard does not edit the monitor's JSON).
The section covers only the three game-server CFGs. Web server appsettings*.json, the monitor's JSON and the generated
client host, certificate and secret settings keep their own tools. Tests: Assets/FishMMO/Tests/UnitTests/ServerCfgDashboardTests.cs.
Logging Configuration
logging.json at FishMMO-Setup/logging.json is the canonical copy. Five .NET projects copy it into their output directory as part of the build — AppHealthMonitor, IpFetchServer, Patcher, WebGLServer and FishMMO-Installer — and the Unity server builds copy it alongside the .cfg files via BuildExecutor.CopyConfigurationFiles(). FishMMO-ControlPanel and FishMMO-DiscordBot do not pick it up; configure their logging separately.
{
"LoggingManager": {
"ConsoleAllowedLevels": ["Info", "Warning", "Error", "Critical"],
"FileSink": {
"Description": "...",
"_enabled": true,
"Path": "/var/log/fishmmo/server.log",
"FileSizeLimitMb": 100,
"MaxFileCount": 10,
"AllowedLevels": ["Warning", "Error", "Critical"]
}
},
"Loggers": []
}
The shipped Description field is prose — it records the rotation policy (100 MB files, 10 kept) and points at tailing /var/log/fishmmo/*.log with a shipper for centralised aggregation. It is abbreviated above.
Log levels: Verbose, Debug, Info, Warning, Error, Critical. Note that Debug is not in the shipped ConsoleAllowedLevels — add it when you need it.
Adding file logging (edit FishMMO-Setup/logging.json): file output is driven by an entry in the
Loggers array, which ships empty. The LoggingManager.FileSink block above describes the intended
production sink but is not read by FishMMO-Logger — LoggingManagerConfig binds ConsoleAllowedLevels
only — so to actually write files, add a FileLoggerConfig to Loggers:
{
"Type": "FileLoggerConfig",
"LoggerType": "FileLogger",
"Enabled": true,
"AllowedLevels": ["Info", "Warning", "Error", "Critical", "Debug"],
"LogDirectory": "logs",
"FileName": "server.log"
}
Adding email alerts (append to the Loggers array):
{
"Type": "EmailLoggerConfig",
"LoggerType": "EmailLogger",
"Enabled": true,
"AllowedLevels": ["Error", "Critical"],
"SmtpServer": "smtp.example.com",
"Port": 587,
"EnableSsl": true,
"Username": "alerts@example.com",
"Password": "********",
"From": "alerts@example.com",
"To": "ops@example.com",
"Subject": "FishMMO Alert"
}
Security: Keep SMTP credentials out of source control. Load them via environment variables (e.g.,
FISHMMO_SMTP_PASSWORD). Application secrets (gate secret, KEK, connection token HMAC key) are stored in the database — see FishMMO-Auth — Signing Keys & KEK. See FishMMO-Logger README for full configuration details.
Runtime override: Place a modified logging.json in the working directory — it takes precedence over the bundled copy. The FISHMMO_LOG_LEVEL environment variable (e.g. Debug, Verbose) overrides console verbosity for the Installer only — no game server or web server reads it.
Level policy (why it is a data-handling decision, not just noise control): Warning and
above are the tiers that get shipped off-host, aggregated and retained longest. Two rules follow
for server code, and both have been violated in this codebase before:
- A healthy path never logs above
Debug. Every Login→World and World→Scene hop mints a connection token; logging the successful mint atWarningproduced one line per hop on a busy server and buried the failures the tier exists for. - Per-player identifiers do not travel with success. That same line named the client's resolved real IP, putting one player-attributable record into a widely-retained tier on every zone change, for no diagnostic gain — the failure branch already identifies the connection that could not be served.
Failures keep their Warning/Error level and their identifying detail. See
Security Properties.
Configuration Files — FishMMO-Setup/
All project configuration lives in FishMMO-Setup/ as the single source of truth. Non-sensitive defaults (host, port, database name) are stored in JSON. Database credentials are set via environment variables (FISHMMO_DB_*) or the platform secrets file (/etc/fishmmo/db-secrets.env). Application secrets (gate secret, KEK, connection token HMAC key) are stored in the database and loaded by each server at startup — no env vars or secrets files are needed for them. Each template includes a _comment field listing the env var names to set.
Directory structure:
FishMMO-Setup/
├── logging.json # Shared logging — all projects
├── nginx.conf # NGINX reverse-proxy config (L4 UDP + L7 HTTP)
├── gen-fishmmo-stream-config.sh # Generates the per-port UDP stream blocks (stream.d/)
├── Development/ # Dev / local configurations
│ ├── .env.example # Template for FISHMMO_* environment variables
│ ├── appsettings.json # Unity server Npgsql (dev)
│ ├── appsettings.AppHealthMonitor.json # Process supervisor config
│ ├── appsettings.DiscordBot.json # Discord bot (guild, relay, Npgsql; token is env-only)
│ ├── appsettings.IpFetchServer.json # IP-fetch web server base
│ ├── appsettings.IpFetchServer.Development.json # Dev overrides (DB connection string)
│ ├── appsettings.Patcher.json # Patch delivery web server
│ ├── appsettings.WebGLServer.json # Static asset web server
│ ├── appsettings.ControlPanel.json # Control Panel web app
│ ├── appsettings.Database.json # Npgsql pool / retry template
│ ├── install-config.full.json # Full production install template
│ ├── install-config.quickstart.json # Minimal dev install template
│ ├── install-config.web.json # Web server install template
│ ├── LoginServer.cfg / WorldServer.cfg / SceneServer.cfg
├── Production/ # Production configurations
│ ├── README.md # Production deployment notes
│ ├── appsettings.json # Unity server Npgsql (port 6432, PgBouncer)
│ ├── appsettings.AppHealthMonitor.json # Process supervisor config
│ ├── appsettings.DiscordBot.json # Discord bot (guild, relay, Npgsql; token is env-only)
│ ├── appsettings.IpFetchServer.Production.json # Prod overrides (empty — must set env vars)
│ ├── appsettings.Patcher.json # Patch delivery web server
│ ├── appsettings.WebGLServer.json # Static asset web server
│ ├── appsettings.ControlPanel.json # Control Panel web app
│ ├── LoginServer.cfg / WorldServer.cfg / SceneServer.cfg
Deployment scripts.
gen-fishmmo-stream-config.shis shipped here and installed to/usr/local/bin/by the Installer's Deploy FishMMO nginx.conf (see NGINX Stream Configuration). The certbot deploy hook is generated by the Installer itself (/etc/letsencrypt/renewal-hooks/deploy/fishmmo-certificates), as is the Porkbun DNS hook (/etc/letsencrypt/fishmmo-porkbun-hook.py, source inFishMMO-Installer/FishMMO-Installer/Resources/); see TLS Certificates.
How it works: Each project's .csproj copies the appropriate file from FishMMO-Setup/ into its build output directory, renaming it to appsettings.json (or logging.json). At runtime, applications resolve config with a working-directory-first pattern: if a modified file exists in the working directory, it overrides the bundled copy. Environment variables (prefixed FISHMMO_ or using __ separator) provide the highest-priority overrides.
Unity Npgsql example (Development/appsettings.json):
{
"_comment": "Non-sensitive defaults only. Username and Password are resolved from FISHMMO_DB_USERNAME / FISHMMO_DB_PASSWORD env vars or /etc/fishmmo/db-secrets.env (chmod 600). NEVER put credentials in this file.",
"Npgsql": {
"Database": "fishmmo",
"Host": "127.0.0.1",
"Port": "5432"
}
}
Production Npgsql example (Production/appsettings.json):
{
"Npgsql": {
"Database": "fishmmo",
"Host": "127.0.0.1",
"Port": "6432"
}
}
Both templates point the game servers at PgBouncer on 6432. On a host without PgBouncer, change Npgsql.Port to 5432 (see Configure pgBouncer). The Discord bot always uses 5432.
Database pool and retry configuration (Development/appsettings.Database.json) — sets CommandTimeout: 10, ConnectionTimeout: 15, MinPoolSize: 5, MaxPoolSize: 100, Npgsql retry policy (3 retries, 20ms base, 10ms jitter), optional query performance tracking, and ConnectionPoolHealth thresholds (warn at 70%, critical at 85%, checked every 60s).
Security: Never commit
appsettings.jsonwith real passwords. Use environment variables for secrets in production (see Database Setup for environment variable override syntax).
FishMMO-Auth — Signing Keys & KEK
The authentication system uses HMAC-SHA256 for token signing. In production, signing keys are wrapped with an AES-256 Key Encryption Key (KEK).
Setting the KEK
The KEK is stored in the deployment_secrets database table under the key signing_key_kek. It is generated and stored by the FishMMO-Installer's SecurityKeyInstaller:
# From the Installer interactive menu:
# Database > Configure Server Keys
# Or via CLI — the argument is a comma-separated list of region IDs;
# each region gets its own keyId + HMAC key pair:
FishMMO-Installer --configure-server-secrets default
The CLI form needs the PostgreSQL superuser password: supply it via
FISHMMO_PG_SUPERUSER_PASSWORDor answer the prompt.
All game servers load the KEK from the database at startup via IDeploymentSecretService. No environment variable or secrets file is needed to distribute the KEK between machines.
How It Works
- The LoginServer generates a fresh HMAC-SHA256 signing key at startup.
- The key is wrapped using AES-256-GCM with the KEK and an AAD bound to the LoginServer's database ID.
- The wrapped key envelope is stored in the database.
- World/Scene servers fetch and unwrap the signing key to validate client tokens.
- Keys are rotated each time the LoginServer restarts.
Without a KEK: If the
signing_key_kekrow is missing from thedeployment_secretstable, the LoginServer will log a warning and tokens will not be issued. Client authentication will fail on World/Scene servers. Run the Installer's Database > Configure Server Keys to populate it.
Auth Protocol Constants
The authentication library's security limits (in BaseAuthenticatorCore and SrpAuthenticatorCore, under FishMMO-Auth/FishMMO-ServerAuth/Implementation/Auth/, with the pending-authentication timing rules in Core/PendingAuthRules.cs). All are compile-time constants except the two the host sets from configuration, MaxPendingAuthConnections and TwoFactorWindowSeconds:
| Constant | Default | Declared In | Description |
|---|---|---|---|
AuthStaleTtlSeconds |
15 | BaseAuthenticatorCore (PendingAuthRules.ProgressTtlSeconds) |
Seconds an authenticating connection may go without progress before it is purged. Machine work only; the two-factor prompt has its own window |
AuthHardDeadlineSeconds |
60 | BaseAuthenticatorCore (PendingAuthRules.AuthenticatingCapSeconds) |
Seconds into one authenticating phase after which progress no longer extends it, so a stall mid-SRP is dropped within cap + TTL |
TwoFactorWindowSeconds |
120 (30–600) | BaseAuthenticatorCore |
Seconds a player has to answer each two-factor prompt; every prompt gets the whole window. Configurable as AuthTwoFactorWindowSeconds |
MaxPendingAuthConnections |
1,000 Login / 10,000 World, Scene | BaseAuthenticatorCore |
Concurrent pending auth cap, configurable as AuthMaxPendingConnections; on the Login Server the login queue threshold, derived from the SRP channel capacities when unset. Two-factor prompts do not count against it |
HandshakeIpWindowSeconds |
2 | BaseAuthenticatorCore |
Sliding window for the per-IP handshake limiter |
HandshakeIpBurstLimit |
8 | BaseAuthenticatorCore |
Phase-2 handshake completions allowed from one IP per window — sustains 4/sec/IP while tolerating a NAT burst |
MaxGlobalHandshakesPerSecond |
500 | BaseAuthenticatorCore |
Global X25519 handshake cap per 1-second window |
MaxTotpAttempts |
5 | SrpAuthenticatorCore |
TOTP attempts per connection |
MaxTotpFailuresPerUsername |
15 | SrpAuthenticatorCore |
Per-account TOTP lockout threshold |
TotpUsernameLockoutDuration |
5 min | SrpAuthenticatorCore |
TOTP lockout duration |
Infrastructure Setup
Configure Unity Hub
Add the Project:
- Click ADD in Unity Hub.
- Select the
FishMMO-Unitydirectory.
Install Required Modules:
- Go to the Installs tab.
- Click the gear icon next to your Unity 6.6 version → Add Modules.
- Install:
- Linux Build Support (IL2CPP and Mono)
- Linux Dedicated Server Build Support
- Mac Build Support (IL2CPP and Mono)
- WebGL Build Support
- Windows Build Support (IL2CPP)
- Windows Dedicated Server Build Support
Open the FishMMO-Unity project from Unity Hub and wait for full compilation.
Configure PostgreSQL
The installer handles PostgreSQL installation. For manual setup, ensure:
- PostgreSQL is running and listening on
localhost:5432. - The
fishmmouser can connect with password authentication. pg_hba.confallows local password connections:local fishmmo fishmmo md5 host fishmmo fishmmo 127.0.0.1/32 md5
Securing PostgreSQL (Production):
The installer's PostgreSQLHardening module applies:
- Password-based authentication only (no trust)
- Restricted listen addresses (
localhostor private network) - Connection limits
- Query logging for audit trails
Configure pgBouncer
PgBouncer is a lightweight PostgreSQL connection pooler that sits between your game servers and PostgreSQL, reducing connection overhead. Each game server opens many short-lived connections; PgBouncer multiplexes them onto a smaller pool of persistent server connections. It listens on loopback 127.0.0.1:6432; PostgreSQL stays on 5432.
Installation
Use the Installer (Database menu, option 3 — Install PgBouncer):
- Linux: Package manager install +
systemctl enable --now pgbouncer - Windows:
winget(preferred) or Chocolatey fallback
Configuration (Linux)
Either tool writes /etc/pgbouncer/pgbouncer.ini and /etc/pgbouncer/userlist.txt (owned by pgbouncer, mode 0600), restarts the service, and tests a SELECT 1 through it, restoring the previous files if that fails:
- One command, using the existing application credentials (no PostgreSQL superuser password needed):
It readssudo python3 FishMMO-Installer/scripts/configure-local-pgbouncer.py # show the plan sudo python3 FishMMO-Installer/scripts/configure-local-pgbouncer.py --apply # apply it/etc/fishmmo/db-secrets.env, copies the role's SCRAM verifier (or, failing that, its password) intouserlist.txt, and switches the Development templates and existing local build outputs to6432. - Installer → Database → 8 — Configure PgBouncer. Asks for the PostgreSQL superuser and offers
auth_querymode, in which PgBouncer looks passwords up through a dedicatedfishmmo_pgb_authrole and apublic.pgbouncer_auth_query()function, souserlist.txtholds only that role's credential.
The script generates:
[databases]
fishmmo = host=127.0.0.1 port=5432 dbname=fishmmo
[pgbouncer]
listen_addr = 127.0.0.1
listen_port = 6432
auth_type = scram-sha-256
auth_file = /etc/pgbouncer/userlist.txt
pool_mode = transaction
max_client_conn = 1000
default_pool_size = 25
reserve_pool_size = 5
reserve_pool_timeout = 3
ignore_startup_parameters = extra_float_digits
Windows: edit pgbouncer.ini in the install directory by hand along the same lines.
Which processes use it
| Process | Port | Why |
|---|---|---|
| Game servers (Login, World, Scene) | 6432 |
Both FishMMO-Setup/{Development,Production}/appsettings.json templates |
| IPFetch, Patcher, Control Panel, AppHealthMonitor | 6432 |
Their Development templates (the Production files overlay them) |
| Discord bot | 5432 |
Its verification listener holds a LISTEN, which is session state that transaction pooling drops, so notifications would never arrive. Never point it at PgBouncer |
Migrations, the Installer, psql admin work |
5432 |
DDL and long sessions belong on PostgreSQL directly |
Transaction pooling is safe for the rest because no FishMMO query relies on session state: Npgsql runs with MaxAutoPrepare=0 (no server-side prepared statements) and NoResetOnClose (see NpgsqlDbConfiguration). An FISHMMO_DB_PORT environment variable, or a port in /etc/fishmmo/db-secrets.env, overrides the JSON for every process that reads it — keep it out of the shared file if the Discord bot loads that file too.
After dropping the database (see Starting Fresh):
auth_filemode keeps working, because the role and its password survive.auth_querymode does not, becausepgbouncer_auth_query()lived inside the dropped database: rerun Database → 8.
Verify
sudo systemctl status pgbouncer --no-pager
psql -h 127.0.0.1 -p 6432 -U <app-role> -d fishmmo -c 'SELECT 1'
sudo journalctl -u pgbouncer -n 50 --no-pager # on failure
Configure NGINX
NGINX is the single public-facing reverse proxy for all FishMMO traffic. Every backend server binds to 127.0.0.1 (loopback) and NGINX forwards public traffic to them — backend servers are never directly reachable from the internet. The configuration in FishMMO-Setup/nginx.conf implements a dual-layer architecture:
- Layer 7 (HTTP/HTTPS): Terminates TLS for
api.,play.andpanel.and reverse-proxies to the loopback-bound ASP.NET web servers. - Layer 4 (UDP Stream): Forwards raw QUIC/UDP datagrams to the loopback-bound game servers. NGINX does not and cannot terminate QUIC TLS — the game servers receive the encrypted QUIC packets directly and terminate TLS themselves with the certificate in their
.cfg.
Why QUIC/WebTransport works through NGINX. WebTransport runs over HTTP/3, which is QUIC, which is UDP. NGINX's
streammodule proxies UDP datagrams at Layer 4 without looking inside them, so the QUIC handshake, its TLS 1.3, and the WebTransport session all happen end-to-end between the client (native or browser) and the game server. NGINX only keeps a per-client mapping (client address ↔ an upstream socket), which is why each port block usesreuseport(every datagram of one client goes through the same worker and therefore the same upstream socket) and whyproxy_timeoutmust outlive the QUIC idle timeout. The game server sees127.0.0.1as the peer, so the real client IP travels in the one-time connection token issued by IPFetch. The browser needs nothing extra: the game host's certificate is a normal publicly trusted one, soserverCertificateHashesis not used.
Critical: Because NGINX only forwards UDP at Layer 4, every game server must be provisioned with valid TLS certificates via
CertificatePathandPrivateKeyPathin its.cfgfile. The Installer's Let's Encrypt action does this for you; see TLS Certificates.
NGINX routing table (example.com stands for your domain; the template uses fishmmo.com):
| Public Hostname | Protocol | NGINX Role | Upstream Backend | Backend Bind |
|---|---|---|---|---|
api.example.com |
HTTPS | TLS termination → reverse proxy (/loginserver, /latest_version, patch downloads) |
IPFetch (127.0.0.1:8080) + Patcher (127.0.0.1:8090) |
loopback |
play.example.com |
HTTPS (+ HTTP/3 on UDP 443) | TLS termination → reverse proxy | WebGL Static Server (127.0.0.1:8000) |
loopback |
panel.example.com |
HTTPS | TLS termination → reverse proxy | Control Panel (127.0.0.1:8100) |
loopback |
game.example.com |
UDP (QUIC) 7770-7999 | L4 stream forward | Game Servers (127.0.0.1:7770-7999) |
loopback |
game.example.com:443 |
TCP | Returns 444 (close) | — | — |
If a backend server is on a different machine than NGINX: Change the
upstream(HTTP) or regenerate the stream blocks withBACKEND_IP(UDP) to target that machine's network IP instead of127.0.0.1, and update the server's.cfgAddressaccordingly.
Deploying the config
Use the Installer (Web Server → 3, after the certificate exists). It:
- asks for your root domain and replaces the template's
fishmmo.comwith it (host names and the/etc/letsencrypt/live/<domain>/certificate paths); - refuses to continue if
/etc/letsencrypt/live/<domain>/fullchain.pemdoes not exist yet; - makes sure the stream module is loaded — it writes
/etc/nginx/modules.d/fishmmo-stream.confon Arch, whosenginx-mod-streampackage ships only the.so; - installs the config (backing up the old one once as
nginx.conf.pre-fishmmo.bak) and runsnginx -t; - installs and runs
gen-fishmmo-stream-config.sh, then reloads NGINX.
By hand, the equivalent is:
sudo pacman -S nginx-mod-stream # Debian/Ubuntu: libnginx-mod-stream; Fedora: nginx-mod-stream
# Arch only: the module package does not load itself
echo 'load_module /usr/lib/nginx/modules/ngx_stream_module.so;' | sudo tee /etc/nginx/modules.d/fishmmo-stream.conf
sed 's/fishmmo\.com/example.com/g' FishMMO-Setup/nginx.conf | sudo tee /etc/nginx/nginx.conf >/dev/null
sudo install -m 755 FishMMO-Setup/gen-fishmmo-stream-config.sh /usr/local/bin/
sudo /usr/local/bin/gen-fishmmo-stream-config.sh # runs nginx -t and reloads
Notes on the template:
- No
userdirective. The worker account is the distribution's build default (httpon Arch,www-dataon Debian,nginxon Fedora); naming one fails on every other distribution. reuseportappears once per address:port. NGINX refuses a secondlisten 443 ssl reuseportwith duplicate listen options.- No OCSP stapling. Let's Encrypt ended its OCSP service in 2025, so
ssl_staplingonly produced warnings. - HTTP/3 for
play.listens on UDP 443 (listen 443 quic). It is optional: open UDP 443 to use it, otherwise browsers stay on HTTP/2.
NGINX Stream Configuration (UDP Game Traffic)
Game traffic uses UDP ports 7770-7999 forwarded at Layer 4 through NGINX's stream module. Each port gets its own server {} block in /etc/nginx/stream.d/, which nginx.conf includes. By default, streams forward to 127.0.0.1 — the game servers are expected to be on the same machine, bound to loopback.
NGINX does not terminate TLS for these streams. It forwards the raw encrypted QUIC packets. Each game server terminates its own QUIC/TLS session.
Generating the stream blocks
FishMMO-Setup/gen-fishmmo-stream-config.sh writes them. The Installer installs it as /usr/local/bin/gen-fishmmo-stream-config.sh and runs it during Deploy FishMMO nginx.conf; rerun it as root after changing port ranges:
sudo /usr/local/bin/gen-fishmmo-stream-config.sh
- Port ranges:
- 7770-7779 — Login Servers
- 7780-7789 — World Servers
- 7790-7999 — Scene Servers
- Configurable via environment variables:
| Variable | Default | Description |
|---|---|---|
STREAM_DIR |
/etc/nginx/stream.d |
Output directory for generated .conf files |
BACKEND_IP |
127.0.0.1 |
IP where game servers are listening — change only if servers run on a different machine |
LISTEN_IP |
auto |
Address NGINX listens on. auto = this host's LAN address (the source address of the default route), which is what the router forwards to, so it must be fixed (static address or DHCP reservation). 0.0.0.0 is refused while the game servers are on this host — see below |
LOGIN_START / LOGIN_END |
7770 / 7779 |
Login server port range |
WORLD_START / WORLD_END |
7780 / 7789 |
World server port range |
SCENE_START / SCENE_END |
7790 / 7999 |
Scene server port range |
PROXY_TIMEOUT |
130s |
How long NGINX keeps a client's UDP session mapping after its last datagram |
ENABLE_IPV6 |
0 |
1 adds a listen [::]:PORT udp reuseport; to each block |
NO_RELOAD |
0 |
1 validates but does not reload NGINX |
It writes the new files to a temporary directory, swaps them in, and runs nginx -t; if the test fails it restores the previous files, so a bad run cannot leave NGINX unloadable.
Configuration applied per port:
server {
listen 192.168.1.2:7770 udp reuseport; # this host's LAN address, never 0.0.0.0
proxy_pass 127.0.0.1:7770;
proxy_timeout 130s;
proxy_upload_rate 100m;
proxy_download_rate 100m;
}
PROXY_TIMEOUTmust outlive the QUIC idle timeout. The transport negotiates a 120 s idle timeout (WT_DEFAULT_IDLE_TIMEOUT_MS) and sends no keep-alives, so a player idling at character select can be silent for longer than a minute while the connection is still alive. With a shorterproxy_timeoutNGINX forgets the mapping: the server's next packets go nowhere, and the client's next packet arrives from a new upstream port.StaleSceneTimeoutis unrelated — it is the number of minutes an empty scene stays loaded.NGINX listens on the LAN address, not
0.0.0.0. The game servers bind the same port numbers on127.0.0.1.0.0.0.0:7770includes127.0.0.1:7770, so with a wildcard listen the game servers cannot bind at all (Address already in use), and while none is running NGINX forwards every datagram back to itself until it logsworker_connections are not enough. Two specific addresses (192.168.1.2:7770for NGINX,127.0.0.1:7770for the game server) coexist, and loopback traffic reaches only the game server. The generator refuses a wildcard listen with a local backend.
reuseportis required for QUIC. Without it, any worker may pick up a datagram, and a second worker creates its own upstream socket for the same client, so the game server sees the client's source port change mid-connection.
reuseportmultiplies sockets: raise NGINX's open-file limit. Each worker gets its own socket per port, so the master opens workers × ports sockets (12 CPUs × 230 ports ≈ 2,800) — more than systemd's default limit. The reload then fails withsocket() ... (24: Too many open files)in/var/log/nginx/error.log, whilesystemctl reloadstill reports success and NGINX keeps the old configuration (only port 80, no UDP). The deploy step installs/etc/systemd/system/nginx.service.d/fishmmo-limits.conf(LimitNOFILE=65535), andnginx.confsetsworker_rlimit_nofile 65535. The limit is read when the master starts, so it takes asystemctl restart nginx, not a reload. The generator now confirms after a reload that the first login port is actually listening.The stream module has no health checking, not even passive. If a game server crashes, NGINX keeps forwarding datagrams to the dead port until the server is restarted (the AppHealthMonitor does this). Do not probe game ports with a UDP "connect": it succeeds whether or not anything listens.
Multi-machine deployment: If game servers run on a separate machine from NGINX, run the generator with
BACKEND_IPset to that machine's IP and update each server's.cfgAddressto bind to its own network interface instead of127.0.0.1.
TLS Certificates (Let's Encrypt)
This is not optional. Every HTTPS host and every game server needs a publicly trusted certificate. NGINX terminates TLS for
api.,play.andpanel.; each LoginServer, WorldServer and SceneServer terminates its own QUIC/TLS usingCertificatePathandPrivateKeyPathin its.cfg. Browsers will not open a WebTransport session to a game host without a valid certificate for its name.
One certificate covers everything: example.com and *.example.com. NGINX reads it from /etc/letsencrypt/live/example.com/; the game servers read a copy from /etc/fishmmo/certs/, because /etc/letsencrypt/live is root-only.
Requesting it (Installer → Web Server → 2)
On Linux the action asks which challenge to use:
| DNS through the Porkbun API (default) | HTTP on port 80 | |
|---|---|---|
| Needs | A Porkbun API key with DNS permission, and API Access turned on for the domain (Porkbun → Domain Management → the domain → Details) | NGINX already serving /.well-known/acme-challenge/ from /var/www/certbot on port 80, reachable from the internet |
| Covers | example.com + *.example.com |
Each host you list |
| Order | Before NGINX is configured, so nothing has to be bootstrapped | NGINX must answer on port 80 first, but the FishMMO nginx.conf cannot load without the certificate: start from a minimal port-80 config, then deploy the full one |
For the DNS route it installs certbot and dig, stores the keys root-only in /etc/letsencrypt/fishmmo-porkbun.ini, installs the hook as /etc/letsencrypt/fishmmo-porkbun-hook.py, and runs:
sudo certbot certonly --cert-name example.com --manual --preferred-challenges dns \
--manual-auth-hook "/etc/letsencrypt/fishmmo-porkbun-hook.py auth" \
--manual-cleanup-hook "/etc/letsencrypt/fishmmo-porkbun-hook.py cleanup" \
-d example.com -d '*.example.com' --agree-tos -m you@example.com \
--non-interactive --keep-until-expiring --reuse-key
The hook creates the _acme-challenge TXT record through the Porkbun API, waits until every authoritative Porkbun nameserver serves it, and deletes it afterwards. Certbot saves the hook commands in /etc/letsencrypt/renewal/example.com.conf, so renewals repeat the challenge unattended. Run it once with staging to check the API keys without spending Let's Encrypt's rate limit.
--reuse-key matters. The release client pins the certificate's public key (see Client TLS Certificate Pinning). By default certbot generates a new key at every renewal, which would lock every shipped client out about every 60 days.
Game server copy and renewal
The same action then:
- creates the
fishmmo-certsgroup and adds the account that runs the game servers (log in again, or restart the service, to pick up the membership); - installs a deploy hook at
/etc/letsencrypt/renewal-hooks/deploy/fishmmo-certificates, which checks the renewed certificate is unexpired and matches its key, copiesfullchain.pemandprivkey.peminto a new/etc/fishmmo/certs/release.*directory (root:fishmmo-certs, files0640), switches thecurrentsymlink atomically, and reloads NGINX on renewal; - runs the hook once, and enables
certbot.timer/certbot-renew.timer(or installsfishmmo-certbot-renew.timer); - removes the development-certificate marker if option 6 had been used, so that option can never overwrite the real certificate.
| File | Path |
|---|---|
| Full chain certificate | /etc/fishmmo/certs/fullchain.pem → current/fullchain.pem |
| Private key | /etc/fishmmo/certs/privkey.pem → current/privkey.pem |
Restart the game servers after a renewal. MsQuic reads the certificate once at startup and the hook does not interrupt running sessions. With
--reuse-keythe key does not change, so clients keep working either way, but a server still holding the old certificate will serve it until it expires.
Multi-machine: copy
/etc/fishmmo/certs/to each game server machine (keep the private key0640, readable only by the server account's group). NGINX itself needs no certificate for the game ports.
Web Server Configuration
ClientGate Middleware
The IPFetch and Patcher web servers use a ClientGate middleware that validates the X-FishMMO-Client header on every request. This prevents generic crawlers and unauthorized clients from accessing the API.
How it works:
- An HMAC-SHA256 shared secret is loaded from the
deployment_secretsdatabase table (keyclient_gate_secret) at startup viaIDeploymentSecretServiceand held inGateSecretHolder - The header format is:
v1.<timestamp>.<nonce>.<base64url-hmac> - Replay protection via a 100,000-entry nonce cache with a 30-second timestamp window
- The secret must be at least 32 bytes; comma-separated values enable key rotation
In Production: The server refuses to start if the client_gate_secret row is not present in the deployment_secrets table.
In Development: Logs a warning and passes all requests through.
WebGL Server: Does not use ClientGate (static content, publicly accessible).
The gate secret is generated and stored by the FishMMO-Installer's SecurityKeyInstaller (Database menu > Configure Server Keys, or CLI --configure-server-secrets <regions>). The client-side copy is written by the FishMMO Dashboard → Game Settings → Client Secret section in the Unity Editor: Fetch from Database reads deployment_secrets.client_gate_secret through the servers' own database configuration (and says whether it differs from the written file), Write Secret to File writes ClientApiSecret.generated.cs (gitignored). A client built with any other secret gets 401 from IPFetch and the Patcher on every request.
Web Server Security & Environment Variables
All three web servers (IPFetch, Patcher, WebGL) run on Kestrel bound to 127.0.0.1 (localhost only) — they are designed to sit behind NGINX. NGINX handles TLS termination and public exposure; the web servers themselves never accept connections from the public internet. This is enforced at the Kestrel level, not just by firewall rules.
Key environment variables:
| Variable | Used By | Purpose |
|---|---|---|
FISHMMO_ENVIRONMENT |
All servers | Sets DOTNET_ENVIRONMENT and ASPNETCORE_ENVIRONMENT |
Application secrets (gate secret, KEK, connection token HMAC key) are NOT configured via environment variables. They are stored in the database (
deployment_secretsandconnection_token_keystables) and loaded by each server at startup viaIDeploymentSecretServiceandIConnectionTokenKeyService. See FishMMO-Auth -- Signing Keys & KEK and ClientGate Middleware.
Production safety checks (refuse to start if unmet):
- The
client_gate_secretrow must exist in thedeployment_secretstable (IPFetch, Patcher) - Trusted proxy IPs/networks must be configured in
ForwardedHeaders(or setForwardedHeaders:AllowUnconfigured=trueto bypass) ConnectionStrings:NpgsqlConnection, if set, must saySsl Mode=Require(IPFetch, Patcher, Control Panel), unlessConnectionStrings:AllowInsecureNpgsql=true. The servers do not connect through that string — the connection is built from theNpgsqlsection plusFISHMMO_DB_*//etc/fishmmo/db-secrets.env— so leave it unset and the check does not apply. A loopback database or PgBouncer needs no TLS.
Web server port bindings (all localhost):
| Server | Config Key | Default Port |
|---|---|---|
| IPFetch Server | WebServer:HttpPort |
8080 |
| Patcher Server | WebServer:HttpPort |
8090 |
| WebGL Server | WebServer:HttpPort |
8000 |
| Control Panel | WebServer:HttpPort |
8100 |
Running the Servers
Launch Order
Servers must be started in this exact order:
- PostgreSQL — Must be running before any server starts.
- PgBouncer — If used, must be running before game servers start.
- LoginServer — Must be running and registered in the database before World servers.
- WorldServer — Must be running and registered before Scene servers.
- SceneServer(s) — Can start once WorldServer is registered.
- IPFetch Server — Should start after the LoginServer is registered.
- Patcher Server — Can start independently; needs patch files.
- WebGL Server — Can start independently; needs a WebGL build.
Starting Game Servers
All three server types use the same GameServer executable with different launch arguments. Build the server first from Unity (FishMMO Dashboard → Build: set Build Type to Server, then Build Game).
Recommended: Use the AppHealthMonitor daemon for production deployments — it provides automatic restarts, health checks, and process supervision:
cd FishMMO-AppHealthMonitor
dotnet build
dotnet run --project AppHealthMonitor/AppHealthMonitor.csproj
The installer's
systemd-servicescomponent registers only the three web servers (fishmmo-ipfetch,fishmmo-patcher,fishmmo-webgl). The AppHealthMonitor unit is not exposed as a CLI component — write it by hand as shown in Running as a Systemd Service (Linux) below.
Manual startup (dev/testing):
Linux:
./GameServer LOGIN &
sleep 10
./GameServer WORLD &
sleep 5
./GameServer SCENE &
Windows:
# Start LoginServer
Start-Process GameServer.exe -ArgumentList "LOGIN"
Start-Sleep 10
# Start WorldServer
Start-Process GameServer.exe -ArgumentList "WORLD"
Start-Sleep 5
# Start SceneServer(s)
Start-Process GameServer.exe -ArgumentList "SCENE"
Each server needs these files in its working directory:
GameServer(the executable)LoginServer.cfg/WorldServer.cfg/SceneServer.cfg(matching the server type)logging.json(shared logging config, copied fromFishMMO-Setup/at build)appsettings.json(database config, copied fromFishMMO-Setup/at build)AddressableAssetsData/(Addressable asset bundles from the build)StreamingAssets/(if any)- TLS certificate and private key at the paths specified in the
.cfgfile
The Unity build process copies the correct
.cfg,appsettings.json, andlogging.jsonfromFishMMO-Setup/automatically viaBuildExecutor.CopyConfigurationFiles().
Bind address: Server
.cfgfiles default toAddress=127.0.0.1— the server listens on loopback and expects NGINX to forward public traffic to it. If you are running without NGINX or on a separate machine, changeAddressto0.0.0.0(all interfaces) or the machine's specific network IP. NGINX's stream config (BACKEND_IP) and HTTP upstream blocks must point to the same address.
Starting Web Servers
All web servers load appsettings.json and logging.json from FishMMO-Setup/ (copied to the build output at build time). Place a modified copy in the working directory for local overrides.
For production, install them as OS services via the FishMMO-Installer:
# Linux (systemd) — registers fishmmo-ipfetch, fishmmo-patcher, fishmmo-webgl, fishmmo-controlpanel
FishMMO-Installer --component systemd-services
This configures automatic startup, crash recovery, environment variables (FISHMMO_ENVIRONMENT=Production, FISHMMO_DB_PASSWORD, etc.), and log file capture. It requires each web server to have been published first — the installer looks for Builds/<project>/Release/net8.0/publish and skips any server it cannot find there. Build all C# Projects only builds; publish them yourself:
dotnet publish FishMMO-WebServers/IPFetchASP.NET/IpFetchServer/IpFetchServer.csproj -c Release
dotnet publish FishMMO-WebServers/PatcherASP.NET/Patcher/Patcher.csproj -c Release
dotnet publish FishMMO-WebServers/WebGLServerASP.NET/WebGLServer/WebGLServer.csproj -c Release
dotnet publish FishMMO-WebServers/FishMMO-ControlPanel/ControlPanel/ControlPanel.csproj -c Release
The output lands in Builds/IpFetchServer/, Builds/Patcher/, Builds/WebGLServer/ and Builds/ControlPanel/ respectively (Release/net8.0/publish/).
The WebGL (WebGPU) client is served from the WebGL server's wwwroot/ folder next to its executable: copy the contents of the Unity web build output (index.html, Build/, TemplateData/, StreamingAssets/) into Builds/WebGLServer/Release/net8.0/publish/wwwroot/ and restart fishmmo-webgl. The server sends the cross-origin isolation headers (COOP: same-origin, COEP: require-corp) Unity needs, and a Content-Security-Policy whose connect-src allows https://<GameHost>:* (WebTransport to every game port) plus the ContentSecurityPolicy:ConnectOrigins list — set both GameHost and ConnectOrigins in appsettings.WebGLServer.json to your domain.
Linux only. On Windows both the menu entry (Web Server → 5) and the
systemd-servicescomponent only log a reminder. The installer contains an NSSM-based Windows registration path (FishMMO-IpFetch,FishMMO-Patcher,FishMMO-WebGL), but nothing calls it yet — configure Windows services with NSSM by hand. See the Installer README for details.
For development:
All web servers bind to
127.0.0.1by default (configured viaWebServer:HttpPortin their appsettings). NGINX reverse-proxies to them. To test a web server directly without NGINX, configure itsappsettings.jsonto bind to0.0.0.0or a specific IP.
IPFetch Server (Login Server Discovery):
cd FishMMO-WebServers/IPFetchASP.NET/IpFetchServer
dotnet build # copies configs from FishMMO-Setup/
dotnet run
Patcher Server (Patch Delivery):
cd FishMMO-WebServers/PatcherASP.NET/Patcher
dotnet build
dotnet run
WebGL Server (Static File Serving):
cd FishMMO-WebServers/WebGLServerASP.NET/WebGLServer
dotnet build
dotnet run
Place a Patches/ directory alongside the Patcher server containing your generated patch ZIP files.
Running Multiple Scene Servers
Each SceneServer needs a unique port. Copy SceneServer.cfg and change the port:
# SceneServer A — Port 7790
ServerName=Scene Server A
Port=7790
# SceneServer B — Port 7791
ServerName=Scene Server B
Port=7791
Launch each with ./GameServer SCENE from its own working directory (or pass a custom config path). The WorldServer will distribute characters across all registered scene servers.
Scene servers are not bound to a world server. Each one pulls from a single global pending-scene queue, so any scene server may end up hosting scenes for any world server. This is what lets you scale zone capacity independently of world instances, and it is why scene rows, population counts and routing caches are all keyed by world server ID as well as scene name.
Multiple instances of one open-world scene are channels. When every instance of a scene is at its authored MaxClients, the WorldServer enqueues another and holds arriving clients in its routing queue (they see a position and a reason) until it is ready. Players move between instances of their current scene through the channel picker; the switch is refused in combat and rate-limited per character via characters.last_channel_switch_utc, so it survives the disconnect the switch performs.
An empty instance is unloaded once it has been stale for StaleInstanceSceneTimeout minutes (the templates ship 2), which also deletes its scene row. Open-world scenes use the separate, longer StaleSceneTimeout.
Locking a server and scheduling maintenance
Both world_servers.locked / world_servers.shutdown_at_utc and the matching scene_servers
columns are the authority for a server's lifecycle state. Servers never write them on their
own: each one reads its own row back on every pulse (~5s) and adopts what it finds. Anything that
can write those rows therefore controls the servers — the in-game commands below, the Control Panel, or plain
psql — exactly as kick_requests already works for accounts.
A scheduled shutdown is counted down from the seconds remaining that the database reports on
that read, on each server's monotonic clock, never by comparing the stored instant with the
host's wall clock — so a host whose clock is wrong neither stops early nor misses a warning.
Locking drains, it does not evict. A locked server keeps the players it has and stops receiving new ones: a locked world refuses logins, and a locked scene server is skipped by the world server's open-world routing and stops taking scene-load requests. Instance routing deliberately ignores the lock, because a character bound to a dungeon can only go to the one server hosting it — refusing there would evict them from their instance rather than drain them.
A locked world still admits accounts above AccessLevel.Player, so locking a world for
maintenance does not lock out the people doing the maintenance. A world with a shutdown
scheduled admits nobody.
In-game commands, all requiring AccessLevel.Admin (3):
| Command | Effect |
|---|---|
/admin status |
Reports this scene server's state and that of the worlds it hosts scenes for |
/admin lockserver |
Locks the character's world server — no new logins except elevated accounts |
/admin unlockserver |
Reopens the world |
/admin shutdown <seconds> |
Locks the world and schedules its shutdown. Players are warned as the countdown passes 15m / 10m / 5m / 2m / 1m / 30s / 10s, then disconnected with a maintenance notice |
/admin stopshutdown |
Cancels the scheduled world shutdown. Leaves the world locked — reopening is a separate decision |
/admin lockscene |
Locks the scene server the admin is standing on |
/admin unlockscene |
Reopens that scene server |
/admin shutdownscene <seconds> |
Locks and shuts down that one scene server; its players are warned, disconnected, and can rejoin on another |
/admin stopshutdownscene |
Cancels it, leaving the scene server locked |
lockworld / unlockworld are accepted as aliases of lockserver / unlockserver. These are
part of the wider operator command set described in In-game operator commands and the staff
console below.
Player commands for instanced content
A party may hold one dungeon instance at a time, so a run that is finished with — or that
went wrong — otherwise blocks the party from starting anything else until it empties and ages
out. These two commands exist so that is a decision rather than a wait. Both are available at
AccessLevel.Player.
| Command | Effect |
|---|---|
/leaveinstance (/exitinstance) |
Returns the character to the open world at the point it entered from. The system-level guarantee that instanced content cannot trap a player: a dungeon is expected to provide an exit teleporter, but that is content data, and a character bound to an instance is routed back into it on every login — so quitting is not an escape. Refused in combat, so it is not one either |
| Instance panel (Escape → Dungeon) | Shows the dungeon's name and difficulty, how long it has left, and everyone in it, marking who leads. Leadership is the owning party's leader, so it follows a promotion rather than staying with whoever opened the run — and it follows the party away from a leader who has logged out, so a run cannot be left with nobody able to manage it. The leader can remove others and can hide the run from the dungeon finder; anyone can leave, and everyone sees the visibility. Removal is immediate and returns the target to the open world at the point they entered from — it is not a disconnect, so they are not routed back into the instance they were just removed from |
| Dungeon finder (a dungeon entrance) | Lists the runs of that dungeon currently open at the chosen difficulty, with who is running each and how full it is. Joining one enters the dungeon and joins that group's party, so it is refused for anyone already in a party with somebody else. Opening a new run picks a difficulty and whether to list it for strangers |
| Find Group (dungeon finder) | Queues the character for that dungeon at that difficulty. The finder panel stays open and shows the wait in a strip above the list; closing the panel leaves the queue, and walking more than a few metres from the entrance drops the player from it (told why), so nobody is ever moved into a dungeon they have wandered away from. The finder first fills runs already open to others that have room — the late-join path, and how a partial group gets its missing members — and otherwise forms a fresh party once enough players have gathered (the difficulty's GroupFinderSize, else the run's capacity; never fewer than two or than MinimumPartySize). Matching joins a party, so it is refused for anyone in a party with somebody else. A matched player is moved as soon as they are out of combat and back at the door, and dropped from the group if they stay away for a minute. Off per difficulty via GroupFinderEnabled |
Arena board (an ArenaBoard interactable) |
Queues the character for a PvP arena at a chosen format (1v1, 2v2, 3v3, 4v4, 8v8 and so on, as the ArenaTemplate lists them; a format may be ranked). The board panel stays open and shows the wait; closing it leaves the queue, and walking away from the board drops the player. It also shows the character's season standing (rating once placed, wins and losses, any queue lock), a History tab of their recent matches and a Leaderboard tab of the season's top ratings. A party queues together through Queue as Party (leader only, every member at the board, party no larger than a team; in a ranked format the party must fill a whole team) and is kept on one team. Matches form first-come, atomically across scene servers, within a rating band that widens with wait time for ranked formats, and balanced by rating across teams when the template asks; a vacated seat in a live match is backfilled from the queue during the template's window. Everyone is moved into the arena instance, waits for all seats to arrive, answers a ready check (a decline or a silence cancels the match and locks the culprit out of the queue for a while), then a 10 second countdown (with per-second cue hooks for audio and effects) starts the match. Team Deathmatch scores kills, Capture the Flag scores deliveries of the enemy flag to your own stand (a carrier's death drops the flag where they fell: their team touches it home, an enemy picks it up, or it returns by itself), King of the Hill scores time holding a control point; the dead respawn at their team's spawn after a death recap naming the killer, and the match ends on the score limit, the clock, or a walkover. A kill feed and announcer (first blood, killing sprees, flags, time and score warnings) run from server events, each also a template cue hook. Leaving a live match forfeits it and locks the deserter out of the queue; a player who disconnects keeps their seat for the template's grace and is refunded the forfeit if they come back in time. A results screen shows the winner, the team scores, a pedestal of the top scorers and, for ranked, the rating change, and everyone is returned to the world. Arenas count against the one-instance-per-party rule, and every result moves the character's PvP Rank, PvP Wins, PvP Losses and PvP Matches attributes; ranked results move a per-season Elo rating (10 placement games at a higher K). Rewards are not decided yet: ArenaServerEvents.OnMatchEnded and the template's reward trigger lists are the hooks |
/team (/tm) |
Arena team chat: reaches your teammates in the match you are standing in, and nobody else. Not persisted |
/spectatearena <matchId> |
Game masters only. Enters a running arena match as a spectator, who can neither hit nor be hit; leave with /leaveinstance or wait for the match to close |
/spectateteam <n> |
Game masters only, while spectating an arena match. Moves the spectator to team n's spawn. The arena HUD also offers a spectator a free camera (right mouse to look, WASD, Q/E) |
/closedungeon (/closeinstance) |
Ends the party's current instance. From inside, everyone in it is returned to the open world and the scene is unloaded; from outside, the instance is retired only if it is empty, and the hosting scene server reclaims the scene on its own. Party leader only, since it removes everybody — a character with no party is its own leader. Refused while anyone inside is in combat, because the eviction path deliberately skips state validation (there is nothing to validate against when a lifetime cap expires) and reaching it from a command would otherwise make it an instant escape from a losing fight |
Because this and the instance panel's controls are leader-only, a party whose leader logged out
used to be unable to close, hide or manage the run it was holding — and since a party may hold
only one instance, that locked every member out of every dungeon until the row aged out. Party
leadership now moves off a holder who is not logged in anywhere, once they have been gone long
enough that it cannot be confused with the gap while somebody walks through a teleporter. See
leadershipAbsenceGraceSeconds on the scene server's PartySystem asset, which must comfortably
exceed the slowest scene load on the shard.
Operator commands are refused silently to anyone below their level — the server gives no indication the command exists, so an unprivileged player cannot probe for command names — but every refused attempt is logged at warning level and written to the operator audit log with the character and account that tried it.
In-game operator commands and the staff console
Two command sets, each registered once at its access level, with every sub-command in one
table: /gm at AccessLevel.GameMaster (2) and /admin at AccessLevel.Admin (3). One
registration means one access check, and the audit hook sits on that check, so every command —
including refusals — is written to admin_audit_log before it runs. /gm help and
/admin help list the commands by category; help <command> prints its usage.
Game masters cannot change the game. Nothing under /gm creates currency or items, changes
an attribute, heals, revives or kills: a game master account that could would be an exploit waiting
for one stolen password. Those are /admin, and a test pins that no game master file calls
anything an administrator file declares. Administrators hold every /gm command as well.
/gm command |
Effect |
|---|---|
who |
Characters this scene server holds |
where <character> / info <character> |
Scene and coordinates; account, level, dead / in combat / muted |
seen <character> |
Database lookup, online or not, anywhere in the shard, with both mutes |
chars <account> / account <account> |
An account's characters; its level, sign-in history, ban and mute (no email) |
goto / summon / return <character> |
Move to a character, bring them to you, send a summoned character back. Same scene instance only |
gotopos <x> <y> <z> / unstuck <character> |
Move yourself to coordinates; move a character to the nearest respawn point in their scene |
msg / warn <character> <text> |
A private System-channel message or formal warning, signed with your character name |
kick <character> |
Kick request for the account (every session) |
mute / muteaccount <character> <duration> [reason] |
Chat mute on one character, or on every character of its account. Commands still work, so a muted player can /helpme |
unmute / unmuteaccount <character> |
Lift one mute; the other, if any, stays |
tempban <account> <duration> <reason> |
Ban that lifts itself. Revokes sessions and kicks. Never shortens a longer ban |
unban <account> |
Lift a ban. Game masters may lift temporary bans only |
tickets [unassigned\|mine\|all] / ticket <id> |
The support queue, and one ticket with its latest messages and staff notes |
claim / unclaim <id> |
Take a ticket (moves it to InProgress), or hand it back |
reply / note <id> <text> / resolve <id> <resolution> |
Player-visible reply, staff-only note, resolution. The text is withheld from the audit row — it lives on the ticket |
console |
Opens the staff console (below) |
Durations are 30m, 2h, 7d, 1w (a bare number is minutes). A game master's mute or ban is
capped at 30 days and always ends; only an administrator may use perm for a mute, and
permanent bans are /admin ban.
/admin command |
Effect |
|---|---|
status, lockserver … stopshutdownscene, announce |
Server control, as above |
access <account> <level> |
Set an access level below your own |
ban <account> <reason> |
Permanent ban (replaces a temporary one) |
gold [character] |
Currency balance |
setgold / givegold / takegold [character] <amount> |
Change a balance. Written to the economy ledger as AdminAdjustment |
giveitem [character] <amount> <item name or template id> |
Grant items through the normal reward path |
heal / revive / kill / god [character] |
Full heal; revive in place; kill with no kill credit; toggle immortality until the next scene change |
attr <character> <attribute> / setattr [character] <value> <attribute> |
Read or set an attribute's base value (currency is refused — use setgold) |
[character] may be left out to act on yourself; a word in that position is always a character
name, never silently yourself. Every /admin character and economy command acts only on
characters this scene server holds, through the live controllers, so the change reaches the player
at once and persists the normal way. The currency they use is currencyTemplate on the
SceneServerSystem asset.
Mutes and temporary bans are database columns — accounts.muted, muted_until, muted_by,
mute_reason, banned_until, banned_by, ban_reason, and the four mute columns on
characters — added by the AddModerationColumns migration. A mute is read when a character
loads and applied at once on the scene server that set it; elsewhere it takes effect at the
character's next load. An expired mute simply stops applying. A temporary ban is lifted at the
first sign-in attempt after it ends. If the mute read fails (for example, the migration has not
been applied) the character loads unmuted and a warning is logged, rather than locking every
player out.
The staff console (/gm console) is an in-game panel for all of the above: a roster of every
character in your scene instance with per-row actions, the support ticket queue with ticket
detail and actions, and a form for every command, with a log of the server's replies. The client
ships the console empty — no command names, arguments or help text are in the build. The server
sends the catalogue only to GameMaster and above, and only in answer to /gm console. Every action
the console takes is an ordinary chat command, gated and audited as if typed. Its roster and ticket
reads are separate requests, re-authorised on arrival against the level this server loaded; a
refused read is audited like a refused command, and allowed reads are not audited (as in the
Control Panel).
Note on automatic restarts. The AppHealthMonitor restarts server processes. A world server deregisters itself on a graceful shutdown, so it comes back clean; a scene server clears its own consumed shutdown (and the lock that came with it) as it exits, for the same reason. Either way a scheduled shutdown will be followed by a restart unless you stop the monitor first.
FishMMO-AppHealthMonitor
The AppHealthMonitor is a daemon that monitors, auto-restarts, and health-checks your server processes. It performs process liveness checks, a database pulse check for the game servers, TCP/UDP port probes for anything else, CPU and memory threshold monitoring, exponential-backoff restarts, and circuit breaker protection. With database credentials it also joins the control plane: it reports what it supervises and carries out the start, stop and restart commands an operator queues for its host from the Control Panel.
Build
cd FishMMO-AppHealthMonitor
dotnet build -c Release
Configure appsettings.json
Place appsettings.json in the AppHealthMonitor's working directory, or start from the shipped templates in FishMMO-Setup/{Development,Production}/appsettings.AppHealthMonitor.json:
{
"Headless": false,
"Applications": [
{
"Name": "LoginServer",
"ApplicationExePath": "/path/to/GameServer",
"LaunchArguments": "LOGIN",
"MonitoredPort": 0,
"PortTypes": ["DatabasePulse"],
"PulseTier": "login",
"PulseServerName": "LoginServer",
"PulseStaleSeconds": 90,
"CheckIntervalSeconds": 30,
"LaunchDelaySeconds": 2,
"InitialHealthCheckDelaySeconds": 30,
"PostLaunchSettleDelaySeconds": 5,
"GracefulShutdownTimeoutSeconds": 10,
"InitialRestartDelaySeconds": 5,
"MaxRestartDelaySeconds": 60,
"MaxRestartAttempts": 5,
"CircuitBreakerFailureThreshold": 3
},
{
"Name": "WorldServer",
"ApplicationExePath": "/path/to/GameServer",
"LaunchArguments": "WORLD",
"MonitoredPort": 0,
"PortTypes": ["DatabasePulse"],
"PulseTier": "world",
"PulseServerName": "WorldServer",
"PulseStaleSeconds": 90,
"CheckIntervalSeconds": 30,
"LaunchDelaySeconds": 2,
"InitialHealthCheckDelaySeconds": 30,
"PostLaunchSettleDelaySeconds": 5,
"GracefulShutdownTimeoutSeconds": 10,
"InitialRestartDelaySeconds": 5,
"MaxRestartDelaySeconds": 60,
"MaxRestartAttempts": 5,
"CircuitBreakerFailureThreshold": 3
},
{
"Name": "SceneServer",
"ApplicationExePath": "/path/to/GameServer",
"LaunchArguments": "SCENE",
"MonitoredPort": 0,
"PortTypes": ["DatabasePulse"],
"PulseTier": "scene",
"PulseServerName": "SceneServer",
"PulseStaleSeconds": 90,
"CheckIntervalSeconds": 30,
"LaunchDelaySeconds": 2,
"InitialHealthCheckDelaySeconds": 30,
"PostLaunchSettleDelaySeconds": 5,
"GracefulShutdownTimeoutSeconds": 10,
"InitialRestartDelaySeconds": 5,
"MaxRestartDelaySeconds": 60,
"MaxRestartAttempts": 5,
"CircuitBreakerFailureThreshold": 3
},
{
"Name": "IPFetch Server",
"ApplicationExePath": "/path/to/IpFetchServer",
"LaunchArguments": "",
"MonitoredPort": 0,
"PortTypes": [],
"CheckIntervalSeconds": 30,
"LaunchDelaySeconds": 2,
"InitialHealthCheckDelaySeconds": 30,
"PostLaunchSettleDelaySeconds": 5,
"GracefulShutdownTimeoutSeconds": 10,
"InitialRestartDelaySeconds": 5,
"MaxRestartDelaySeconds": 60,
"MaxRestartAttempts": 5,
"CircuitBreakerFailureThreshold": 3
}
]
}
Do not port-probe a game server. WebTransport is QUIC over UDP, so there is no TCP listener on a game port: a
TCPcheck fails against a healthy server, and because every configured check must pass, the monitor restarts healthy servers until it gives up. AUDPcheck cannot compensate — it succeeds when the local send completes and never waits for a reply, so it reports a dead server healthy — and QUIC answers only a valid Initial packet, so it cannot be probed without a handshake. The game servers are checked withDatabasePulseinstead: the age of the server's own pulse row, as the database measures it. The pulse check fails open — an unreadable database or a server not registered yet reports healthy — because otherwise a database outage would make every pulse look stale at once and every daemon would restart every server together.
| Key | Description |
|---|---|
Headless |
true for production (auto-starts monitoring, no interactive console). false for development. |
Name |
Friendly name shown in logs and status command. |
ApplicationExePath |
Absolute or relative path to the executable. |
LaunchArguments |
Server type selector: LOGIN, WORLD, SCENE, or empty for web services. |
MonitoredPort |
Port for a TCP/UDP probe. 0 = no port probe (the game servers use the pulse instead). |
PortTypes |
Health checks, every one of which must pass: any of TCP, UDP, DatabasePulse. Empty = process-only monitoring. |
PulseTier |
With DatabasePulse: login, world or scene, the server table to read. |
PulseServerName |
With DatabasePulse: the name the server registers under (its own ServerName setting); defaults to Name. Matched by name, not address or port. |
PulseStaleSeconds |
With DatabasePulse: pulse age, as the database measures it, above which the server counts as down. Default 90 (three missed 30 s beats). |
CheckIntervalSeconds |
Probe interval (minimum 5). |
InitialHealthCheckDelaySeconds |
Delay before first probe after launch (minimum 1). |
PostLaunchSettleDelaySeconds |
Pause after launch/restart before resuming probes. |
CircuitBreakerFailureThreshold |
Consecutive failures across launches that trip the circuit breaker. |
InitialRestartDelaySeconds |
Base delay for exponential backoff. |
MaxRestartDelaySeconds |
Cap for exponential backoff. |
MaxRestartAttempts |
After this many restarts, the circuit breaker may trip. |
CpuThresholdPercent |
CPU usage above this percentage counts as a resource failure. Production templates use 80. |
MemoryThresholdMB |
Memory usage above this counts as a resource failure. Production templates use 1024 for game servers, 512 for web services. |
ResourceCheckFailureThreshold |
Consecutive CPU/memory breaches before the process is restarted. Production templates use 2. |
HealthCheckHost |
Host a port probe connects to. 127.0.0.1 for loopback-bound servers. |
PortCheckTimeoutMs |
TCP/UDP probe timeout. A pulse read gets the larger of this and 5 s, since it is a database round trip. Production templates use 2000. |
GracefulShutdownTimeoutSeconds |
Time allowed for a graceful stop before escalating. |
ForceKillTimeoutSeconds |
Time allowed for the forced kill to take effect. |
LaunchDelaySeconds |
Delay before launching the next process in the list. |
The example above is trimmed for readability. The shipped templates also set
CpuThresholdPercent,MemoryThresholdMB,ResourceCheckFailureThreshold,HealthCheckHost,PortCheckTimeoutMsandForceKillTimeoutSeconds— start from those rather than from this snippet. The Production template sets"Headless": trueand paths under/opt/fishmmo/. See FishMMO-AppHealthMonitor/README.md for the pulse check and the control plane.
Console Commands (Headless = false)
| Command | Description |
|---|---|
help |
List all commands |
start |
Start monitoring all configured applications |
stop |
Gracefully terminate monitored applications and return to the waiting state |
force-kill |
Immediately terminate all monitored applications, bypassing graceful shutdown |
force-restart |
Immediately terminate and then restart all applications |
status |
Show status of all monitored applications (PID, state, restart/failure counters) |
shutdown |
Gracefully shut down the daemon and all applications |
exit |
Alias for shutdown |
The commands operate on all configured applications — none of them take a per-application name argument.
Running as a Systemd Service (Linux)
Create /etc/systemd/system/apphealthmonitor.service:
[Unit]
Description=FishMMO Application Health Monitor
[Service]
Type=simple
User=fishmmo
WorkingDirectory=/opt/fishmmo/AppHealthMonitor
ExecStart=/opt/fishmmo/AppHealthMonitor/AppHealthMonitor
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now apphealthmonitor
Optional Services
FishMMO-DiscordBot
The Discord bot bridges in-game chat with a Discord guild, provides account linking, dynamic channel management, and moderation commands.
Prerequisites
- A Discord application with a bot token (create at https://discord.com/developers/applications)
- Required privileged intents:
MESSAGE CONTENT,GUILD MEMBERS - Required scopes:
bot,applications.commands - Bot must have permissions: Read/Send/Manage Messages, Manage Channels, Timeout/Ban Members
Build & Configure
cd FishMMO-DiscordBot
dotnet build FishMMO-DiscordBot.sln -c Release
The build copies the templates into the output directory as appsettings.json (Development)
and appsettings.Production.json; an appsettings.json in the working directory overrides them:
{
"Discord": {
"DefaultGuildId": 0
},
"Npgsql": {
"Host": "127.0.0.1",
"Port": "5432",
"Database": "fishmmo",
"Schema": "public"
},
"ChatPollingIntervalSeconds": 5,
"BridgeMessageMaxLength": 128,
"RateLimiting": {
"MaxMessagesPerWindow": 5,
"WindowSeconds": 10
}
}
| Key | Description |
|---|---|
FISHMMO_DISCORD_TOKEN (environment) |
Bot token. Environment only — there is no config key for it, the bot refuses to connect without it, and it must never be committed. |
Discord:DefaultGuildId |
Discord guild snowflake. 0 disables it; dynamic channel creation from game chat and verification DMs need a real ID. |
Npgsql |
Non-sensitive database settings, read by FishMMO-DB's NpgsqlDbConfiguration as every FishMMO process reads them; FISHMMO_DB_HOST / FISHMMO_DB_PORT / FISHMMO_DB_NAME override them. The credentials come only from FISHMMO_DB_USERNAME / FISHMMO_DB_PASSWORD or /etc/fishmmo/db-secrets.env. |
ChatPollingIntervalSeconds |
How often the bot polls the game chat tables (default 5). |
BridgeMessageMaxLength |
Maximum bridged message length (default 128, the game's ChatBroadcast.MaxTextLength; clients discard anything longer). |
RateLimiting:MaxMessagesPerWindow / WindowSeconds |
Per-window message cap (defaults 5 per 10 seconds). |
The templates live at FishMMO-Setup/{Development,Production}/appsettings.DiscordBot.json.
Run
dotnet run --project FishMMO-DiscordBot/FishMMO-DiscordBot.csproj
FishMMO-ControlPanel
An ASP.NET Core 8.0 Game Control Panel / Admin Dashboard, living alongside the other web
services at FishMMO-WebServers/FishMMO-ControlPanel/. It is the out-of-game counterpart to
the in-game authentication the LoginServer performs and to the /admin chat commands: account
self-service and management, character management, live server monitoring, and per-server
lifecycle control gated on AccessLevel.
This is not a news CMS. The launcher's news panel is fetched from
Constants.Configuration.LauncherHtmlUrl, baked at build time fromHostConfig.LauncherHtmlUrl(CI substitutesFISHMMO_ROOT_DOMAIN). Nothing in this project serves it.
Status: every page the sidebar offers is built against PostgreSQL. Sign-in (browser-side SRP and mandatory two-factor above Player), registration, self-service, character and account administration and moderation, the audit log, chat log search, support tickets, guilds and parties, the server board with lock and shutdown control, maintenance windows, scene instances, per-server bandwidth, the daemon control plane (start, stop and restart through a database command queue the AppHealthMonitor polls), and platform health, secrets and queues. There is no fake login and no fixture mode: the design mock was deleted. Authorization fails closed, and every privileged write and staff read is recorded in
admin_audit_log. See the Control Panel README for the design.
cd FishMMO-WebServers/FishMMO-ControlPanel
./run-local.sh # preflight, publish, and serve on http://localhost:8100
# or by hand:
dotnet build FishMMO-ControlPanel.slnx -c Release
dotnet run --project ControlPanel
Configuration is layered: the build copies FishMMO-Setup/Development/appsettings.ControlPanel.json (and the Production variant) into the output directory, then ./appsettings.json and ./appsettings.{Environment}.json in the working directory override it. Edit the templates under FishMMO-Setup/, not the copies in Builds/ControlPanel/. Swagger UI is served at /swagger in the Development environment only.
See FishMMO-WebServers/FishMMO-ControlPanel/README.md for running it, the endpoint tables, the design decisions it enforces, and implementation status.
Client Setup
Building the Client
- Open the FishMMO-Unity project in Unity.
- Open the FishMMO Dashboard (
FishMMO → FishMMO Dashboard, Ctrl+Shift+D) and select Build in the Core category. - Set Build Type to Client, pick the OS Target and Environment, then click Apply Platform Settings.
- Click Build Addressables, then Build Game. (Addressables must be built first — the player build depends on those bundles.)
- The output goes to the configured build directory with the client executable, data files, and Addressable bundles.
Build Type, OS Target, and Environment can also be set from the
FishMMO → Build → …menus. The build actions themselves live only in the Dashboard.
Client Launcher Flow
Launcher starts — Fetches the news HTML from
Constants.Configuration.LauncherHtmlUrl(baked at build time fromHostConfig.LauncherHtmlUrl, which CI substitutes fromFISHMMO_ROOT_DOMAIN) and extracts the configureddivclass.IHtmlContentFetcheryields the parsed node, not formatted text: UI Toolkit's rich text has no link tag, so a news link cannot be markup inside a label — it has to become a real element that can receive a click, which means the view walks the tree itself rather than being handed a formatted string. Every href is routed throughLauncherLinkPolicy, which parses the URI and allows only absolutehttp/httpsbefore it reachesApplication.OpenURL. News is cosmetic and does not block the version check.IsNewsUrlConfigureddecides whether the request is worth issuing at all. An empty URL and aFISHMMO_SENTINEL_PLACEHOLDERthe build never substituted mean the same thing — no feed — so both are treated alike, the same sentinel conventionClientCertificatePinninguses to screen unsubstituted values out of the pin set; without it a working copy fetched a host that cannot resolve and reported a failure on every run for a feed that was never configured. On both that path and a genuine fetch failure the pane is filled withClientLauncher.newsFallbackSummary, a serialized[TextArea]field a deployment can reword without a code change. It is filled rather than hidden because hiding it collapsed the panel into a header stacked directly on a footer, which reads as a broken window rather than as a launcher with no news today.Version check — Queries
{APIHost}latest_version?from={clientVersion}. If a patch is available, the launcher downloads it into{patch directory}/{from}-{to}.zip(seeLauncher.PatchDirectorybelow;<install root>/Patchesby default), verifies it against thesha256the server reported, then hands off to the external Updater and quits so the Updater can replace the client binaries. Download progress carries aDownloadStatssnapshot — bytes transferred against the manifest's expected total, current throughput, and an ETA — so the bar shows a real total from its first frame rather than waiting on response headers. IfLauncher.AutoUpdateis off, the launcher parks on an Update button with the patch size instead of starting a download the player has not agreed to. If the server reportspatch_available: false, the launcher entersPatchUnavailable— retrying cannot help, the player needs a full reinstall.Play — The launcher loads the
ClientPostbootscene, callsStartBootstrap()on itsClientPostbootSystem, and unloads its own scene.Login — Client connects to the LoginServer discovered via
https://api.fishmmo.com/loginserver(lowercase: NGINX'slocationmatch is case-sensitive). IPFetch returns only ports; the client always connects toGameHost.QUIC/WebTransport Handshake — X25519 ECDH key agreement + stateless cookie challenge → AES-256-GCM encrypted session.
Auth — SRP-6a authentication handshake, optional TOTP 2FA.
Character Select — Choose or create a character.
World Entry — WorldServer routes the character to the correct SceneServer.
Gameplay — SceneServer handles all in-game simulation.
Launcher Rendering and Settings
The launcher renders through ILauncherView, an interface describing the presentation surface in terms of intent (show this status) rather than widget manipulation, so all version-check and patch logic stays in ClientLauncher and never branches on what is drawing it. UITKClientLauncher is the only implementation. The uGUI adapter and the HtmlToTmpTextConverter behind it were deleted with the UI Toolkit conversion, along with the scene's Canvas root, so ResolveView() has nothing to fall back to: an unassigned or wrongly-typed Launcher View Component is reported as an error and leaves the view null. Saying so beats silently constructing a view over serialized fields that no longer exist.
The panel is a UIDocument bound to UILauncher.uxml and the shared PanelSettings. Its brand banner (Assets/Sprites/FishMMOBanner.png) has its height recomputed from its own resolved width on every geometry change, because USS has no aspect-ratio property and a fixed height on a full-width element can only be wrong: scale-and-crop fills the strip but slices the top and bottom off the artwork, scale-to-fit keeps it whole but leaves the panel background showing down both sides, and at 3.2:1 against a panel nowhere near that shape either was visible. The ratio is read from the assigned image rather than hardcoded, so replacing the artwork needs no code change. In the footer, Quit sits at the far left and Play/Connect at the far right, separated by the whole width of the panel — the affirmative action where the eye and the cursor finish, the destructive one far enough away that neither is hit by accident.
On handoff the launcher hides its UI and unloads its own scene. Addressables is asked first, because that is how a shipped build loaded the scene and its handle has to be released to free the bundle; SceneManager is the fallback, because Addressables only tracks scenes it loaded itself and silently no-ops for any other — which is exactly the editor case, where ClientLauncher.unity is opened directly and the launcher UI otherwise stayed on screen over the login screen for the rest of the session. UITKClientLauncher also watches sceneLoaded and dismisses itself the moment ClientPostboot arrives, whoever loaded it, as a second and independent guarantee against the same failure.
Settings live in the shared Configuration.GlobalSettings file alongside the game's other options, so the launcher and the in-game Options panel cannot end up with two stores. Every getter clamps: the file is plain text a player can edit, and a timeout of 0 or a retry count of 100000 would otherwise be honoured literally and look like a launcher bug.
| Key | Default | Range | Description |
|---|---|---|---|
Launcher.AutoUpdate |
true |
— | Start downloading an available update without asking. Off parks the launcher on an Update button showing the patch size — the difference between a convenience and a cost on a metered connection |
Launcher.RequestTimeout |
serialized field | 5–300 s | Per-request timeout for version checks and patch downloads |
Launcher.MaxRetries |
serialized field | 0–10 | Retries after an initial failure. Honoured by the patch download only — the news fetch is cosmetic and deliberately runs with none |
Launcher.RetryDelay |
serialized field | 0–30 s | Delay between retries |
Launcher.PatchDirectory |
(empty) | absolute path | Where patch archives are downloaded to and read from. Empty uses the install's own Patches folder. Created if missing; anything unusable falls back to the default with a warning. Not a "move the game" setting — the Updater patches files relative to its own location, so the install root is fixed by construction |
Launcher.WindowWidth / Launcher.WindowHeight |
(unset) | ≥ 480 × 360 | Last window size the player chose. Written shortly after a resize settles rather than at shutdown, because the Updater terminates the launcher rather than closing it. Clamped against the current display, so a size saved on a larger monitor cannot come back with the footer buttons off-screen |
On Windows, Browse opens the native folder dialog (NativeFolderPicker, a SHBrowseForFolder shell call). Unity exposes no runtime folder picker, so the button is hidden on other platforms — the path text field sets the folder on every platform and nothing is unreachable without it.
The launcher is a plain
MonoBehaviourand only exists in Standalone builds. In the Editor and on WebGL theClientPrebootbootstrap loadsClientPostbootdirectly, because neither can run the external updater. A transient-state watchdog (transientStateTimeoutSeconds, default120) recovers the UI if a launcher coroutine dies mid-flight.
Client Settings and Options
Every client setting lives in the same Configuration.cfg beside the client executable that the
launcher uses — one file, one store, one owner. ClientSettings creates and loads it, names every
key exactly once, clamps everything read out of it, and owns the single debounced write that puts
it back on disk.
When settings are loaded and applied
Loading happens in two phases, and the split matters.
BeforeSceneLoad—ClientSettingsBootstrapcreates and loadsConfiguration.GlobalSettingsbefore any scene'sAwake, so the first panel to register already has settings to read. It also creates thePlayerControlsasset and applies the player's saved key bindings — without enabling an action map, so the bindings are inspectable and editable from the login screen while nothing in the world becomes live early.MainBootstrapSystem.OnApplyClientBootSettings— raised during client preload, immediately after the bootstrap system installs its boot-time frame-rate cap and forcesvSyncCountto 0. The saved display mode, quality level, brightness, VSync, frame-rate cap, audio levels and interface scale are applied there.
The order is not incidental. Those two bootstrap lines are a default for a client with no
preference, and anything applied before them is silently overwritten by them — so the hook fires
after, and the player's choice always wins. A scene with no MainBootstrapSystem (the UI validation
and unit-test scenes) is covered by an AfterSceneLoad backstop; applying is idempotent either way.
Before this existed, nothing loaded the settings file at client start-up at all: the store was created lazily by whichever of the launcher or the Options panel asked first, and the Options panel ships closed. In a client started past the launcher, neither ran — key binding overrides were skipped without a word, panel positions were never restored, the theme loaded from nothing, and a saved resolution was never applied.
Brightness drives both RenderSettings.ambientLight and ambientIntensity, because which one
a scene reads depends on its ambient mode: ambientLight applies only under AmbientMode.Flat, and
every world scene is authored AmbientMode.Skybox, where it is ignored outright. Either way it is
re-applied on every sceneLoaded, since ambient is per-scene state baked into whichever scene is
active and the client loads several.
Writes are debounced, and there is exactly one pending write in the client. Configuration.Save
serialises and rewrites the whole file, so a slider bound straight to it rewrites the file once per
frame for as long as it is held. Everything — settings, window positions and launcher options alike
— coalesces onto a short quiet period, driven by a hidden DontDestroyOnLoad pump rather than by a
panel's Update, so a scene with no panels open cannot stop the clock on a write that is already
owed. It is forced out when the Options panel closes, on focus loss and pause, and on quit.
In the Editor the disk write is skipped — Constants.GetWorkingDirectory() resolves to the
repository root there rather than to an install directory — so settings behave normally in play mode
but do not rewrite the checked-out file. On WebGL it is not skipped: the working directory is
Application.persistentDataPath, an Emscripten IDBFS mount, and the write is followed by an
explicit IndexedDB sync — without which the file is written, read back correctly all session, and
gone by the next visit.
Numbers are stored culture-invariantly. Writing with the machine's own locale while reading
invariantly meant that on any comma-decimal system 0.75 was stored as "0,75" and read back as
75, the comma taken as a digit-group separator — so interface scale, brightness, volumes and
window positions all round-tripped to roughly a hundred times their value before being clamped.
Options panel
FishMMO → Options (or the O key, or Escape → Menu → Options) opens a five-tab panel. Every row
that belongs to a list — audio channels, gameplay toggles, theme colours, key bindings — is
generated from the table that defines it rather than authored in the UXML, so a configuration key
cannot be lost by editing a scene.
| Tab | Contents |
|---|---|
| Display | Resolution, refresh rate, fullscreen mode, quality level, texture filtering, antialiasing, brightness, look sensitivity, frame-rate limit, VSync |
| Audio | One slider per channel — Master, Music, Sound Effects, Ambient, Interface, Voice — built from ClientAudioSettings.PlayableChannels; mute when unfocused |
| Gameplay | Damage numbers, healing numbers, achievement popups, ignore party invites, ignore guild invites. Plus a Crosshair section (show, style, size, opacity), a World Labels section (label size, opacity, draw distance, maximum on screen, hide behind geometry) and a Nameplates section (size, opacity, background opacity, show guild names, show titles, maximum on screen, NPC name range, player name range, show my name) |
| Key Bindings | Every rebindable binding in the Player action map, with conflict detection |
| UI | Interface scale, window snap grid, window layout reset, the twelve theme colours, and shareable UI profiles |
Display settings are staged, not live. Every other setting can be undone by the control that set it; a display mode cannot — pick one the monitor will not show and the player cannot see the control that would put it back. The three display dropdowns write to a pending selection, Apply commits it and arms a 12-second countdown, and Keep is the only thing that writes it to the file. Closing the panel with a mode unconfirmed restores the previous one immediately rather than leaving the player waiting out a countdown whose prompt is no longer on screen.
Configuration keys
| Key | Default | Range | Description |
|---|---|---|---|
Resolution Width / Resolution Height |
(unset) | a mode the display reports | Written only by Keep. A saved mode the display no longer offers is refused at boot and the current mode is kept |
Refresh Rate |
(unset) | Hz offered at that resolution | Display refresh rate. Separate from the render cap below — deriving one from the other capped every player at their monitor's rate |
Fullscreen |
FullScreenWindow |
a FullScreenMode value |
Stored as the enum value, not a dropdown index: the list is built per platform, so an index means a different mode on a build without exclusive fullscreen |
Quality Level |
(unset) | a level name | Stored by name, not index — quality levels can be reordered between builds and an index would silently select a different one |
Anisotropic Filtering |
PerTexture (1) |
Off (0), PerTexture (1), Forced (2) |
Stored as the ordinal of ClientDisplaySettings.AnisotropicOption and clamped into range on read — the default honours whatever level each texture was imported with |
Antialiasing |
Balanced (2) |
Off (0), Fast (1), Balanced (2), Temporal (3) |
Edge smoothing on the live camera, stored as the ordinal of ClientCameraSettings.AntialiasingOption. Defaults to SMAA rather than off: the camera itself ships with antialiasing disabled, which is what made silhouettes stair-step |
Brightness |
1.0 |
0–1 | Scene ambient light — both ambientLight (Flat scenes) and ambientIntensity (Skybox scenes). Re-applied on every scene load |
Look Sensitivity |
0.5 |
0.1–1 | Multiplier on camera look input, clamped on both read and write |
Frame Rate Limit |
60 (the boot-time menu cap) |
tick rate – display rate, capped at 500 | Floored at the network tick rate: FishNet derives ticks from the update loop, so a lower frame rate cannot deliver them on schedule. With no preference stored the bootstrap cap stands, rather than jumping to the display's fastest mode — which is what made that cap dead on arrival. A saved value the display no longer offers falls back to the fastest available, since that player did express a preference |
VSync |
false |
— | While on, Application.targetFrameRate is ignored entirely and the frame-rate limit above does nothing. The panel says so |
Audio.Volume.Master |
1.0 |
0–1 | Applied to AudioListener.volume. Stored as the slider position; applied as its square, so the middle of the slider lands near the middle of the perceived range |
Audio.Volume.Music |
0.6 |
0–1 | Below the rest deliberately: it is the only channel that plays continuously, and a score mixed level with combat effects buries the cues a player reacts to |
Audio.Volume.Effects / .Ambient / .Interface / .Voice |
1.0 / 0.8 / 0.8 / 1.0 |
0–1 | Read through ClientAudioSettings.EffectiveVolume(channel) by anything that plays a sound — ClientUIAudio plays one-shot interface sounds on AudioChannel.Interface, and ChannelAudioSource routes a scene's AudioSource through its channel. Every channel in ClientAudioSettings.PlayableChannels gets a slider |
Audio.MuteWhenUnfocused |
false |
— | Silences the client while its window has no focus. Applied on top of Master rather than by writing zero into it, so the saved level survives alt-tabbing |
ShowDamage / ShowHeals / ShowAchievementCompletion |
true |
— | Floating combat text and achievement popups |
IgnorePartyInvites / IgnoreGuildInvites |
false |
— | Invitations are declined, not dropped: an invitation silently discarded leaves the inviter staring at a prompt that never resolves and the server holding an invitation that blocks the next one |
Crosshair.Enabled |
true |
— | Whether the crosshair is drawn at all |
Crosshair.Style |
Cross (0) |
Cross (0), Dot (1), Circle (2) |
Stored as the ordinal of ClientCrosshairSettings.CrosshairStyle; an out-of-range value falls back to the default rather than drawing nothing |
Crosshair.Size |
8 |
4–32 points | Crosshair size |
Crosshair.Opacity |
1.0 |
0.1–1 | Floored above zero — an invisible crosshair is what the show toggle is for |
WorldLabels.Scale |
1.0 |
0.5–2 | Size of the floating world labels |
WorldLabels.Opacity |
1.0 |
0.2–1 | World label opacity |
WorldLabels.Distance |
80 |
10–200 m | Draw distance beyond which world labels are not shown |
WorldLabels.MaxVisible |
64 |
16–256 | Cap on labels on screen; past it the nearest are kept and the furthest dropped |
WorldLabels.Occlude |
false |
— | Hide labels behind geometry. Off by default: it costs a physics ray per visible label, every frame |
WorldLabels.NpcNameRange / .PlayerNameRange |
30 / 30 |
0–200 m | Range within which NPC and player names show. At 0 a name shows only on your target |
WorldLabels.ShowOwnName |
true |
— | Whether your own character's name is drawn |
Nameplates.Scale |
1.0 |
0.5–2 | Nameplate size |
Nameplates.Opacity |
1.0 |
0.2–1 | Nameplate opacity |
Nameplates.BackgroundOpacity |
1.0 |
0–1 | Opacity of the plate behind the text. At zero the names are drawn straight over the world |
Nameplates.ShowGuild / .ShowTitles |
true |
— | Whether guild names and titles appear on nameplates |
Nameplates.MaxVisible |
64 |
8–256 | Cap on nameplates on screen; the nearest are kept |
Map.ShowCoordinates |
true |
— | Numeric coordinates on the map and minimap — subject to the character's Cartography tier, which can withhold them regardless |
Map.MinimapFrameRate |
30 |
5–60 fps | How often the minimap is re-rendered. Capped: past the draw rate it buys nothing and only spends frame budget |
Map.MinimapRotates |
false |
— | Minimap turns with the character rather than staying north-up |
Map.MinimapZoom |
25 |
5–200 | Minimap zoom, written by the minimap itself rather than by the options panel |
UI.Scale |
1.0 |
0.75–1.5 | Interface scale, applied by dividing the shared PanelSettings reference resolution. Restored to the authored value when Editor play mode ends, so a play session cannot dirty the asset — QualitySettings (current level and its vSyncCount) is protected the same way, for the same reason |
UI.SnapGridSize |
8 |
0–32 points | Grid that dragged panels snap to. 0 disables snapping |
UI.Panel.<name>.X / .Y |
(unset) | panel points | Where the player dragged each window. Re-clamped into the viewport on restore, so a position saved on a 21:9 monitor is still reachable on a 16:9 one |
InputBindingOverrides |
(unset) | JSON | Key binding overrides for the whole asset. A value that cannot be parsed is discarded with a log and the defaults are used — it used to abort input initialisation entirely, leaving the player in the world with no controls and no way to reach the panel that would reset them |
<Name>ColorR/G/B/A |
(unset) | 0–255 | The twelve themeable colours (UITKTheme.ColorNames): Primary, Secondary, Highlight, Background, Text, Health, Mana, Stamina, Crosshair, TooltipLabel, ScrollTrack, ScrollThumb. Presence is decided by the R channel, so a legitimately black colour is not mistaken for an absent one. Clearing one removes the keys rather than emptying them, so a reset does not leave forty-eight dead lines in the file |
UI profiles
The UI tab can save the window layout, interface scale, snap grid and colour scheme to a file of
its own under <install root>/UIProfiles/<name>.cfg, and load one back. This is deliberately not
Configuration.cfg: that file holds the whole client's settings, including its API host, launcher
state and this machine's display mode, none of which is meaningful on another player's computer and
some of which is actively wrong there. A profile carries only the parts worth sharing, so it can be
handed to somebody else as a plain text file.
Configuration.cfg stays the source of truth. Loading a profile writes its keys into the global
store and saves; nothing reads a profile at runtime, so a profile that is later deleted cannot take
the player's interface with it. A profile is applied wholesale, including the absence of a key —
a window it says nothing about returns to where the stylesheet puts it, because merging somebody
else's layout over yours produces an arrangement neither of you has ever seen. Every value is
re-validated on the way in: panel coordinates are re-clamped into the viewport, the scale is clamped
to the range the slider offers, and a key the format does not define is ignored rather than copied
through.
Key bindings
The Key Bindings tab lists every rebindable binding in the Player action map, one row per
binding — composite parts (Move / up, Move / down, …) get their own rows, because that is where
the keys a player actually wants to change live. Gamepad rows are captioned as such and only accept
gamepad controls; keyboard rows only accept keyboard and mouse controls.
Three rules govern the prompt, and all three hold on every row:
- Escape cancels. It can never be bound to anything. The cancelling key press is consumed by the rebind, so it cancels the prompt without also closing the Options panel behind it.
- Backspace clears. It can never be bound to anything either. Pressing it while a row is
listening leaves that binding unbound — the action stops working until something is bound to it
again. The row's own
↺restores the key the game shipped with. - Duplicates are not allowed. A rebind that would put two bindings on one control is undone and reported, naming the binding that already holds the key. Two actions on one key produces a client where one of them appears to have stopped working with nothing on screen saying why, and the player who created it is the least likely person to suspect the settings screen.
Those three combine into the way keys are swapped: clear the binding that holds the key you want, then bind it. Without the clear, refusing duplicates would make a swap impossible — there would be no way to free a key.
The left mouse button is also unbindable. PerformInteractiveRebinding suppresses the events it
matches, so with the left button eligible the first click after starting a rebind — including the
click meant to cancel it — was swallowed and bound to the action instead. Other mouse buttons stay
bindable.
A per-row ↺ restores that row's shipped key, and is refused if doing so would create a duplicate.
Reset All Keys discards every rebind at once after a confirmation, and is the unconditional way
back: the state it produces is the shipped one and cannot collide with itself. Both it and the status
line sit outside the scrolling list, so neither is off-screen behind forty rows of bindings.
Escape cannot be captured, so Escape → Menu → Options is reachable no matter what a player binds.
Default bindings
| Action | Keyboard / Mouse | Gamepad |
|---|---|---|
| Move | W A S D |
Left stick |
| Look | Mouse | Right stick |
| Jump | Space |
A / Cross |
| Crouch | C |
L3 |
| Sprint | Left Shift |
Left trigger |
| Interact | E |
X / Square |
| Toggle Mouse Mode | Tab |
Select |
| Toggle First Person | F1 |
— |
| Cancel (interrupt cast) | Escape |
B / Circle |
| Close Last UI | Escape |
B / Circle |
| Menu | Escape |
Start |
| Chat | Enter, / |
— |
| Hotkeys 1–10 | 1–9, 0 |
— |
| Inventory | I |
— |
| Abilities | K |
— |
| Equipment | P |
— |
| Guild | G |
— |
| Party | Y |
— |
| Friends | T |
— |
| Achievements | J |
— |
| Factions | U |
— |
| Minimap | M |
— |
| World Map | N |
— |
| Lore | L |
— |
| Arena scoreboard | B |
— |
| Pin Target (toggles keeping the current target on the HUD) | F |
— |
| Pet | V |
— |
| Options | O |
— |
Escape drives Cancel, Close Last UI and Menu together by design — Cancel interrupts a cast, Close
Last UI closes the top panel, and Menu opens the menu when neither of the first two had anything to
do. That authored overlap is exempt from duplicate detection; overlaps a player creates are not.
Windows the server opens have no key, and that is deliberate: a merchant, bank, loot window, NPC dialogue, shrine, gathering node, trade container, mailbox or dungeon finder is opened by a server reply after it has validated an interaction with something in the world. A key would either open a window the server never populated or claim to open a mailbox the character is not standing in front of — and a player who found the empty window would reasonably report it as broken. The scene channel picker and the instance panel are reached from the game menu instead, because both are rare, deliberate acts rather than windows a player flicks in and out of.
Client TLS Certificate Pinning
The client pins TLS certificates to prevent man-in-the-middle attacks on API and WebTransport connections. Pins are IL-embedded at compile time via FishMMO-Unity/Assets/FishMMO/Client/Security/CertificatePins.generated.cs -- no separate configuration file is needed.
Development builds: Empty pins are allowed (TOFU / trust-on-first-use mode). Release builds: At least 2 pins (active + backup) are required. The build will fail if fewer than 2 valid pins are configured or if sentinel placeholders are still present.
Where the pins come from: FishMMO Dashboard → Game Settings → Certificate Pins. A pin is the base64 SHA-256 of a public key (its SPKI). The client needs two:
- The live pin — the key of the certificate the servers present. Either:
- Fetch Pins opens a TLS connection to the API host (or a Custom Host) on port 443 and hashes the key it presents. Only hosts serving HTTPS on 443 work; QUIC-only game names fail. From the server's own LAN this fails too when the router has no hairpin NAT (most home routers):
api.<domain>resolves to the public address, which the router does not loop back. - Pin from Certificate File… reads the deployed certificate instead —
/etc/fishmmo/certs/fullchain.pem(readable by thefishmmo-certsgroup) or/etc/letsencrypt/live/<domain>/fullchain.pem. It needs no network and gives the same pin, so use it when the editor runs on the server.
- Fetch Pins opens a TLS connection to the API host (or a Custom Host) on port 443 and hashes the key it presents. Only hosts serving HTTPS on 443 work; QUIC-only game names fail. From the server's own LAN this fails too when the router has no hairpin NAT (most home routers):
- The backup pin — the key of a spare key pair kept offline, never on the server. If the live key is lost or compromised, the certificate is reissued for the spare key and every shipped client keeps connecting. The live certificate cannot reveal it, so it is added under Backup Pins:
- Generate Backup Key… creates an EC P-256 key (the same type as the Let's Encrypt key), saves it as an unencrypted PKCS#8 PEM with mode 600 wherever you choose outside the repository (it refuses paths inside it and never overwrites), and adds its pin. Move that file somewhere offline (password manager, USB drive) and delete the local copy.
- Add from Key/Certificate File… takes a key made elsewhere (
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out fishmmo-backup.key), its public key, or a certificate. - Paste Pin accepts the base64 value directly.
Write Pins to File writes both into values.Pins in CertificatePins.generated.cs; backup entries carry a // backup comment so the Dashboard loads them back into the backup list (the client treats every pin alike), and a later Fetch or rewrite keeps them. Fewer than two pins still writes, with a warning, and a release build then refuses to build.
Pins and Let's Encrypt. A pin is the hash of the certificate's public key, so it survives renewal only if the key does: the Installer issues with --reuse-key for that reason (see TLS Certificates). Certbot records the choice as reuse_key = True in /etc/letsencrypt/renewal/<domain>.conf; keep it there, never pass --new-key, and never delete the lineage, or every shipped native client stops connecting.
Switching to the backup key (live key lost or compromised): bring the backup key to the server, issue a certificate for it from a CSR with the same DNS hooks, and install its files where the lineage's are:
sudo openssl req -new -key fishmmo-backup-key.pem -subj "/CN=example.com" \
-addext "subjectAltName=DNS:example.com,DNS:*.example.com" -out backup.csr
sudo certbot certonly --csr backup.csr --manual --preferred-challenges dns \
--manual-auth-hook "/etc/letsencrypt/fishmmo-porkbun-hook.py auth" \
--manual-cleanup-hook "/etc/letsencrypt/fishmmo-porkbun-hook.py cleanup" \
--cert-path backup-cert.pem --fullchain-path backup-fullchain.pem --chain-path backup-chain.pem
Certbot does not renew a certificate issued from a CSR, so repeat the request before it expires (90 days) until a regular lineage uses the key. Then generate a new backup key, and ship a client carrying the new pair of pins before the next emergency.
Pinning applies to native clients. A browser does its own certificate validation and WebTransport offers no pinning, so the WebGL/WebGPU client relies on the public CA; the release-build gate still requires the two pins for every target.
To generate SPKI pin hashes manually from your certificate:
# From a live server
openssl s_client -connect api.fishmmo.com:443 -servername api.fishmmo.com </dev/null 2>/dev/null \
| openssl x509 -pubkey -noout \
| openssl pkey -pubin -outform der \
| openssl dgst -sha256 -binary \
| openssl base64
# From a certificate file
openssl x509 -in cert.pem -pubkey -noout \
| openssl pkey -pubin -outform der \
| openssl dgst -sha256 -binary \
| openssl base64
Production Deployment
Public Launch Checklist (Single Host)
Everything on one Linux machine behind a home or office router, playable in the browser (WebGPU) and with native clients, admission by beta code. example.com stands for your domain. Every client and server addresses the hosts by name, never by IP, so a changed IP is one DNS update.
DNS (Porkbun). Point
api,play,gameandpanelat the public IPv4 withArecords: Installer → Web Server → 7 does it through the Porkbun API (after the certificate step has stored the keys, or it asks for them), shows the changes first, and leaves the bare domain and every other record alone. Rerun it when the ISP changes the address. If the ISP changes your IP, run a dynamic-DNS client that speaks Porkbun's API (ddclientdoes) against the same records. While there, create an API key with DNS permission and turn on API Access for the domain; the certificate step uses it. Agame.record behind a proxying CDN would not work: QUIC is UDP and must reach the host directly.Network. Forward TCP 443 and UDP 7770-7999 (and optionally UDP 443; not TCP 80, which the DNS challenge does not need) from the router to the host, open the same in
ufw, and rule out CGNAT — see Firewall Configuration.Database. For a launch, start from an empty schema: Starting Fresh. Then make sure PgBouncer answers on 6432: Configure pgBouncer.
Certificate. Installer → Web Server → 2, DNS challenge, root domain
example.com, the account that will run the game servers. Try staging first. See TLS Certificates.NGINX. Installer → Web Server → 1 (installs the stream module), then → 3 with the same root domain.
sudo ss -ulpn | grep ':7770'should now show nginx.Domain in the Production templates, before building anything. They ship with
fishmmo.com:LoginServer.cfg—AllowedOrigins=https://play.example.com,Smtp:FromAddressappsettings.IpFetchServer.Production.json,appsettings.Patcher.json—Cors:AllowedOriginsappsettings.WebGLServer.json—GameHost(game.example.com) andContentSecurityPolicy:ConnectOrigins(https://api.example.com)appsettings.ControlPanel.json—AllowedHosts(panel.example.com)
sed -i 's/fishmmo\.com/example.com/g' FishMMO-Setup/Production/*.cfg FishMMO-Setup/Production/*.jsondoes all of them.Unity → FishMMO Dashboard → Game Settings. Host Config: API Host
https://api.example.com/, Game Hostgame.example.com, Play Hostplay.example.com, Root Domainexample.com, then Write Host Config. Client Secret: Write Secret to File (after the database keys exist). Certificate Pins: the live pin with Pin from Certificate File… (/etc/fishmmo/certs/fullchain.pem; Fetch Pins fails from the server's own LAN without hairpin NAT), a backup with Generate Backup Key… (store the key offline), then Write Pins to File — see Client TLS Certificate Pinning.Build.
- Server: Build Type Server, OS Target Linux, Environment Production → Build Addressables → Build Game. It copies the Production
.cfgfiles andappsettings.jsonbeside the executable. - Web servers:
dotnet publish -c Releaseeach (see Starting Web Servers), then Installer → Web Server → 5. - Browser client: Build Type Client, OS Target WebGL (the web build renders with WebGPU), Environment Production → Build Addressables → Build Game, and copy the output into the WebGL server's
wwwroot/. Players need a browser with both WebGPU and WebTransport (current desktop Chrome or Edge).
- Server: Build Type Server, OS Target Linux, Environment Production → Build Addressables → Build Game. It copies the Production
Run the game servers with the AppHealthMonitor (Production template,
Headless: true) or the systemd units under Systemd Services: Login, then World, then Scene. The account that runs them must be infishmmo-certs.First administrator and beta codes: see the next section.
Check from outside the LAN (a phone on mobile data):
https://play.example.comloads and the browser console shows the WebTransport session togame.example.com:7770;curl -sI https://api.example.com/latest_versionanswers from IPFetch/Patcher (a refusal from the client gate is the expected answer tocurl);https://panel.example.comshows the sign-in page.
Closed Beta: First Administrator and Beta Codes
The Production templates ship with verification off and the beta gate on: LoginServer.cfg has VerifyEmail/VerifySms/VerifyDiscord=false, BetaMode=true, BetaPrograms=closed_beta, and appsettings.ControlPanel.json has Verification all false and Beta: { Enabled: true, Programs: ["closed_beta"] }. Keep the two files in step. New accounts are verified at creation, still enrol in two-factor authentication, and cannot be created without a code; sign-in refuses players who hold no code. Staff (GameMaster and above) are never refused.
A fresh database has no accounts and no codes, and registering needs a code that only an administrator can mint. The installer makes the first administrator:
- Installer → Database → A — Create Admin Account (after 9 — Configure Server Keys, which creates the TOTP master key it needs). It asks for an account name, email, age and password (the game's own rules), then creates the account in one transaction: Admin, verified, email as its channel, and enrolled in two-factor authentication, with the change written to the audit log (source
installer). It connects with the servers' own database credentials, so no superuser password is asked for. It never touches an existing account; promote one from the panel instead. - Add the authenticator and save the recovery codes. They are shown once: a QR code in the terminal when
qrencodeis installed (sudo pacman -S qrencode), the key for manual entry, theotpauth://URI and the recovery codes. Nothing is written to disk, and the screen is cleared after you confirm you saved them. - Sign in at
https://panel.example.comwith the account name, the password and a code from the authenticator. The same account signs in to the game, and the beta gate never refuses it. - Mint codes: Administration → Beta codes. Choose the program (
closed_beta), how many codes, how many accounts each admits, an optional expiry and a reason; confirm with a fresh two-factor code. The codes are shown once, with Copy and Download — save them before leaving the page. The same page lists codes per program and revokes a code.
Players enter the code on the game's Register screen or on the panel's registration page. An account created before the gate was switched on can redeem a code later in the panel. To open the game to everyone, set BetaMode=false and Beta:Enabled=false and restart the LoginServer and the panel.
Linux Config Hardening
The installer applies several hardening measures for production Linux deployments:
- Core dump disabling — Prevents sensitive memory from being written to disk.
- ptrace restrictions — Restricts process tracing to root only (
kernel.yama.ptrace_scope = 1). - File permissions —
appsettings.jsonset to600or640, owned by the service user. - PostgreSQL hardening — Password auth only, restricted listen addresses, connection limits.
Firewall Configuration
The installer can automate host firewall rules for the ports NGINX requires:
- Linux: Uses
ufw(preferred) orfirewalld. The menu entry adds 443/tcp and the UDP game range 7770-7999, and deliberately not 80/tcp; an install config opens the ports in itsfirewallPorts(thefulltemplate includes7770-7999/udp), or add them by hand as below. The host firewall is only half of it: behind a router the same ports must also be forwarded (below). - Windows: Uses
netsh advfirewall— adds inbound rules for the same ports. - Menu: Web Server →
4| CLI:--component firewallorinstall-config.json"configureFirewall": true
Standard deployment (NGINX on same machine as backend servers):
Only NGINX's public ports need to be open. Backend servers bind to loopback and are invisible to the public network:
# HTTPS (the only TCP port that needs to be publicly accessible)
sudo ufw allow 443/tcp
# Only with the HTTP challenge: port 80 for Let's Encrypt and the HTTP → HTTPS redirect.
# With the DNS challenge leave it closed; nothing unencrypted is then reachable.
# sudo ufw allow 80/tcp
# UDP game ports — NGINX listens publicly, forwards to loopback game servers
sudo ufw allow 7770:7999/udp
# Optional: HTTP/3 for play.<domain> (nginx listens with `listen 443 quic`)
sudo ufw allow 443/udp
Behind a home or office router the same ports must also be forwarded from the router's WAN side to the server's LAN address (give the server a fixed LAN IP or a DHCP reservation first):
| Protocol | Port(s) | Purpose |
|---|---|---|
| TCP | 443 | HTTPS for api., play., panel. |
| TCP | 80 | Only with the HTTP challenge (and its HTTP → HTTPS redirect); leave closed with the DNS challenge |
| UDP | 7770-7999 (at least 7770, 7780 and 7790 up to your last scene server) | QUIC game traffic |
| UDP | 443 | Optional, HTTP/3 |
Two things to check with the ISP before relying on it: CGNAT (if the router's WAN address differs from the public address curl -4 https://ifconfig.me reports, inbound connections cannot reach you at all) and whether inbound TCP 80 is blocked (only the HTTP challenge needs it). Many routers do not loop a request for your own public address back to the LAN ("hairpin NAT"), so test from outside — a phone on mobile data — or temporarily map the host names to the LAN IP in /etc/hosts on the machine you test from.
Multi-machine deployment (NGINX on separate machine from backend servers):
Only the NGINX machine opens public ports. Backend servers only need to accept connections from NGINX's IP (private network):
# On the NGINX machine (add 80/tcp only for the HTTP challenge):
sudo ufw allow 443/tcp
sudo ufw allow 7770:7999/udp
# On each backend server machine (restrict to NGINX's IP):
sudo ufw allow from <nginx-ip> to any port 8000,8080,8090 proto tcp
sudo ufw allow from <nginx-ip> to any port 7770:7999 proto udp
Backend HTTP ports (
8000,8080,8090,8100) should never be opened to the public — NGINX is the only entry point.
Systemd Services
All FishMMO server components are designed to run as systemd services. Reference units:
GameServer Login
[Unit]
Description=FishMMO LoginServer
Requires=postgresql.service
[Service]
Type=simple
User=fishmmo
WorkingDirectory=/opt/fishmmo/LoginServer
ExecStart=/opt/fishmmo/LoginServer/GameServer LOGIN
Restart=on-failure
RestartSec=5
Environment=FISHMMO_ENVIRONMENT=Production
[Install]
WantedBy=multi-user.target
GameServer World
[Unit]
Description=FishMMO WorldServer
After=fishmmo-login.service
Requires=fishmmo-login.service
[Service]
Type=simple
User=fishmmo
WorkingDirectory=/opt/fishmmo/WorldServer
ExecStart=/opt/fishmmo/WorldServer/GameServer WORLD
Restart=on-failure
RestartSec=5
Environment=FISHMMO_ENVIRONMENT=Production
[Install]
WantedBy=multi-user.target
GameServer Scene
[Unit]
Description=FishMMO SceneServer
After=fishmmo-world.service
Requires=fishmmo-world.service
[Service]
Type=simple
User=fishmmo
WorkingDirectory=/opt/fishmmo/SceneServer
ExecStart=/opt/fishmmo/SceneServer/GameServer SCENE
Restart=on-failure
RestartSec=5
Environment=FISHMMO_ENVIRONMENT=Production
[Install]
WantedBy=multi-user.target
Enable all services:
sudo systemctl daemon-reload
sudo systemctl enable --now fishmmo-login
sudo systemctl enable --now fishmmo-world
sudo systemctl enable --now fishmmo-scene
sudo systemctl enable --now apphealthmonitor
Web Server Systemd Services (Installer-Generated)
The installer can automatically generate and register systemd units for the ASP.NET web servers (Web Server menu, option 5, or CLI --component systemd-services). It finds each server's publish directory, generates a .service file with the correct working directory, ExecStart, User, and EnvironmentFile/Environment entries, and runs systemctl enable --now.
Generated services:
fishmmo-ipfetch.service— IPFetch Web Server on port 8080fishmmo-patcher.service— Patcher Web Server on port 8090fishmmo-webgl.service— WebGL Web Server on port 8000fishmmo-controlpanel.service— Control Panel on port 8100
The generated service units set Environment=ASPNETCORE_ENVIRONMENT=Production and Environment=FISHMMO_ENVIRONMENT=Production, plus Restart=always / RestartSec=5 and After=network.target postgresql.service. User= is set to the account that ran the installer, not a dedicated service user — edit the unit if you want the servers to run as fishmmo. Each server must have been published to Builds/<project>/Release/net8.0/publish first; the installer skips any it cannot find. Application secrets (gate secret, KEK, connection token HMAC key) are not set via environment variables or env files -- they are loaded from the database at startup by each server. Database credentials can be provided via EnvironmentFile=-/etc/fishmmo/db-secrets.env or the FISHMMO_DB_* environment variables.
# Verify after installer-generated registration:
systemctl status fishmmo-ipfetch fishmmo-patcher fishmmo-webgl fishmmo-controlpanel
Port Reference
| Port | Service | Protocol | Listens On | Public Exposure |
|---|---|---|---|---|
| 80 | NGINX (HTTP → HTTPS redirect) | TCP | 0.0.0.0 |
Public |
| 443 | NGINX (HTTPS) | TCP | 0.0.0.0 |
Public |
| 443 | NGINX (HTTP/3 for play.) |
UDP | 0.0.0.0 |
Public (optional) |
| 5432 | PostgreSQL | TCP | 127.0.0.1 |
None (loopback only) |
| 6432 | PgBouncer | TCP | 127.0.0.1 |
None (loopback only) |
| 7770-7779 | LoginServer(s) | UDP (QUIC) | 127.0.0.1 by default |
Via NGINX L4 stream only |
| 7780-7789 | WorldServer(s) | UDP (QUIC) | 127.0.0.1 by default |
Via NGINX L4 stream only |
| 7790-7999 | SceneServer(s) | UDP (QUIC) | 127.0.0.1 by default |
Via NGINX L4 stream only |
| 8000 | WebGL Static Server | TCP (HTTP) | 127.0.0.1 |
Via NGINX reverse proxy only |
| 8080 | IPFetch Server | TCP (HTTP) | 127.0.0.1 |
Via NGINX reverse proxy only |
| 8090 | Patcher Server | TCP (HTTP) | 127.0.0.1 |
Via NGINX reverse proxy only |
| 8100 | Control Panel | TCP (HTTP) | 127.0.0.1 |
Via NGINX reverse proxy only (panel.) |
All backend services bind to loopback by default. NGINX is the only component with public-facing listeners. Desktop/native clients connect to NGINX's public IP for both HTTP APIs and UDP game traffic — from the client's perspective, it talks to
api.fishmmo.com:443andgame.fishmmo.com:7770; NGINX transparently proxies to the loopback-bound backend. If a backend server runs on a different machine, change its bind address and the corresponding NGINX upstream/stream target.
Certbot Deploy Hook (TLS Renewal)
The Installer's Let's Encrypt action generates and installs the hook; there is nothing to write by hand. See Game server copy and renewal for what it does.
┌──────────────────────────────────────────────────────────────┐
│ certbot.timer → certbot renew │
│ └─ DNS challenge: fishmmo-porkbun-hook.py auth / cleanup │
│ → new files in /etc/letsencrypt/live/<domain>/ (same key) │
│ ↓ │
│ /etc/letsencrypt/renewal-hooks/deploy/fishmmo-certificates │
│ ├─ check unexpired, check cert matches key │
│ ├─ copy → /etc/fishmmo/certs/release.*/ (root:fishmmo-certs 0640) │
│ ├─ switch the 'current' symlink atomically │
│ └─ nginx -t && systemctl reload nginx │
│ Game servers: restart them yourself (MsQuic loads at start) │
└──────────────────────────────────────────────────────────────┘
Test the renewal pipeline (uses the staging server, changes nothing live):
sudo certbot renew --dry-run
Architecture
Connection Pipeline
The full end-to-end connection flow is documented in CONNECTION_PIPELINE.md. Key phases:
| Phase | Description |
|---|---|
| 1. Launcher Startup | News fetch, version check, HMAC-signed API requests |
| 2. Server Discovery | IPFetch returns active login servers + one-time connection token |
| 3. QUIC/WebTransport | QUIC Initial → TLS 1.3 handshake → encrypted tunnel |
| 4. X25519 ECDH | Stateless cookie challenge → key agreement → AES-256-GCM session |
| 5. SRP-6a Auth | Zero-knowledge password proof, async worker channel, token issuance |
| 6. TOTP 2FA | 6-digit code or recovery code, failure lockout |
| 7. Token & Character | Token hash persisted, character CRUD, server list |
| 8. World Server | Token auth with HMAC verification, renewal token |
| 9. Scene Server | Same token auth flow, order-independent scene handshake, gameplay begins |
| 9a. Scene-Routing Queue | When there is nowhere to route yet — capacity, a scene still loading, or a combat-logout body only one instance can return — the client waits on the World server and is told its position and the reason |
| 10. Token Lifecycle | Auto-renewal after each auth, revocation on logout/pause/quit |
Server Initialization Order
The 5-phase server startup sequence is documented in SERVER_INITIALIZATION_ORDER.md:
| Phase | What Happens |
|---|---|
| 1. MainBootstrap | Unity loads bootstrap scene, initializes logging, enqueues ServerLauncher |
| 2. ServerLauncher | Determines server type (args), loads server scenes additively |
| 3. Server Scene | Server.Start() — finds NetworkManager, creates CoreServer, fetches external IP |
| 4. Finalize Setup | Data containers initialized, behaviours registered, physics + network started |
| 5. Runtime | Frame-based LateUpdate, client connections, periodic callbacks |
Key guarantee: RuntimeDataContainers are always initialized before ServerBehaviours — no race conditions between logic and data.
Gameplay Simulation
Combat and movement run through one prediction pipeline rather than per-subsystem ones. The
details are in
Assets/FishMMO/Shared/Implementation/Entity/Prediction/README.md;
the shape is:
| Layer | What it does |
|---|---|
| One entry point | CharacterPredictionController owns the single [Replicate] / [Reconcile] pair on a character and drives every subsystem through it in Order: KCC movement (80) → buffs (85) → cooldowns (90) → equipment (93) → attributes (95) → abilities (100). The order encodes real data dependencies — contributors settle before the authoritative total that subsumes them is installed. |
| Input, not state | CharacterReplicateData carries only input, quantised on the producer before it predicts, so the owner never simulates at a precision the wire cannot carry. |
| A loss-detecting delta chain | CharacterReconcileData is delta-encoded against the previous state the server sent, with a one-byte sequence so a dropped datagram costs "no correction until the next snapshot" rather than "a wrong correction for a second". |
| Lag compensation | Hits resolve against where the caster's client saw its peers. The client contributes its full round trip plus its interpolation buffer; the server adds its own replicate queue depth and rewinds every character in the scene for the duration of one query. Every latency term cancels exactly. |
| Observers are told, not simulating | State forwarding is deliberately off. Observers receive position via NetworkTransform and everything else via explicit broadcasts, and the spawn payload carries an observer-shaped form of each so a late joiner reconstructs what a continuous observer holds. |
| Server-only physics | A physics query is not reproducible across peers, so every target selector and hit action runs on the server, inside the caster's rewound world, and caps its result only after ranking and per-body dedupe. |
Behaviour is pinned by roughly 2,100 test methods across 221 fixtures
(Assets/FishMMO/Tests/UnitTests/README.md), including a
closed-loop fixture that composes both halves of the lag-compensation derivation across a spread
of round-trip times and asserts the server resolves to the position the shooter was rendering.
Flow Diagram
flowchart TB
subgraph Internet
Player["Player Client<br/>(Desktop / WebGL)"]
end
subgraph NGINX["NGINX Reverse Proxy (ports 80/443)"]
SSL["NGINX<br/>L7: TLS termination (HTTP APIs)<br/>L4: UDP forward (no TLS for QUIC)"]
end
subgraph WebServices["ASP.NET Web Services"]
IPFetch["IPFetch Server<br/>:8080<br/><i>Login server discovery</i>"]
Patcher["Patcher Server<br/>:8090<br/><i>Patch delivery</i>"]
WebGL["WebGL Server<br/>:8000<br/><i>Static file serving</i>"]
Panel["Control Panel<br/>:8100<br/><i>Admin dashboard + account API</i>"]
end
subgraph GameServers["Game Servers (GameServer executable)"]
Login["LoginServer<br/>:7770<br/><i>SRP-6a auth, account mgmt</i>"]
World["WorldServer<br/>:7780<br/><i>World state, routing</i>"]
Scene1["SceneServer<br/>:7790<br/><i>Gameplay simulation</i>"]
SceneN["SceneServer<br/>:779x<br/><i>Additional scenes</i>"]
end
subgraph DataLayer["Data Layer"]
PgBouncer["pgBouncer<br/>:6432<br/><i>Connection pooler</i>"]
PostgreSQL["PostgreSQL<br/>:5432"]
end
subgraph Monitoring["Monitoring"]
HealthMon["AppHealthMonitor<br/><i>Process lifecycle,<br/>health checks,<br/>auto-restart</i>"]
end
subgraph BuildPipeline["Build & Patch Pipeline"]
Unity["Unity Editor<br/><i>Build clients & servers</i>"]
PatchGen["PatchGenerator<br/><i>Create delta patches</i>"]
Updater["Updater<br/><i>Apply patches on client</i>"]
end
subgraph OptionalServices["Optional Services"]
DiscordBot["DiscordBot<br/><i>Chat bridge</i>"]
end
Player -->|"HTTPS :443"| SSL
Player -->|"QUIC/UDP :7770-7999"| SSL
SSL -->|"/loginserver"| IPFetch
SSL -->|"/latest_version<br/>/{version}"| Patcher
SSL -->|"/ (static)"| WebGL
SSL -->|"UDP stream :7770"| Login
SSL -->|"UDP stream :7780"| World
SSL -->|"UDP stream :7790+"| Scene1
SSL -->|"panel.fishmmo.com"| Panel
Player -.->|"Direct UDP/QUIC<br/>(only if NGINX on<br/>separate machine)"| Login
Player -.->|"Direct UDP/QUIC<br/>(only if NGINX on<br/>separate machine)"| World
Player -.->|"Direct UDP/QUIC<br/>(only if NGINX on<br/>separate machine)"| Scene1
Login --> PgBouncer
World --> PgBouncer
Scene1 --> PgBouncer
SceneN --> PgBouncer
PgBouncer --> PostgreSQL
IPFetch --> PostgreSQL
Panel --> PostgreSQL
World --> Scene1
World --> SceneN
HealthMon -.->|"Monitor & restart"| Login
HealthMon -.->|"Monitor & restart"| World
HealthMon -.->|"Monitor & restart"| Scene1
HealthMon -.->|"Monitor & restart"| SceneN
HealthMon -.->|"Monitor & restart"| IPFetch
Panel -.->|"planned: telemetry + commands"| HealthMon
DiscordBot -->|"Chat API"| Scene1
Unity --> PatchGen
PatchGen --> Patcher
Patcher -->|"Serves patches"| Player
Player -->|"Downloads & applies"| Updater
License
This project is licensed under the MIT License. See LICENSE for details.
The MIT License covers first-party FishMMO code. Third-party components in this repository and in
the builds made from it (for example FishNet, Kinematic Character Controller, MsQuic, quictls,
Npgsql, Entity Framework Core and the other NuGet libraries) remain under their own licences. They
are listed, with their licence texts, in THIRD-PARTY-NOTICES.md; the
per-product files that ship with each build are generated into Licenses/ by
python3 Licenses/generate_notices.py from Licenses/components.json.