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 | 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.
irm https://raw.githubusercontent.com/SuInk/Diana/main/scripts/install.ps1 | iex
Supports Windows amd64. The script downloads the zip with PowerShell, verifies SHA-256, backs up the previous version and starts it in the background.
curl -fsSL https://raw.githubusercontent.com/SuInk/Diana/main/scripts/docker.sh | sh
Run it in the directory where you want the data. The script pulls the prebuilt image, writes the Compose files and starts Diana; to upgrade, rerun it in the same directory. Image variants, the updater and data mounts are covered under Container deployment.
- 1
Detect the platform
Picks the right full archive for your OS and CPU, and refuses platforms it does not support.
- 2
Download and verify
Fetches the release's
SHA256SUMSalongside it and only extracts once the checksum matches. - 3
Back up, then switch
Backs up the database, WAL/SHM files, frontend, old binary and launch script, keeping any existing
config.yaml. - 4
Start and probe
Polls
/api/healthfor up to 45 seconds. On Unix a failed upgrade restores the previous set of files.
Installer options
Choose an installation interactively, or pass command-line arguments for unattended installs. Application settings live in config.yaml and the WebUI; no configuration environment variables are required.
| Unix / Windows | Purpose |
|---|---|
--dir PATH / -InstallDir PATH | Installation directory; defaults to the current user. |
--scope user|system | Unix installation scope; system requires sudo. |
--version VERSION / -Version VERSION | Release version; default latest. |
--host HOST / -BindHost HOST | Listen address written to YAML. |
--port PORT / -Port PORT | Listen port; default 18080. |
--config-file PATH / -ConfigFile PATH | Initial YAML file for a new installation; existing configuration is preserved. |
--no-start / -NoStart | Install without starting. |
--yes / -Yes | Skip interactive choices. |
curl -fsSL https://raw.githubusercontent.com/SuInk/Diana/main/scripts/install.sh | sh -s -- --dir "$HOME/Applications/Diana" --port 18081 --yes
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/SuInk/Diana/main/scripts/install.ps1))) -InstallDir "$env:LOCALAPPDATA\Diana" -Port 18081 -Yes
PATH is configured automatically. Existing system installs retain their scope and may still require sudo. Stop the old service and preserve configuration and data before moving to another directory.
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-macos-arm64.tar.gz
tar -xzf diana-macos-arm64.tar.gz
cd diana-macos-arm64
./run.sh
Full archives now use the diana-<os>-<arch> naming scheme. Older consoles that only recognize diana-webui-… archives cannot self-update directly; rerun the one-click installer above or install a full package manually the first time.
Docker
Container deployment
Mount /app/data — the only directory you need — or rebuilding the container loses the SQLite database and your credentials. It also holds the runtime log (data/logs/diana.log), the optional config.yaml, plugins, skills, MCP configuration, browser and coding-CLI logins and update backups. On start the container hands it to its runtime user (UID 10001), so a host directory Docker created as root still works. The first start on a new image version backs up the database to data/.diana-updates/backups/ before migrating it (at most 3 within 3 days). A config file already mounted at /app/config.yaml still takes precedence; to move it to data/config.yaml, also delete the DIANA_CONFIG line from an old Compose file. Once an old config's log_path: logs/diana.log is changed to data/logs/diana.log (or removed), the old logs/ mount can be dropped.
The published image means you do not have to clone the repository:
curl -fsSL https://raw.githubusercontent.com/SuInk/Diana/main/scripts/docker.sh | sh
For updates, run in the same deployment directory:
docker compose pull && docker compose up -d
The installer can select the full or slim image and records that choice in the deployment directory's .env. See Update channels for rolling tags and updater boundaries, and Browser dependencies and containers for the browser and CJK-font differences.
To build from the repository instead, or to run a QQ client alongside it (SnowLuma recommended), use compose:
git clone https://github.com/SuInk/Diana.git
cd Diana
docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build
docker compose logs -f diana
When SnowLuma (or another client) 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 the client at its own container.
Development
Build from source
git clone https://github.com/SuInk/Diana.git
cd Diana
go mod download
cd frontend && npm ci && npm run build && cd ..
mkdir -p dist
go build -trimpath -o dist/diana-webui ./cmd/webui
FRONTEND_DIST=frontend/dist ./dist/diana-webui
First login
Configure models first, then connect a channel
- 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
Configure models
Sync the model list first, then set the default model; test chat, vision, intent detection and image generation separately.
- 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
Check the events
Send a test message and confirm the decision reason, tool results and token counts in the event detail view.