chasen

module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: Apache-2.0

README

Chasen

Enter your app. Run chasen deploy. It is live.

A chasen is the bamboo whisk that prepares matcha. Chasen is the tool you hold; matcha is the engine underneath.

Chasen deploys the Docker image of an app with a SQLite database to one server. You get HTTPS, deploys without downtime, custom domains, and backups you can trust. chasen deploy builds the image on your computer or in CI and pushes it to a registry. The server pulls it: nothing builds on the server. There is no YAML pipeline of ours and no SSH in the deploy.

It is free and open source, and it runs on a server you own. The site is chasenhq.com, and the docs start with a step-by-step guide.

# on the server
curl -fsSL https://chasenhq.com/server | sh
chasen-server setup --domain example.com

# on your computer
curl -fsSL https://chasenhq.com/cli | sh
chasen add server example.com
cd myapp
chasen deploy
# Deployed myapp 3f9a2c1
#   https://myapp.example.com

No server yet? Chasen cloud creates one for you at Hetzner and runs this same software on it.

How it works

your machine                          the server
chasen  ── HTTPS + token ──▶  chasen-server (API, in a container behind the proxy)
                                ├─ docker pull         the image of your commit, from ghcr.io or Docker Hub
                                ├─ matcha              proxy, HTTPS, deploy without downtime
                                ├─ backups             checked snapshots each hour
                                └─ Litestream          live replica to an S3 bucket
  • chasen is the client on your machine. chasen-server runs on the server.
  • The client calls the HTTPS API of the server at https://api.<base domain>. chasen login is an OAuth 2.0 device login: you approve it in a browser, and the client gets a token of its own. The API streams the output of each command back, so a deploy shows each step as it runs.
  • chasen deploy builds the image of the commit where it runs (your computer, or CI) and pushes it to a registry. The server pulls it, also from a private registry. A server never builds an app: a build would take the memory and the CPU of the live apps.
  • matcha is the deploy engine. It runs kamal-proxy, gets the Let's Encrypt certificates, and swaps containers without downtime. Chasen apps and matcha apps share one proxy on the same server.
  • Litestream is inside chasen-server. The server needs Docker and nothing else.

Documents

The docs are on chasenhq.com/docs. Their source is here:

Document What it covers
Get started From an empty server to a live app
Deploy The image, websites, addons, chasen.yml, and secrets
The app standard The rules an app follows: the port, /up, the storage, migrations
Backups and restore Snapshots, the live replica, a restore, and a new server
Domains Custom domains, and Cloudflare in front
Deploy from GitHub Actions git push as the deploy
Commands, files, and limits Every command, the files on the server, and what Chasen does not do
The server protocol The HTTP API between the CLI and the server

example/ is the smallest app that follows the standard.

The cloud

Chasen cloud is this same software on a server that we create for you at Hetzner: chasen login, then chasen deploy. It is a separate service and it is not in this repository. The CLI talks to it with the same protocol as to your own server. See chasenhq.com/cloud.

Development

mise run test     # go vet and the unit tests. No Docker
mise run e2e      # real Docker, the proxy on ports 80 and 443, an S3 store, and a private registry. Needs sudo
mise run smol     # a disposable Chasen server in a smolvm machine

mise run smol makes a test server in a smolvm machine and prints the two variables that point the CLI at it. It needs no sudo for its network and takes no port 80 or 443 on your computer. bin/smol delete removes it.

The two programs share one contract: protocol for the commands and oauth for the login.

Releases

A tag v* makes a release: GitHub Actions builds the CLI for macOS and Linux and the server for Linux, and attaches them to the release with checksums.txt. The install scripts download the newest release.

License

Apache 2.0

Directories

Path Synopsis
cmd
chasen command
Chasen is the client.
Chasen is the client.
chasen-server command
Chasen-server manages one server: it builds and runs the apps, sets their domains, and keeps the backups of their SQLite databases.
Chasen-server manages one server: it builds and runs the apps, sets their domains, and keeps the backups of their SQLite databases.
internal
mock
Package mock is a Chasen server for development: it answers the protocol over HTTP as chasen-server does, with made-up apps that live in memory.
Package mock is a Chasen server for development: it answers the protocol over HTTP as chasen-server does, with made-up apps that live in memory.
Package oauth is the OAuth 2.0 Device Authorization Grant (RFC 8628) for the chasen client.
Package oauth is the OAuth 2.0 Device Authorization Grant (RFC 8628) for the chasen client.
Package protocol is the contract between the client, the server, and the cloud.
Package protocol is the contract between the client, the server, and the cloud.
tools
mock command
The mock Chasen server, for development.
The mock Chasen server, for development.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL