Skip to content

Installation

This guide walks through the baseline install for a Diadem instance.

  1. Set up the directory

    Terminal window
    git clone https://github.com/ccev/diadem
    cd diadem
    ./setup.sh

    Diadem’s config files need to sit in specific places. setup.sh sets up syslinks to centralize them all in /config for your convenience.

  2. Configure

    Open config/config.toml and fill out as needed. Find the reference here.

  3. Install dependencies and build

    Terminal window
    pnpm install
    pnpm run build
  4. Push the internal DB schema

    Terminal window
    pnpm run db:push

    This initializes Diadem tables (users/sessions) in server.internalDb.

  5. 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"
  6. 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/build
    reverse_proxy * 127.0.0.1:3900
    }
  1. Install dependencies and build

    Terminal window
    pnpm install
    pnpm run build
  2. Restart

    Terminal window
    pm2 restart diadem

For containerized setup:

Terminal window
cp config/config.example.toml config/config.toml
cp docker-compose.example.yml docker-compose.yml
docker compose up --build

Then edit config/config.toml to point to the correct DB and API hosts for your environment.