What's the best way to deploy a Phoenix app in production?

Is there something as easy and straightforward as Laravel Forge? I’ve tried Gigalixir and tho it seems easy, it’s kind of limited and expensive in my opinion.

1 Like

I’m the founder of Render which a lot of Elixir devs use and like.

We also have a guide to deploying Phoenix with Mix releases.

Hope this helps!


Thanks! I will have a look at that.

I find Gigalixir the best option for quick and painless deployment of Elixir apps. Heroku does the same but is more expensive than Gigalixir.

I haven’t used Render, but it looks like a great option.

I guess you don’t really want to take care of the infrastructure yourself, so deploying to a DigitalOcean droplet with Docker or Kubernetes might not be the best option for you, although you did say Gigalixir is limited, so this might be your best way forward


hey @supernova32 thanks for your answer. My goal is to deploy on VPSes/Dedicated server on Vultr/Digital Ocean. And install my own software on the server through SSH as well. I don’t have much experience with Docker/Kubernetes but I’m willing to learn them if necessary.

I advise You to read about release documentation if You want to deploy on VPS :slight_smile:



thanks @kokolegorille. I’ll have a look

I’m having issues deploying a simple gatsby site on Render. I’m trying it to see how it feels without having to pay 7 dollars but it’s already failing.

I successfully deployed a Create React App. But routing is missing. SPAs should be redirected to index.html. Does it have that feature?

update: it does. I would have to try it without paying first. Otherwise VPSes/Dedicated servers are my first choice for now.

You can set up a rewrite to /index.html using this guide: https://render.com/docs/redirects-rewrites

Happy to look at your Gatsby build if you want to send us details in render.com/chat.

thanks! I already looked at the docs for the rewrite. Render seems to be a good alternatives to free services such as Netlify. Tho it doesn’t offer anything more than what Netlify does. Anyway I’m looking into for Phoenix. Not static sites.

The gatsby build stated something about make. But like I stated I’m here for Phoenix. And having some free trial or free tier would be great to try it tout.

There are a good range of opinions posted in this thread too :smiley:


We’re thinking of introducing a free trial that lasts a week or two. Re: your Gatsby build, I think you’ll need to pin your Node version to >=10 <11 in package.json as outlined here: https://render.com/docs/deploy-node-express-app#a-note-on-node-versions

1 Like

thanks! I’ll have a look

thanks! I had a look at it.

alright then. Thanks

Hi @anuragg, where are your servers located? I saw that you use Google Cloud Platform, is that all on the US West Coast? Is the CDN network Google’s?



You can try some of these options:

The way you presented these options are a little confusing, because some of them are not ways to deploy a Phoenix app - maybe this is a language barrier? (natural language, not programming language)

gigalixir is what you want, if you do not want to deal with infrastructure. Run one command to deploy, and be done with it.

distillery can be used with, for example, edeliver but it does not deploy your Phoenix app. from the README:

it takes your Mix project and produces an Erlang/OTP release, a distilled form of your raw application’s components; a single package which can be deployed anywhere

mix release same as distillery but different :slight_smile:

docker container is, in my own understanding (I might be very wrong here), a way of running apps in separated environments, very close to (but apparently different to) virtual machines. From their own website:

Containers are an abstraction at the app layer that packages code and dependencies together. Multiple containers can run on the same machine and share the OS kernel with other containers, each running as isolated processes in user space.

My personal preference to deploying a Phoenix app in production is a Ubuntu droplet on digital ocean, install postgres, nginx, and elixir, and then use that server as the build server with edeliver. Once it’s set up, it’s as easy as running mix edeliver update production, and maybe mix edeliver migrate production.