Deploy

Let the installer hand you a running service

A normal deployment does not involve picking files off the releases page. One script handles platform detection, downloading the full archive, verifying SHA-256, backing up your data, installing the service and checking that it came up.

Recommended

One command to install or upgrade

curl -fsSL https://raw.githubusercontent.com/SuInk/Diana/main/scripts/install.sh | sudo sh

Supports Linux amd64/arm64 and macOS on both Intel and Apple Silicon. On Linux it installs as a systemd --user service and on macOS as a LaunchAgent; where no service manager is available it falls back to a background process.

  1. 1

    Detect the platform

    Picks the right full archive for your OS and CPU, and refuses platforms it does not support.

  2. 2

    Download and verify

    Fetches the release's SHA256SUMS alongside it and only extracts once the checksum matches.

  3. 3

    Back up, then switch

    Backs up the database, WAL/SHM files, frontend, old binary and launch script, keeping any existing config.yaml.

  4. 4

    Start and probe

    Polls /api/health for up to 45 seconds. On Unix a failed upgrade restores the previous set of files.

Options

Control the install with environment variables

VariableDefaultPurpose
DIANA_INSTALL_SCOPEautoUnix recommends a sudo system install in /opt/diana; set user to install only for the current user.
DIANA_INSTALL_DIRsystem: /opt/diana
user: ~/.local/share/diana
Windows: %LOCALAPPDATA%\Diana
Explicit program, data, logs and backups directory.
DIANA_VERSIONlatestPin a version such as v0.4.2; defaults to the newest stable release.
DIANA_PORT18080Console port written into config.yaml on first install.
DIANA_ADMIN_USERNAMEdiana#adminAdministrator username created on first install.
DIANA_ADMIN_PASSWORDrandom 32 hex charactersAdministrator password created on first install.
DIANA_START_AFTER_INSTALLtrueSet to false to install and verify without starting.
# install a pinned version into a custom directory
curl -fsSL https://raw.githubusercontent.com/SuInk/Diana/main/scripts/install.sh | \
  sudo env \
  DIANA_VERSION=v0.4.2 \
  DIANA_INSTALL_DIR=/opt/diana-user \
  DIANA_PORT=18081 \
  sh
About variables and pipes

With sudo, pass variables to the installer through sudo env. Without sudo access, explicitly use DIANA_INSTALL_SCOPE=user sh for a current-user installation.

Alternative

Install a full release archive by hand

For offline environments or where changes need manual approval, download the full archive matching your platform: the .tar.gz or .zip plus SHA256SUMS from the same release. It includes the backend, prebuilt WebUI and launch scripts, with no separate WebUI deployment or Node.js installation needed. Releases no longer provide standalone binaries; custom deployments can extract the executable and frontend assets from the full package.

# macOS Apple Silicon example
shasum -a 256 diana-webui-darwin-arm64.tar.gz
tar -xzf diana-webui-darwin-arm64.tar.gz
cd diana-webui-darwin-arm64
./run.sh

Docker

Container deployment

Persistence

You must mount /app/data and /app/logs, or rebuilding the container loses the SQLite database and your credentials.

The published image means you do not have to clone the repository:

docker run -d --name diana --restart unless-stopped \
  -p 18080:18080 \
  -v "$PWD/data:/app/data" \
  -v "$PWD/logs:/app/logs" \
  ghcr.io/suink/diana:latest

To build from the repository instead, or to run NapCat alongside it, use compose:

git clone https://github.com/SuInk/Diana.git
cd Diana
docker compose up -d --build
docker compose logs -f diana

When NapCat and Diana are separate containers, the reverse WebSocket must use the container service name, for example ws://diana:18080/onebot/v11/ws — writing 127.0.0.1 points NapCat at its own container.

Development

Build from source

Go 1.26.5
Node.js 22
npm
Git
git clone https://github.com/SuInk/Diana.git
cd Diana
go mod download
cd frontend-next && npm ci && npm run build && cd ..
mkdir -p dist
go build -trimpath -o dist/diana-webui ./cmd/webui
FRONTEND_DIST=frontend-next/dist ./dist/diana-webui

First login

Configure models first, then connect a channel

  1. 1

    Sign in

    The administrator credentials are printed once to the terminal on first start and stored in config.yaml. Change the password after signing in.

  2. 2

    Configure models

    Sync the model list first, then set the default model; test chat, vision, intent detection and image generation separately.

  3. 3

    Connect a bot

    Fill in the credentials for each platform on the Bots page. All six can be enabled at once, with conversation context always isolated by bot profile.

  4. 4

    Check the events

    Send a test message and confirm the decision reason, tool results and token counts in the event detail view.