Where/How to deploy my ash project
Hi folks, I'm new to ash and my app is getting very mature and reached at a point where i need to show to the people. But I'm wondering where and how to deploy a ash/elixir backend?
My prev exp is with JS and we use an almost drag-n-drop deployment platforms railway/vercel/cf, etc
14 Replies
For demos, I think fly is a reasonable choice:
https://fly.io/docs/elixir/getting-started/existing/
https://fly.io/docs/flyctl/install/
thanks for the recommendation.
and for the production use, for enterprise usage, what is the ideal place to deploy ash backend with postgres? azure/aws/vps?
I've worked on Elixir/Phoenix systems, some of which used Ash, on Azure, AWS, Gigalixir, and Fly. In my experience, the big vendors are pretty reliable, while the PaaS ones were small/new and still working things out a bit.
A big thing that Fly is behind on compared to say AWS is a reliable, managed database solution.
(or has been behind on - I know they are working on it)
We're using Kamal for deployments and Hetzner for cloud VMs. Similar experience to Fly.io with a bit more manual config, but the reliability and cost of Hetzner.
Fly has managed Postgres now, but it’s a recent product they added. I’m using Fly and Supabase
I use the old nginx + systemd + self hosted postgres + let's encrypt + VPS not the most shiny but does the job pretty well. I generally have a deploy script that does all of the above. This way I don't pay vercel prices to have my apps deployed. The beauty of elixir is that you don't need WSGI and other hacks to have a real webapp
how easy is kamal to setup? did you face any trouble? i'm new to all things deployment. my past exp were all using those "one-click/one-command deploys"
great! i also want to deploy to vps. i'm the sole dev in the team and i have now developed an ash backend with react frontend (it's an internal app, not to be used by public).
now that i want to push it to production, the team is concerned about downtimes, app crashes, etc and has asked me to have a robust setup with 100% availability.
for this reason, i dont want the app on fly.io at least for production. as for testing env, it should be fine.
i'm thinking the app would work fine if i deploy it on a beefy server even if its hetzner or aws/azure. should i be looking at setting up load balancer, db replica, etc? am i overthinking or are these nice-to-have things?
how many users
you would be impressed by the number of users a classic nginx + python can handle
let alone something like the beam
to be registered: 250-300 users. 500 max.
but at a single time, 20-50-100 users users max will be using the system
I mean you could deploy and then load test it to validate everything is working as expected
Sorry, just seeing this.
I'd say for a standard Elixir setup Kamal deploy is pretty straight forward to setup. It's a bit more work to set up than Fly since you need to tell it where to deploy the app and where to pull secrets from and since you'll have to setup the server yourself, but after it's running it's not much different from Fly. (
kamal deploy vs fly deploy)
Also highly recommend using Tailscale with SSH if you can. It makes the deployment piece super easy.
https://blog.appsignal.com/2025/06/10/deploying-phoenix-applications-with-kamal.html should give you a pretty step by step walk through (although I would skip the bundle stuff and just install Kamal globally using Ruby).
Or you can Google for others guides Even a Rails template should give you a good idea of what you need to do.
Here's a trimmed down demo from one of my projects:
`Thanks so much. This is very useful
If you have phoenix and just want to have a docker compose running you can checkout this:
https://hexdocs.pm/phoenix/Mix.Tasks.Phx.Gen.Release.html#module-docker
doing
--docker did the job for me and the docker-compose.yaml is quite easy do to yourselfthats good to know. thanks for sharing.