Packaging an app for Windows

I’m thinking about using Elixir for an app that I’d need to package for Windows (it’s an on-prem version of a SaaS app). Ideally I need a way to spit out a Windows installer (.msi or .exe) that installs BEAM and my app seamlessly, preferably as a Windows service. Has anyone gone down this path?

I found some pointers to exrm, but it looks like I’d need to assemble an installer some other way. Pointers appreciated!

Never used it myself, but i think nowadays the recommendation would be to use Mix Releases? I think you can find an overview at:

But like i said: Never used that myself, so i’m sure other people can help out way better.

Can confirm mix release does a nice job of bundling everything you need into a single folder. You end up with a batch file with a few different options to either launch from the command line or install as a service. The default naming of the service is a bit weird due to Erlang VM being designed for multiple instances.

I didn’t go the next step to bundle into an MSI or similar, but I would imagine that would be trivial for a self contained folder.

The online docs are pretty thorough too. Look out to separate your configuration properly into runtime.exs

The other thing to watch for is upgrading. One of the Erlang exes doesn’t exit when you stop the service (epmd.exe) - this will prevent you copying over the release folder on upgrade unless you organise to kill it first.

1 Like

also check out bakeware:

1 Like

Has an installer using nullsoft:

And they were talking about installers in an issue here but not much was revealed.


Thanks all!