Before you start
You need:
With the Compose plugin version 2.20 or later (docker compose version to check). Docker Desktop on macOS, Docker Engine on Linux.
The npx command ships with it.
For the engine image and the database.
macOS and Linux are supported, on x86-64 and ARM 64. On Windows, go through WSL2: native installs are not supported, and the command says so plainly rather than half-failing.
No AI key is needed to install: you will get all the way to a running Kastel with an AI plugged in without setting one. Keys come next, to build your context - that is the next page.
One command
That is the whole guided path. The command first checks your prerequisites and stops with a precise message if one is missing - what, why, and the exact fix for your system. Then it downloads the engine image, creates your deployment in the current directory (or in the directory you name: npx @kastel.ai/cli my-kastel), starts the database and the engine, issues a dedicated access for your AI, and wires the AI clients detected on your machine (Claude, Cursor and the rest). The closing message gives you the first question to ask.
Re-running it never breaks anything: an existing deployment is recognised, never reset, a stopped stack is restarted, a healthy stack is left alone.
npx @kastel.ai/cli doctor runs the checks only, writing nothing to your disk: each prerequisite passes or fails with its remedy. Useful to prepare a machine before diving in.
What it does, what it never does
The install writes exactly four things: your deployment directory (your context as markdown files, the configuration, the governance - it belongs to you), a local .env file (generated passwords, pinned engine version), a Docker volume for the database, and the wiring of your AI clients (the access goes into your system keychain, never on screen).
It asks for no account, no email, no card. There is no licence key, no activation, no expiry date. Once installed, your deployment never contacts our servers on its own initiative again: no telemetry by default, no remote check, no kill switch on our side. That is verifiable in the product’s behaviour, and it is the point: a self-hosted Kastel is yours.
The engine ships under its proprietary licence: you run it for your company, you do not host it for third parties. The npm install packages themselves are Apache-2.0.
Keep the command around
Launched through npx, the kastel binary is not on your PATH. For the rest of the journey, install it once:
Everything then happens from your deployment directory: kastel status (stack state and wired clients), kastel stop and kastel start, and every engine command (kastel check, kastel onboard start...), relayed to the container without installing anything else.
On your server
The same path installs on an exposed server, with automatic TLS:
The server profile adds a reverse proxy (Caddy, only ports 80 and 443 open, automatic Let’s Encrypt certificate). The command checks that the domain points at the machine and prints the DNS record to create if it does not. Wiring your AI then happens from your workstation, not from the server: the command prints the exact line to run there, once - treat it as a secret, it carries the access.
Option for search without an external key, available on this server profile only: --local-embeddings adds a local Ollama service for the search model (see the Fully local page).
Uninstall
By default the command shows what it would do and touches nothing; --force applies. It stops and removes the containers and unwires your AI clients. Your data is only removed with --purge-data, which makes you retype your directory name to confirm, and therefore needs an interactive terminal. Your deployment directory is never deleted: the files in it belong to you, and the command tells you how to remove it yourself if that is what you want.
Your Kastel runs and your AI is plugged in. For it to build your context, it needs your AI keys: that is the next page.
Your AI keys