Deploy with drim CLI
What is drim?
drim is a CLI tool for deploying Kaneo. It generates your docker-compose.yml, Caddyfile and .env, installs Docker if it is missing, and brings the stack up, so a fresh server goes from nothing to a running instance in one command.
It suits straightforward deployments. If you need a custom topology, extra services, or your own reverse proxy, Docker Compose gives you more control.
Installation
curl -fsSL https://assets.work.ravefox.dev/install.sh | sh
Or download a binary from releases.
Install script options
| Option | Description |
|---|---|
--silent |
Suppress output |
--setup |
Run drim setup after installing |
--domain=DOMAIN |
Deploy on this domain, implies --setup |
# Install, deploy, and configure HTTPS for a domain in one command
curl -fsSL https://assets.kaneo.app/install.sh | sh -s -- --setup --domain=kaneo.example.com
The script detects your platform, downloads the matching binary, and installs it to /usr/local/bin. It supports Linux and macOS on amd64 and arm64, and Windows through WSL.
Quick start
Interactive
drim setup
You are asked whether to use the bundled Caddy reverse proxy, and for a domain. Leave the domain empty for a local deployment, reachable at http://localhost, or http://localhost:5173 when you skip the reverse proxy.
Non-interactive
Pass the configuration as flags to skip the prompts, which is what you want in a script or over SSH without a terminal:
drim setup --domain=kaneo.example.com
drim setup --no-reverse-proxy
Point your domain's DNS A record at the server before running setup. Caddy requests a certificate immediately, and that only succeeds once the record resolves.
Commands
drim setup # Deploy Kaneo
drim start # Start services
drim stop # Stop services
drim restart # Restart services
drim upgrade # Pull the latest Kaneo images and restart
drim update # Update the drim CLI itself
drim configure # Edit .env, then apply the changes
drim uninstall # Remove Kaneo
Run these from the directory holding your docker-compose.yml. drim tells you when it cannot find a deployment there.
drim restart restarts the containers. Because services read configuration through env_file, a plain restart reuses the environment a container was created with, so use drim restart --recreate to recreate containers and pick up .env changes. drim configure already does this for you.
What gets installed
- PostgreSQL 16, the database
- Kaneo, the API and web app in a single container
- Caddy, the reverse proxy with automatic HTTPS, unless you pass
--no-reverse-proxy
Services run with health checks and restart automatically unless explicitly stopped. PostgreSQL is only reachable on the internal Docker network, never published to the host.
Configuration
drim configure
This opens .env in $EDITOR (or nano). After saving, drim offers to apply the changes, which recreates the containers so the new values take effect.
drim setup writes the variables Kaneo requires. Optional features are enabled by adding their variables, for example:
# GitHub sign-in
GITHUB_OAUTH_CLIENT_ID=your_client_id
GITHUB_OAUTH_CLIENT_SECRET=your_client_secret
# Email
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=you@example.com
SMTP_PASSWORD=your-password
SMTP_FROM=you@example.com
# Redis pub/sub, for running more than one API replica
REDIS_URL=redis://your-redis-host:6379
See environment variables for the full list.
Requirements
- Docker 20.10+ and Docker Compose V2
- 2GB RAM and 10GB disk
- A public DNS record, for production deployments
drim installs Docker automatically on supported Linux distributions. When it does, it also adds your user to the docker group and stops, because group membership only applies to a new login session. Log out, log back in, and run drim setup again.
If Docker is already installed but you are not in the docker group, setup tells you so before writing any files, along with the command to fix it:
sudo usermod -aG docker $USER
Upgrading
drim upgrade
This pulls the latest images and restarts the changed services. Your data lives in Docker volumes and is not touched.
To update drim itself:
drim update
Deployments created before Kaneo moved to a single container still run the older two-image layout, and drim upgrade does not rewrite an existing docker-compose.yml. See migrating to drim to move to the current layout.
Building from source
git clone https://github.com/usekaneo/drim.git
cd drim
go build -o drim .
make build-all cross-compiles for every supported platform.