spammy

spammy

I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on the wider internet).

Loosely, I’m looking for a simple self hosted “PaaS” solution.

I found this[1] thread very helpful, but it seems that most solutions are general purpose, heavier than I need and rely on a docker paradigm, either at the application development end, or the deployment end. Is docker an inevitably to embrace that would make this easy, or are there other solutions available?

potions.io seems to be the exception and appears to fit my needs, but there doesn’t seem to be a self-hosted version of it.

Or given my requirements should I just stick to the good ol’ server copy and service (ie systemd) management?

[1]Where do you host **small** or even tiny elixir projects?

Showing Posts 1 to 10

AndyL

AndyL

One option might be Xamal…

johantell

johantell

I’ve set up a server with coolify.io to run my personal projects. It’s essentially a PaaS that makes it easy to run multiple projects on the same server. Highly recommend if you don’t want to spend time documenting your setup (otherwise you will forget how you did it) and want to just run anything. It’s not elixir/phoenix-only but that’s not a downside in my opinion

LostKobrakai

LostKobrakai

I’ve followed Building a blog with Elixir and Phoenix in using dokploy. It’s essentially a UI for docker (+ docker swarm) + traefik, which is really nice. Even if the UI project might eventually go away the stack underneight is nothing special at all. I have it running on a hetzner VM for online stuff and on a VM in the basement for none shared stuff.

Only thing dokploy truely brings to the table is a system for building containers in various ways, from uploading plain zip files to pulling from repos and building in various ways, to pulling from docker registries.

rhcarvalho

rhcarvalho

Docker is not a hard requirement. I’ll try to make a parallel analogy: version control never was a hard requirement, and I’ve come across projects that didn’t use it. Yet, the moment you want to see how something was yesterday, even when you’re working alone, a version control system immediately becomes handy. Git “won the war” as the go-to solution.

You can track your Elixir dependencies in mix.exs, but the moment you rely on anything else on the system (e.g. particular Erlang or Elixir versions, system level dependencies, from ffmpeg to ca-certificates), then you’re going to want to keep track of that. Docker “won the war” in terms of packaging applications and their system level dependencies regardless of programming language stack.

There are other options like Ansible that can help you provision and maintain hosts, but Docker makes it really convenient to package and run multiple apps in a single host without conflicts.

People mentioned many tools in this personal-PaaS space, I’ll mention one more that is not particularly “sexy” but has worked for many years and is somehow a stable bet among modern contenders: https://dokku.com (limitation: single host).

spammy

spammy OP

Thank you all for the replies. I should have included my analysis from the referenced thread - here it is below, along with the couple of new suggestions:

So clearly if I relax the “no docker” requirement then there are lots of options available.

@rhcarvalho great post, and makes sense, thanks. I have less experience with Elixir deployments, so my naive hope is that all these private apps will be “rolling” to latest versions - I’d rather keep things as consistent and simple as possible and Docker comes with a load even if it’s totally used transparently.

This all might be wishful thinking though and is certainly hypothetical. So far then the plan will be to try xamal on a dedicated (LXC if possible) host, and then grow to a Docker backed solution once your prophecies come true! I have to admit it might be handy to have a platform that could run any language even if I have no intention of doing so.

LostKobrakai

LostKobrakai

I’d argue there’s always some tool around elixir to manage it from the outside, be it systemd, supervisord, docker, firecracker, …. That tool is one you want to understand. Docker just happens to bring a lot of further benefits in isolating the runtime elixir is started in.

(OCI) containers are also kind of a standard interface of doing things nowadays. Like dokploy can build using Nixpacks, Railpack, Buildpack (Heroku style) and plain compose and dockerfiles, but all become docker containers to run. Fly.io uses docker containers as the shippable artefact even though they convert it to firecracker vms before running them.

And most importantly to me is that it’s never just elixir I need to deploy. There might need to be a postgres for a database, prometheus for metrics, uptime kuma for uptime tracking, ….

In the end to me a docker based system is quite a bit simpler because it’s much closer to standards used/discussed in so many places over a system like kamal/xamal, where I need to learn that one specific tools inner workings – which is knowledge, which transfers much less to elsewhere.

rhcarvalho

rhcarvalho

To do that in lock-step is highly impractical. Like versioning files like report.docx, report final.docx, report final final v2.docx :slight_smile:

Since Mix Releases bake in the Erlang/Elixir runtime, you can get away with multiple versions of the runtime in the host, no problem. You won’t be able, though, to say what else you expect on the OS at runtime (true for any stack, requires either manual documentation or some form of automated provisioning, where Ansible, Dockerfile, etc come in).

:+1:


Since you are thinking about “microapps” and keeping everything consistent, maybe you should consider having everything be a single monolithic Phoenix app, providing all the disparate features you want. That means a single repo to maintain/work on, a single code base to deploy, and then you could even use good old sftp (or git) to transfer your files to the host and start a production server. Or use a small systemd service to make sure it keeps running if it ever crashes.

spammy

spammy OP

One thing that resonated on poitions.io (and I’ll reiterate that I’m no Elixir pro yet!) was the following:

PaaS Breaks the BEAM
You chose Elixir for fault tolerance, lightweight processes, and distributed state. PaaS platforms isolate containers and kill distributed Erlang. Don’t deploy it somewhere that holds you back.

Is this as much of a drawback as it sounds? Or does it practically not matter?

This is interesting, although I’d have to think of how to split out the code (presumably things could be made to build “plugged in” modularly).

LostKobrakai

LostKobrakai

Heroku as the fiest popular PaaS used to have no means of networking their apps or app instances together. This is an implementation issue, not one inherently present in all PaaS options. E.g. dokploy with docker swarm underneigh can do multi server deployments of many instances as far as I understand.

lpil

lpil

Creator of Gleam

I really like using Podman’s systemd integration for small deployments. It’s a lot less opinionated than most self hosted PaaS things, and it integrates very cleanly into a regular systemd setup, making it conceptually simpler.

I don’t have Elixir specific material, but I do have a guide for Gleam that could be converted to Elixir quite easily: Deploying Gleam on a Linux server | Gleam Programming Language

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
ChrisAmelia
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication): toke...
New
dillonoconnor
Is there any way to avoid the Hologram compiler running when using iex? It seems like the front-end code could potentially be disregarded...
New
thiagogsr
** (ArgumentError) expected :max_attempts to be a positive integer, got: {:@, [line: 10, column: 19], [{:max_attempts, [line: 10, column:...
New

Other Trending Topics Top

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
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
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
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews