Developer and creative tools

dmkenney/

xamal

Elixir port of Kamal that deploys Mix releases to your own servers over SSH, with Caddy handling TLS and zero-downtime switches.

What’s new here

Xamal takes Kamal’s deploy model and drops the container. Your app is built with mix release, copied to the servers as a tarball, and fronted by Caddy. Docker settings such as image, registry and Dockerfile are left out on purpose. Config is Elixir (config/xamal.exs) and the commands are Mix tasks.

What it does

You describe servers, SSH user, Caddy host and port, env vars and a health check in config/xamal.exs. mix xamal.setup bootstraps the servers (installing Caddy and the systemd unit if missing) and deploys. After that, mix xamal.deploy builds, uploads and boots the new release. Caddy does automatic TLS through Let’s Encrypt and switches ports for zero-downtime blue-green deploys.

The operational model follows Kamal: hooks (pre-build, post-deploy, pre-caddy-reload and others), secrets management and destinations like -d staging. There is also a deploy lock. Day-to-day tasks cover rollback, pruning old releases, remote logs, a remote IEx session, maintenance mode and running the release migrator.

Builds run locally by default. You can instead build in a Linux Docker container, or on another host over SSH, when NIFs and OpenSSL must match the servers. Several apps can share one host and one Caddy, and bootstrap refuses to install an app whose release name or ports would collide.

Who it’s for

Elixir developers who want to deploy an Elixir app to their own Linux boxes without building Docker images. It also suits anyone who already knows Kamal’s workflow. The targets must be systemd-based Linux hosts with SSH access.

Try it

You need Elixir 1.15+ / OTP 26+ locally, an environment that can run mix release, and SSH access to target servers that run systemd. Caddy is installed on the servers by the bootstrap step if absent.

Add the dependency:

# mix.exs
defp deps do
  [
    {:xamal, "~> 0.7", only: [:dev, :test], runtime: false}
  ]
end
mix deps.get
 
# Generate config stubs, sample hooks, release config, and helper aliases
mix xamal.init
 
# Edit config/xamal.exs and .xamal/secrets, then:
mix xamal.setup

release.name must match a named release in your mix.exs, or mix release fails with Unknown release. Run mix xamal.docs to list the built-in reference topics.

How mature is it

Young but active. The repo was created on 2026-02-08 and has 112 stars, 9 forks and 3 contributors. There are 13 releases, the latest being v0.7.2 on 2026-11-03, which is also the last push. It had 42 commits in the last 90 days, with 6 open issues and no open PRs. The version is still 0.x, and the README notes that 0.3.0 replaced the old escript binary and config/deploy.yml, with migration steps in UPGRADING.md. License is MIT.