Skip to content

Kizuna is self-hosted. There is no hosted cloud to sign up for. It runs from the Kizuna source repository (deep-thinking-lab/kizuna, private: access is by invitation). The full procedure, including how the env file is generated, is docs/self-host-quickstart.md in that repository. This page is the short version.

1. Start the stack ​

Clone the repository, generate .env with umask 077 (each secret from openssl rand, never printed), then:

bash
docker compose -f compose.prod.yml up -d

The image is ghcr.io/deep-thinking-lab/kizuna. Caddy serves KIZUNA_DOMAIN on ports 80 and 443. The app is also on 127.0.0.1:4000.

Registration is closed by default (KIZUNA_REGISTRATION=closed). Leave it closed.

2. Create the admin ​

bash
docker compose -f compose.prod.yml exec kizuna \
  bin/kizuna eval 'KizunaCore.Release.create_admin("operator@example.com", "replace-with-your-password", "myadmin")'

Sign in at https://<your-domain> with that email and password. myadmin is the login used in git URLs.

3. Mint a personal access token ​

Open Settings, Access tokens. Check repo:write if you need to push (repo:read is clone and fetch). Copy the token when it is shown. It is not shown again.

You can also create one with POST /api/v1/user/tokens (label, scopes of repo:read and/or repo:write, expires_in_days of 7, 30, or 90).

4. Push over HTTPS ​

Create a repository in the UI, then:

bash
git remote add origin https://kizuna.example.com/myadmin/hello.git
git push -u origin main

Git will ask for a username and a password. The username can be anything. The password is the personal access token. Do not put the token in the URL.

SSH is not available yet. Use HTTPS and the token.

CI does not run on that push while KIZUNA_CI_MODE is off (the production default).

5. Backups ​

bash
BACKUP_DIR=/var/backups/kizuna ops/backup.sh --compose
ops/restore-drill.sh --compose /var/backups/kizuna/<timestamp>

CLI ​

Prebuilt kz binaries are not published. Build kizuna-cli from the repository. See CLI Overview.