Deploying Phoenix/Elixir to UpCloud - 2026 advice?

Hi there,

I’m in the process of deploying a Phoenix app to a EU host (UpCloud specifically), where the instances provided are mostly raw VMs with an init script (you can manage the VMs with Terraform & Ansible later if needed).

I am interested to hear about people who went that road recently:

  • building releases locally & pushing them via SSH, to start (I’m working locally on Mac OS)
  • picking a server (nginx/caddie versus raw cowboy/bandit with SSL?)
  • later : building releases on the code hosting (e.g. GitHub) & do CD from there
  • potentially, the init scripts that you may have used
  • no docker necessarily for now, but that may come later

What are your preferred resources, scripts & snippets to achieve that?

I went through the forum but so far found mostly outdated advice.

Thanks!

I just created GitHub - dmkenney/xamal - which is has the same principals and ergonomics as Kamal - just removes the need for Docker on the server. So you build your Elixir release and it uses SSH to push it the server(s). Caddy is installed on the server and is used for SSL if desired, and also for 0-downtime deploys.

I had previously been using Kamal and loved it - but really wanted to remove the Docker dependency on the server for various reasons.

Using this now for two different apps, and it working well.

2 Likes

What about the database? How do you get it installed / connected on the target host with xamal?

Xamal doesn’t have anything to do with the DB. I use Ansible for provisioning the VPS - which handles installing and configuring the DB as well as anything else I need.

Kamal has the notion of accesories (of which a DB can be one) if that’s more your style.

1 Like

Just a note here as well - I’m also thinking of creating a download script up in the next few days so you don’t have to clone the repo and build it locally. I’ll just upload the escript directly to GitHub and have a shell script that downloads it somewhere on the path.