Skip to main content
This page takes your own app from russel init to a running, verified deploy.

What you’ll need

  • A working install: russel ps answers (Installation).
  • Your app in a git repo the server can clone.

1. Write a Russelfile

init guesses the name from Cargo.toml, go.mod, or the folder name, and writes a Russelfile.toml with every field explained in comments. It won’t overwrite an existing file unless you pass --force. Useful flags:
A minimal Russelfile looks like this:
Your app must listen on 0.0.0.0 and the port in $PORT. If the repo has no flake.nix, Russel generates one for Rust, Go, and static sites (Builds). Every field is in the Russelfile reference. Commit the Russelfile and push.

2. Deploy

The CLI shows each phase (resolve, build, create, start, ready) and prints the host port when it finishes. Running deploy again with the same commit and Russelfile does nothing. After the first deploy, use russel update. Deploying a folder on the server. REPO can also be a folder path, but the control plane refuses it unless RUSSEL_ALLOW_LOCAL_PATH_DEPLOY=1 is set in /etc/russel/env (then sudo systemctl restart russel-ctrl). The path is read on the server, never on your laptop. Only turn this on for a server you alone use.

3. Env vars and secrets

Plain settings go in [service.env]:
Secrets stay on the server, never in the repo. Store one by piping it in, so it never shows up in your shell history or process list:
secret://DB_PASSWORD is replaced with the stored value at deploy time. Russel sets PORT itself and rejects a few other names; the full list and limits are in Env and secrets. After changing env or a secret, redeploy:

4. Program arguments and Podman flags

These are two separate lists:
  • service.args are passed to your program, after its name: args = ["--dir", "/data"]. Works on both runtimes.
  • service.podman_args are extra flags for podman run, one flag or value per entry. Containers only. Your program never sees them.
Russel rejects Podman flags that it sets itself or that would weaken isolation (such as --privileged or --network=host), and -v may only mount a /nix/store path read-only. For host directories, use [[volumes]].

5. Check it

status and logs take the service name. With only one service deployed you can leave it out.

6. Update

The new version starts next to the old one, and traffic switches once it answers. More, including rollback: Update and rollback.

7. Stop or remove

Troubleshooting

More: Troubleshooting.

Next steps