Deploying a Phoenix app from Windows to CentOS

Most likely it is a compatibility issue. From Erlang crash dump man page:

Init terminating in do_boot ()
The primitive Erlang boot sequence was terminated, most probably because the boot script has errors or cannot be read. This is usually a configuration error; the system can have been started with a faulty -boot parameter or with a boot script from the wrong OTP version.

Excluding ERTS often result in faulty behavior. For consistency I guess it’s probably best to always bundle it.

Now, since the host system (Windows) is different from the target (CentOS), you have four options:

  1. Build the release inside a CentOS Docker container. This is the most lightweight solution and highly recommended.
  2. Build the release inside a CentOS VM (via Virtualbox, VMWare, etc.).
  3. Build the release on a CentOS build server.
  4. Build the release on the production server.

Option 1 and 2 can be done on your host machine. Option 3 needs you to have an extra server for building releases, and that might not be feasible depending on your company. I don’t think option 4 is recommended though, but it’s possible. Be aware that all options requires your container/VM/machine to have Elixir installed.