Table of Contents

Installation Guide

Install and run Moongate v2 with the current runtime requirements.

Requirements

  • .NET SDK 10.0.x
  • Git
  • Ultima Online data directory (path passed with --uo-directory or MOONGATE_UO_DIRECTORY)

Clone And Build

git clone https://github.com/moongate-community/moongate.git
cd moongate
dotnet restore
dotnet build -c Release

Run (Local)

dotnet run --project src/Moongate.Server -- \
  --root-directory ./moongate \
  --uo-directory /path/to/uo \
  --loglevel Information

Equivalent with environment variable:

export MOONGATE_UO_DIRECTORY=/path/to/uo
dotnet run --project src/Moongate.Server

NativeAOT Publish (Optional)

Example for Linux x64:

dotnet publish src/Moongate.Server/Moongate.Server.csproj \
  -c Release \
  -r linux-x64 \
  --self-contained true

Use project scripts for reproducible AOT builds where available (scripts/run_aot.sh).

Docker

Build:

./scripts/build_image.sh -t moongate-server:local

Run:

docker run --rm -it \
  -p 2593:2593 \
  -p 8088:8088 \
  -v /path/to/moongate-data:/app \
  -v /path/to/uo:/uo:ro \
  moongate-server:local

The Docker image builds and bundles the frontend (ui/) and serves it at:

  • http://localhost:8088/

Recommended env vars in container:

  • MOONGATE_ROOT_DIRECTORY=/app
  • MOONGATE_UO_DIRECTORY=/uo
  • MOONGATE_IS_DOCKER=true
  • MOONGATE_UI_DIST=/opt/moongate/ui/dist

Verify Startup

curl http://localhost:8088/health

Expected response:

ok

Metrics endpoint:

curl http://localhost:8088/metrics

If metrics are enabled/configured, response is Prometheus text format.

Configuration File

If <root>/moongate.json does not exist, server generates one.

Current top-level model includes:

  • rootDirectory
  • uoDirectory
  • logLevel
  • logPacketData
  • isDeveloperMode
  • http
  • game
  • metrics
  • persistence

Bootstrap now binds the full config model from moongate.json and applies MOONGATE_* environment overrides on top.


Previous: Quick Start | Next: Configuration Guide