Docs
How to run something on cas.run and what to expect of it.
1. Get a token
Your identity is your GitHub account. Connect over SSH with your GitHub login as the username; the key you connect with is checked against the keys on your GitHub profile. On first contact an account is created. The token command prints a small shell script that writes the CLI's config file.
ssh -p 2222 cas.run token | shOther SSH commands: login prints a one-time link that signs you into this website; whoami says who you are; help lists them. The config lands in ~/.config/cas/config.json; CAS_ENDPOINT and CAS_TOKEN override it.
2. Install the CLI
go install git.mills.io/cas/cas/cmd/cas@latestOr take a binary from the releases page.
3. Run a service
A service is one container that cas.run keeps running. Give it an image, and the port it serves HTTP on if it serves any.
cas run -p 80 nginx:alpine
cas run -n api -p 8080 -e TOKEN=secret -m 128 ghcr.io/you/api:v3
cas run -n job --restart no alpine sh -c 'echo hello'-n namethe service name; without it, the image's name (nginx:alpine→nginx)-p portthe container port that serves HTTP; it becomes the hostname's target-e K=Van environment variable, repeatable-m MBmemory limit in MB (64 default, 256 most); it comes out of your units' pool--restartalways(default) runs it again when it exits;noleaves it stopped
4. Reach it
Every service with a port has a hostname, with HTTPS already on it:
https://<name>-<login>.cas.run/The proxy speaks to the container's port in plain HTTP on a private network; your container does not need TLS. Websockets pass through. A service that is not running answers with a 503 page.
Your own domain
With a paid unit, a service can also answer at a hostname you own. Point the name at the service's hostname with a CNAME record (or, for a bare domain, at cas.run's addresses with A and AAAA records), then attach it on the service's page or from a terminal:
cas domain web app.example.com # attach; `cas domain web -` detaches
cas domain web # where the certificate is atThe certificate is ordered once the name resolves here, and renewed with the rest. Until then the page says what the name points at instead.
5. Look after it
cas ps # your services and their state
cas logs -f NAME # follow the container's output
cas stop NAME # stop it (and keep it stopped)
cas start NAME # run it again
cas restart NAME # recreate the container
cas rm NAME # remove it
cas tokens # your CLI tokens; `cas token rm ID` revokes one
cas whoami # who you are, your units and what you use of themA container that exits is removed and run again after a short, growing pause. One that exits ten times in a row is parked as crashloop until you restart it. The dashboard shows the same services with their logs.
Pricing, limits, and what is not here yet
You have units: each is one service and 64 MB of a memory pool your services share. The first is free. Each dollar a month you sponsor the operator with on GitHub, from the account you log in with, is one more; GitHub tells us within a minute, and the units go when the sponsorship does. A service that asks for 128 MB takes two units' memory but one unit's slot, so the pool can be spent unevenly.
- First container free64 MB. Your GitHub login is your account.
- Each further 64 MB container US$1 a month, or US$10 a year 3 containers, $2/moNot for sale yet; it will be a GitHub Sponsors tier, a dollar a month per container.
- Memory per service64 MB default, 256 MB most
- Processes per service64
- CPUa fair share of one core, not a reservation
Not supported: volumes or any storage that outlives the container, publishing TCP ports other than the one HTTP port, more than one HTTP port, building images here, private registries. A container's writable layer is lost when it is recreated. Images are pulled from the Docker Hub and other public OCI registries.
Found a bug, or want one of those? Open an issue.