Table of Contents

Getting Started

Prerequisites

  • Unity 6.3 LTS with IL2CPP scripting backend
  • .NET SDK 8.0 for server/web projects
  • PostgreSQL 14+ for the database
  • NGINX for reverse proxy (Linux deployment)
  • cmake 3.20+ and C++17 compiler for the native WebTransport library

Quick Start (Development)

1. Database Setup

# Install PostgreSQL and create the database
createdb fishmmo

# Apply migrations
cd FishMMO-Database/FishMMO-DB-Migrator
export FISHMMO_CONNECTION_STRING="Host=localhost;Database=fishmmo;Username=postgres;Password=postgres"
dotnet run

2. Build Native WebTransport Library

cd FishMMO-WebTransport
./build_linux.sh    # Linux
./build_macos.sh    # macOS (must be run on a Mac)
# Windows: use Visual Studio 2022 with CMake

3. Configure Servers

Copy and edit the config files from FishMMO-Setup/Development/:

cp FishMMO-Setup/Development/*.cfg FishMMO-Setup/Development/appsettings*.json .
# Edit LoginServer.cfg, WorldServer.cfg, SceneServer.cfg
# Set database credentials in appsettings.json or via environment variables

4. Run Servers

# Start each server in its own terminal:
dotnet run --project FishMMO-WebServers/IPFetchASP.NET/IpFetchServer
dotnet run --project FishMMO-WebServers/PatcherASP.NET/Patcher
# Game servers run within Unity:
# Open FishMMO-Unity in Unity, load the Server bootstrap scene, press Play

5. Run Client

Open FishMMO-Unity in Unity, load the Client bootstrap scene, press Play.

Production Deployment

See FishMMO-Setup/ for:

  • nginx.conf — NGINX reverse proxy configuration
  • install-config.full.json — Full production install manifest
  • gen-fishmmo-stream-config.sh — UDP stream proxy config generator
  • deploy-hooks/certbot-fishmmo.sh — TLS certificate renewal hook

TLS Certificates

Each game server terminates its own QUIC/TLS. Certificate paths are configured in .cfg files:

  • Linux: /etc/fishmmo/certs/fullchain.pem and privkey.pem
  • Windows: C:\ProgramData\FishMMO\certs\fullchain.pem
  • macOS: /usr/local/share/fishmmo/certs/fullchain.pem

Use Let's Encrypt with the provided certbot deploy hook for automatic renewal.

Environment Variables

Database credentials and some service secrets are configured via environment variables:

  • Npgsql__Password, Npgsql__Username — Database credentials
  • FISHMMO_SMTP_HOST, FISHMMO_SMTP_PASSWORD — Email sending
  • Discord__Token — Discord bot token

Note: The ClientGate HMAC signing secret is no longer configured via environment variables. It is loaded exclusively from the deployment_secrets database table at web server startup (by IDeploymentSecretService + GateSecretHolder). Run fishmmo-installer → Database → Configure Server Keys to populate it. See the individual web server READMEs for details.

Client Security Secrets

The Unity client embeds shared secrets for HMAC request signing and certificate pinning. These are generated via Unity Editor tools:

  • FishMMO > Security > Fetch Client Secrets — writes ClientApiSecret.generated.cs
  • FishMMO > Security > Fetch Certificate Pins — writes CertificatePins.generated.cs

These .generated.cs files are regenerated per-deployment and must match the server-side secrets loaded from the database. They are not produced by CI substitution.

Platform Support

Platform Client Server
Windows x64
Linux x64
macOS x64 ⚠️ (untested)
WebGL (Browser) ⚠️ (requires HTTP/3 WebTransport server upgrade) N/A