Manual setup
Run a production build of llama-dash against an existing llama-swap instance.
Run llama-dash directly on a host with Node when you already have a reachable llama-swap instance. This guide builds from source and uses systemd to keep the production server running. For local development, see Contributing.
Requirements
- Linux with systemd for the service example below.
- Node 24+ and pnpm, available to the service account.
- Git and native build tools for dependencies such as
better-sqlite3(Python, a C++ compiler, andmake). - A reachable llama-swap instance running llama.cpp's
llama-server, and the path to itsconfig.yaml. If you haven't set these up yet, follow llama.cpp & llama-swap first.
Get the source and install dependencies
Clone the repository into a location accessible to the account that will run the service. For example:
git clone https://github.com/ndom91/llama-dash.git /opt/llama-dash
cd /opt/llama-dash
pnpm install --frozen-lockfileThe destination must be writable by your installation account. To pin a build, check out a specific Git commit before installing dependencies.
Configure the environment
cp .env.example .envEdit .env before starting:
- Set
INFERENCE_BASE_URLto your llama-swap address, for examplehttp://127.0.0.1:8080. The example file'shttp://llama-swap:8080address is for Docker Compose. - Set
BETTER_AUTH_SECRETto the output ofopenssl rand -base64 33. Keep.envreadable only by the service account and administrators. - Set
BETTER_AUTH_URLto the browser-visible HTTPS origin when deploying behind a reverse proxy or using passkeys remotely. It can be left empty for a local install. - To use the dashboard's Config page, set
INFERENCE_CONFIG_FILEto the absolute path of theconfig.yamlyour llama-swap instance loads. This is llama-swap's config file, not a separate llama-dash config. Otherwise, clear the example's Docker-specific/config/config.yamlvalue. - Set
CREDENTIAL_ENCRYPTION_KEYto a secret of at least 32 characters before storing upstream credentials.
The service account needs write access to the database directory and, if using the config editor, the llama-swap config directory. The default database path is data/dash.db, relative to the working directory. Migrations run automatically at startup. See Configuration for the full list of variables.
Build and start
pnpm build
pnpm startThe production server listens on port 3000 on all interfaces by default. Stop the foreground process with Ctrl+C before starting it under systemd. For remote access, use HTTPS via a reverse proxy and restrict access to the service as appropriate.
Run as a systemd service
Create /etc/systemd/system/llama-dash.service. Replace llama with an existing non-root service account, /opt/llama-dash with your checkout path, and /usr/local/bin/pnpm with the absolute path from command -v pnpm. Make sure Node is also on the service's PATH; a version-manager installation may require an explicit Environment=PATH=... in the unit.
[Unit]
Description=llama-dash inference gateway
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=llama
WorkingDirectory=/opt/llama-dash
Environment=NODE_ENV=production
Environment=HOST=127.0.0.1
Environment=PORT=3000
ExecStart=/usr/local/bin/pnpm start
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.targetThe example binds to loopback for use with a local reverse proxy. Change HOST only if the server should listen on another interface. HOST and PORT can be set in the service environment; the working directory lets the app find .env, the database, and migrations.
Ensure the service account can read the checkout and .env and write the configured database directory. Then enable the service and inspect its status:
sudo systemctl daemon-reload
sudo systemctl enable --now llama-dash
sudo systemctl status llama-dash
sudo journalctl -u llama-dash -fOpen http://localhost:3000 locally or your configured HTTPS origin, create the first dashboard user, and connect a client. To update later, see Updating.
Last updated on