Installation
Run the Kanshi server (core, dashboard, and TimescaleDB) with Docker Compose, then install an agent on each host you want to monitor. To try Kanshi locally without configuring anything, use the Quickstart instead; this guide is the real, persistent setup.
1. Get the stack
Section titled “1. Get the stack”curl -O https://kanshi.dev/docker-compose.yml2. Configure
Section titled “2. Configure”Generate separate secrets and write them to a .env file next to the compose file:
cat > .env <<EOFDB_PASSWORD=$(openssl rand -hex 16)KANSHI_API_KEY=$(openssl rand -hex 32)KANSHI_DASHBOARD_KEY=$(openssl rand -hex 32)EOFKANSHI_API_KEY is the ingest key your agents authenticate with. KANSHI_DASHBOARD_KEY is the key you log in to the dashboard with. See Configuration for every variable, including CORS origins, the alert evaluation interval, and webhook delivery.
3. Start the server
Section titled “3. Start the server”docker compose up -dCore applies the database schema and the 30-day retention policy on startup. The dashboard is on port 3000, the REST API on 8080, and agent ingest (gRPC) on 50051. Open http://your-server:3000 and log in with KANSHI_DASHBOARD_KEY.
4. Install an agent on each host
Section titled “4. Install an agent on each host”curl -fsSL https://kanshi.dev/install.sh | sudo sh -s -- --serviceThis installs the agent as a background service (systemd on Linux, launchd on macOS) and asks for:
- the core address, for example
your-server:50051 - the ingest key (
KANSHI_API_KEYfrom step 2)
The agent starts immediately and on every boot. Adjust the collection interval, host tags, and batching with the agent variables on the Configuration page. Network metrics are collected with the other host metrics. Process telemetry is disabled by default because process names can expose workload details; enable it only on hosts where that visibility is appropriate.
The Dashboard keeps your Light or Dark theme choice in the browser. Dark is the default until you select Light from the Admin menu.
To run the agent in the foreground instead of as a service, install the binary and run it directly:
curl -fsSL https://kanshi.dev/install.sh | shKANSHI_CORE_ADDR=your-server:50051 KANSHI_API_KEY=your-ingest-key kanshi-agentWindows
Section titled “Windows”The install script does not run on Windows. Download the Windows agent archive (kanshi-agent_<version>_windows_amd64.zip) from the agent releases, extract kanshi-agent.exe, and run it with the core address and ingest key set:
$env:KANSHI_CORE_ADDR = "your-server:50051"$env:KANSHI_API_KEY = "your-ingest-key".\kanshi-agent.exeTo keep it running across reboots, register kanshi-agent.exe as a service with NSSM or a Task Scheduler task set to run at startup.