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?
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
AndyL
One option might be Xamal…
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
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
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, fromffmpegtoca-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
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
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
To do that in lock-step is highly impractical. Like versioning files like
report.docx,report final.docx,report final final v2.docxSince 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).
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(orgit) to transfer your files to the host and start a production server. Or use a smallsystemdservice to make sure it keeps running if it ever crashes.spammy
One thing that resonated on poitions.io (and I’ll reiterate that I’m no Elixir pro yet!) was the following:
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
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
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