Dmk

Dmk

Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/kamal: Deploy web apps anywhere. · GitHub (Basecamp’s Docker deployment tool), but replaces Docker containers with Elixir releases and kamal-proxy with Caddy.

If you’ve used Kamal, the workflow is the same - same YAML config structure, same CLI commands, same hook system and secrets management. The key differences:

  • Elixir releases instead of Docker containers - built with mix release, distributed as tarballs
  • Caddy instead of kamal-proxy - automatic TLS via Let’s Encrypt, zero-downtime blue-green deploys via port switching
  • Erlang SSH instead of shelling out to ssh - uses the :ssh stdlib with connection pooling
  • Escript CLI - single binary, no Ruby or Docker required on the deploying machine

Install

curl -fsSL https://raw.githubusercontent.com/dmkenney/xamal/master/install.sh | bash

Or build from source with mix escript.build. Requires Erlang/OTP 26+ on the machine running xamal.

Quick start

xamal init        # generates config/deploy.yml and sample hooks
xamal setup       # bootstraps servers and deploys
xamal deploy      # subsequent deploys
xamal rollback    # roll back to previous version

Links

https://github.com/dmkenney/xamal

Showing Posts 1 to 10

thiagomajesk

thiagomajesk

Wow, this seems really cool! I was thinking about this since they announced Kamal. Thanks for working on it, will definitely check it out! :star_struck:

rhcarvalho

rhcarvalho

What was the rationale to ditch Docker?

rhcarvalho

rhcarvalho

I’m also curious about this. IIRC in the Kamal 2 conference talk they explain why they replaced Traeffic with their own proxy to use an imperative model (instead of declarative – Kamal being imperative itself), fixing some bugs and moving part of the deploy logic to the tailor-made proxy.

Dmk

Dmk OP

It was two-fold.

  1. First it just seemed like an extra unnecessary layer - which it is, but admittedly does have some nice benefits probably why it was on my todo list for so long.
  2. One of my applications needs ffmpeg which roughly tripled the Docker image size. Not the end of the world, but it just bothered me a bit. I did try to install ffmpeg on the underlying OS and shell out from the application running inside Docker to it (so it wasn’t included in the image), but couldn’t get it to work.

So mostly just an itch I had for a while to simplify things since we really don’t need Docker with Elixir.

Dmk

Dmk OP

I don’t think I watched this talk, but did briefly read the rationale behind their switching somewhere. My decision to use Caddy instead of GitHub - basecamp/kamal-proxy: Lightweight proxy server for Kamal · GitHub was just that I was more familiar with Caddy.

I still have to test deploying multiple apps to a single server (all of my apps have 1 per server) - so depending how that goes maybe the Kamal proxy will make more sense (or not!).

rhcarvalho

rhcarvalho

Thanks for sharing!

Just like they made a custom proxy that understands their needs (Rails), I can see a world where a custom proxy (or an off the shelve proxy configured appropriately) that understands the BEAM, Phoenix and LiveView could be beneficial.

krasenyp

krasenyp

Cool project but please, this has nothing to do with bare metal. To deploy something on bare metal would mean for it to run directly on the CPU which is definitely not the case here.

Dmk

Dmk OP

I’m not following. I feel like you are using a different definition of bare metal that I am not intending in this context.

krasenyp

krasenyp

What’s the other definition than software that’s close to the hardware, like an OS itself, a bootloader, a unikernel? Not running in a container, but running on a high-level OS, maybe even in a virtual server is not software running on bare metal.

Dmk

Dmk OP

You can use this to deploy to a bare metal server. IE no hypervisor layer, no shared CPU, etc. That is “bare metal”. Could be a server in your basement, or a Hetzner Dedicated instance.

Agreed that running this in a VPS (which works fine as well) would not be considered bare metal.

Where Next? Top

Trending in Announcing Top

restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 12366 136
New
type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
kip
I’ll shortly be launching Text, a nascent text analysis library. Current functionality In this early version (not ready for prime time) ...
New
kip
Following on from my CLDR lbraries I started work on Unicode transforms. But like everything related to CLDR there is a lot of yak-shavin...
New

Other Trending Topics Top

CodeSync
We have 4 in-person tickets to Code BEAM Europe 2026 (21-22 October, PHIL Haarlem) to give away: 1 diversity ticket (sponsored by AppSi...
New
gus
Happy Friday, all! :slight_smile: Our October meetup is coming up next week - Wednesday, October 14th at 19h CET via Zoom! This month we...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews