BUILD AND DEPLOY ON YOUR OWN SERVER

One pipeline from code to production.

Runner detects the new version, fetches the code, builds the image from the Dockerfile and deploys it on the same server. The pipeline checks health before switching traffic and keeps versions for rollback. You don't need a separate worker, a cloud build service or to push the app image to a registry.

01 /

From revision to traffic

Once the app is registered and configured, cron checks for new versions every 5 minutes and runs the pipeline automatically. The version can come from a file, a tag or a commit: with git-commit, every new commit changes the version. You can also trigger a run right away from the CLI.

The deployment cycleFetch code → Local build → Candidate → Healthcheck → Traffic switched. The candidate's health unlocks the traffic switch.01Fetch code02Local build03Candidate04Healthcheck05Traffic switched01Fetch code02Local build03Candidate04Healthcheck05Traffic switched
  1. Fetch the code and build

    Runner polls the source, detects the version and downloads the code. With docker-build, it runs the Dockerfile on the target server and uses the local image directly in the deploy. There is no required registry push step. The build uses that server's CPU, memory and disk.

  2. Start and verify

    The candidate starts alongside the previous one when resources allow. A failed build keeps the live container running. If the healthcheck fails, the candidate is removed and the previous one is kept or restored.

  3. Promote and clean up

    After the healthcheck, runner switches the route in Traefik, keeps versions according to retention and reports the result. In the default mode, the cron job finishes with no resident runner process.

Published ports and shared writable volumes may require stopping the previous version before starting the new one. In those cases there is a downtime window.

Know the limits ↗

02 /

The source can change. The cycle stays the same.

Git with a Dockerfile enables the full pipeline with a local build. If you already build elsewhere, Runner also accepts prebuilt artifacts and images. Each instance declares its source in the manifest.

branch
An explicit code branch. The dist source serves branches of prebuilt artifacts; for new registrations, prefer an explicit branch.
tag
A Git tag pattern becomes a release channel. A fixed tag stays pinned to its revision and does not trigger automatic deploys.
pr
Pull request preview. Detecting a closed or merged PR requires an authenticated gh; the domain needs a pattern and wildcard DNS.
local
Code already on the server, in the pull directory or a declared path. Detection can follow the tree or be manual.
https
A file or package over HTTPS, detected by control file, ETag or Last-Modified. Supports checksum and minisign signature; without both, it warns and continues.
rsync
Sync into a new folder with an atomic swap. Requires a control file; over SSH, the host must be in known_hosts.
registry
No Git repository: resolves the tag to a digest and runs the image by that digest. It can follow the highest semver matching a pattern or the digest of a mutable tag; poll: false turns off cron polling.

03 /

Health is an explicit choice.

Pick the mode that proves your app is ready. The no-probe escapes waive that guarantee.

http
GET on the configured path, expecting a 2xx response. This is the default mode.
tcp
Checks that the port accepts connections.
cmd
Runs a command inside the container and requires exit code zero.
exit
Validates a job that finishes successfully. Cron does not redeploy it.
external_http
runner probes HTTP on the container's IP and port from the host. Useful for images without probe tools.
external_tcp
runner tests the TCP connection from the host, without relying on tools inside the image.
container_state
Requires Running for stable_seconds, with no OOM or restart. It does not prove the app responds.
skip_check
Explicit no-probe escape, with a HealthSkipped event in the notification.

04 /

State is part of the deploy too.

One procedure for people and agents

AI can draft the manifest and help operate through the CLI. Review code, Dockerfile and .deploy.yml in Git; use validate to check the configuration and preflight to check the environment without starting containers. The commands below show that sequence for an app that is already registered. Agent permissions and team approvals belong in your access tools and review process.

One procedure for people and agentsbash · example
runner validate --app my-app
runner preflight my-app
runner deploy my-app
runner status my-app
runner logs history my-app

Infrastructure you operate

Runner can fetch code from private repositories and build the image on your company's server. Configure read credentials for the source and access to the Dockerfile's base images and dependencies. The local history records deploys; your team sets retention, access and integration with your corporate controls.

Kept versions and rollback

keep_versions sets retention per instance; the default is three. The version being deployed and the live version are always kept. With the registry source, rollback uses the digest stored in the target version. This retention covers directories and images, not database or volume backups.

Kept versions and rollbackbash · example
runner rollback my-app

Secrets with ckey v2

The asymmetric scheme uses age/X25519. The public key seals values; the private key stays on the server. The bundle allows per-key diffs without opening the values, and the deploy writes an ephemeral runtime.env with 0600 permissions. Sources without Git have no secrets push. Plan key recovery: without the keys, encrypted values cannot be recovered.

Domain gatekeeper

With routing.tls declared, it checks the domain's target and mode before requesting a certificate from Traefik. Cron can activate a domain that now points correctly without a new deploy. runner does not create DNS records or issue certificates on its own.

See the path on your server.

Start with your repository, a Dockerfile and the manifest. The guide shows how to register the app and automate build and deploy on your server.