← All comparisons

runner vs Kamal

Two CLIs for Docker deploys, with different operating models.

What it does well

  • Deploys over SSH with no dashboard or agent.
  • Healthchecks in kamal-proxy and native multi-server support.

Same goal, two paths

See how to do each task with both tools. The examples assume the setup described in each case; adapt names, credentials and infrastructure.

01 / USE CASE

Ship a new version

The shop app is already registered in both tools, with source access and the server configured. On the Runner side, commands run on a Linux server with Docker and Traefik already set up. The checkout contains the approved version and Kamal's SSH/registry access is already in place.

With Kamal

  1. With config/deploy.yml, SSH hosts, registry and application already configured, run kamal deploy from the approved checkout.
  2. Follow the build, the push and the rollout to the configured roles; validate the route and the application logs.
Examplebash · example
kamal deploy
source: Kamal · deploy ↗

With runner

  1. Publish the new version to the configured source. In the Git + Dockerfile path, the Runner fetches the code and builds on the server, without pushing the app image to a registry.
  2. With polling configured, the pipeline runs automatically. To trigger it now, run the commands below on the server and check the status and history.
Examplebash · example
runner preflight shop
runner deploy shop
runner status shop
runner logs history shop

Kamal coordinates the configured hosts. With the Runner, each server is operated separately. The Runner works on one server at a time. Host-published ports and shared writable volumes may require a downtime window.

02 / USE CASE

Roll back a version

The shop app is already registered in both tools, with source access and the server configured. On the Runner side, commands run on a Linux server with Docker and Traefik already set up.

With Kamal

  1. Use kamal app containers -q to find the old containers still available on the hosts.
  2. Run kamal rollback with the chosen version's identifier and validate the application. The image must still be present for this rollback path.
Examplebash · example
kamal app containers -q
# Replace with the identifier listed for the previous version
kamal rollback VERSION_IDENTIFIER
source: Kamal · rollback ↗

With runner

  1. List the retained versions and confirm the previous one still has its code and image available.
  2. Roll back to the previous version and check the application. To pick a different retained version, use --version with the listed identifier.
Examplebash · example
runner versions shop
runner rollback shop
runner status shop
runner logs history shop

A rollback changes code/image; it does not undo migrations, databases or persistent files. Check that the current configuration is compatible with the previous version.

03 / USE CASE

Change configuration

The shop app is already registered in both tools, with source access and the server configured. On the Runner side, commands run on a Linux server with Docker and Traefik already set up.

With Kamal

  1. In config/deploy.yml, add LOG_LEVEL: info under env.clear and commit the configuration. Review per-role and per-destination overrides.
  2. Run kamal deploy with the reviewed configuration and check the logs to confirm the level the process uses.
source: Kamal · environment variables ↗

With runner

  1. In this example, shop already uses env_sync: skip in the reviewed manifest, which preserves the local environment; LOG_LEVEL is not pinned under environment in the manifest.
  2. Write the non-secret variable on the server and force the container to be recreated. Check the log level in the application's behavior.
Examplebash · example
runner env set shop LOG_LEVEL info
runner deploy shop --force
runner status shop

The application must read LOG_LEVEL at runtime. Pipeline variables only reach the container if the deploy process passes them along.

Documented reports and historical context
  • An issue reports difficulty finding the version to use for a rollback.

    source: Kamal · issue #1658 ↗

    The runner reuses a version and image retained locally. Check retention before rolling back: data and schema migrations are not reverted.

  • A worker with no HTTP ran into trouble in report #1120; setting proxy: false on the web role solved it.

    source: Kamal · past report #1120 ↗

    The runner accepts health checks by TCP or command, in addition to HTTP. Pick a probe that reflects the worker's real readiness; an open port alone may not be enough.

  • Report #1552 described routes lost when updating the proxy; the fix shipped in version 0.9.1.

    source: Kamal · past report #1552 ↗

    In local mode, the runner writes routes to the Traefik file provider from the manifest. It does not eliminate proxy failures; check routes and host compatibility after maintenance.

When to stay with the tool

  • Stay with Kamal for native multi-server deploys and to keep your SSH workflow. The runner works one server at a time; it does not coordinate hosts.

How to evaluate the deploy step

The commands use shop as the example app. Adjust the identifier and instance to the generated manifest. Only remove the previous deploy after validating the new path.

  1. Translate Kamal's deploy.yml into .deploy.yml, including healthcheck and secrets. Plan the move from kamal-proxy to Traefik without port conflicts. For multiple hosts, register each instance separately and keep coordination external.

  2. Prepare a Linux server with compatible Docker and Traefik, DNS, and a persistence strategy. Back up your data with your backup tool and test the restore. Install and initialize the runner following the getting started guide.

    Example with runnerbash · example
    curl -sL https://get.runnerci.com/init.sh | sudo bash
    runner init
  3. In the app folder with a Dockerfile or image, generate and review the manifest. Check network, healthcheck, secrets, and version. The wizard does not deploy on its own.

    Example with runnerbash · example
    runner wizard --path .
    runner validate --path .deploy.yml
  4. Example for a GitHub repository: commit the reviewed manifest to the main branch before registering. Replace my-org/shop with your repo, main with the published branch, and production with the reviewed instance; set up read access to the private repo first. On the server, register, review the preflight, and only then deploy.

    Example with runnerbash · example
    runner add --repo my-org/shop --branch main --instance production --ckey v2
    runner preflight shop
    runner deploy shop
    runner status shop
    runner logs history shop
  5. Validate the domain and the app's behavior before shutting down the previous deploy. Disable the old trigger to avoid two deployers on the same app. Set up polling to automate the pipeline on the server. If you prefer an external build, configure the source of the image or artifact produced by CI. The getting started guide details the prerequisites.