Run from source

Running the server with Node: clone or download a release, one setup command for the key, content pack, memory model and build, the setup code and the guided setup, running for the LAN, and keeping it running as a service.

Server

Requirements

  • Node 22.18 or newer, 24, or 26 with npm. Linux, macOS or Windows.
  • Build tools for native modules on a bare system (Python 3 and a C++ compiler); most distributions have them, and prebuilt binaries cover common platforms.
  • About 2 GB of disk for the app, its dependencies, the and the .

Quick start

Clone the repository, or download the release archive to track a fixed version, then:

cd open-dungeon-master
npm install
npm run setup        # database key, content pack, memory model, production build
npm run start:lan    # 0.0.0.0:3005, reachable by your party on the LAN

When it starts, the server prints a link with a one-time . Open it on the same computer and create the first account, which becomes the administrator; the then takes it one question at a time. It looks for , , , , KoboldCpp, TabbyAPI and Jan on the machine and lists their models, or takes an , an or a person at the table; then pictures and voice, players, and your own agent over , testing each choice as a campaign would. Run it again any time from Admin, Guided setup.

npm run setup is safe to run again: it keeps an existing key, and model, and refuses to make a new key for a database that already exists. npm run setup -- --no-build skips the build for npm run dev:lan. By hand, the same steps are:

# The database is encrypted at rest. Generate a key once and keep it safe.
echo "DB_ENCRYPTION_KEY=$(openssl rand -hex 32)" > .env.server

# The content pack: spells, feats, items, subclasses, monsters.
node scripts/import-open5e.mjs

# The local embedding model (about 86 MB) for story recall and lore search.
npm run fetch-model

npm run build

For development, npm run dev serves http://localhost:3000 and npm run dev:lan serves 0.0.0.0:3005.

The content pack

The import script builds a read-only database from with retries, caching the raw pages under data/content/raw/ so later runs need no network; --refresh re-downloads. Every server release also attaches the prebuilt pack as open5e.sqlite.gz: unpack it and point CONTENT_DB_PATH at the file to skip the import. Without a pack the app boots on the much smaller bundled and says so in the character builder.

Secrets and settings

Secrets belong in .env.server: the , , Discord credentials. The file is read by the server itself, not by Next.js, and is ignored by git. Non-secret settings can live there too, or in the , which wins. Copy .env.example for the full list with comments. See Settings and admin.

Optional services

Each is a separate program on the same machine or another one, pointed at by a URL. All of them are optional and the server runs without them:

  • A : on :8001, on :11434, , , or a remote key. Local models.
  • on :8188 for pictures. Art, narration and speech.
  • on :8880, or any speech server, for ; on :8870, or the built-in Whisper installed from Admin, Speech, for and dictation.
  • The ships in public/ambience; npm run fetch-ambience curates more.

Keeping it running

Run npm run start:lan under your init system. A minimal systemd unit:

[Unit]
Description=Open Dungeon Master
After=network.target

[Service]
WorkingDirectory=/opt/open-dungeon-master
ExecStart=/usr/bin/npm run start:lan
Restart=on-failure
User=odm

[Install]
WantedBy=multi-user.target

The server reads .env.server from its working directory. Put the web port behind for anyone outside the LAN: Reverse proxy and HTTPS.

Updating

git pull            # or unpack the newer release archive over the old one
npm install
npm run build
# restart the service

Schema changes apply on start. Take a first: Backups and restore.

Migrating an unencrypted database

A database from before encryption is migrated in place: stop the server, set the key in .env.server, run node scripts/migrate-encrypt-db.mjs. The original is kept as *.pre-encryption.bak.

Checked against desktop and Android app 0.17.2 and server 0.26.2 on 2026-10-11. Something wrong or missing? Open an issue.

Download · v0.17.2
Server app · v0.26.2

Optional. Runs the table for a whole group on one machine that stays on. Everyone else just installs the app.

Free & open source · MIT licensed · served from GitHub releases