Installation
This guide walks through the baseline install for a Diadem instance.
Prerequisites
Section titled “Prerequisites”- Node.js 22+
- pnpm
- Running Unown# Stack
Installation
Section titled “Installation”-
Set up the directory
Terminal window git clone https://github.com/ccev/diademcd diadem./setup.shDiadem’s config files need to sit in specific places.
setup.shsets up syslinks to centralize them all in/configfor your convenience. -
Configure
Open
config/config.tomland fill out as needed. Find the reference here. -
Install dependencies and build
Terminal window pnpm installpnpm run build -
Push the internal DB schema
Terminal window pnpm run db:pushThis initializes Diadem tables (users/sessions) in
server.internalDb. -
Run
You may want to run Diadem using pm2.
Terminal window PORT=3900 HOST=127.0.0.1 FORCE_COLOR=1 pm2 start build/index.js -n "diadem" -
Reverse Proxy (optional)
For production use, it’s probably a good idea to set up Diadem behind a reverse proxy. Here’s a configuration for Caddy that works.
example.com {root * /path/to/diadem/buildreverse_proxy * 127.0.0.1:3900}
Updating
Section titled “Updating”-
Install dependencies and build
Terminal window pnpm installpnpm run build -
Restart
Terminal window pm2 restart diadem
Docker quick start
Section titled “Docker quick start”For containerized setup using the published ghcr.io/ccev/diadem:latest image:
cp config/config.example.toml config/config.tomlcp docker-compose.example.yml docker-compose.ymldocker compose pulldocker compose up -dThen edit config/config.toml to point to the correct DB and API hosts for your environment.
To update an existing Docker install:
docker compose pulldocker compose up -dDev mode (debugging)
Section titled “Dev mode (debugging)”By default Docker uses the optimized published image. To debug an issue with readable,
unminified code and source maps in your browser devtools, build the local dev target
with a compose override:
cat > docker-compose.override.yml <<'EOF'services: diadem: build: context: . dockerfile: Dockerfile target: dev image: diadem:devEOFecho "DIADEM_TARGET=dev" >> .envdocker compose up -d --buildThis runs the Vite dev server (with its error overlay) instead of node build/index.js.
Remove docker-compose.override.yml, set DIADEM_TARGET=runtime (or remove the line),
and run docker compose pull && docker compose up -d to return to the published image.