DEV Community

Discussion on: Embedded Elixir (without Nerves)

exadra37 profile image
Paulo Renato

HOME: Again, not specific to Erlang, but Erlang tries to save a cookie file in the home dir for some reason.

The reason for this cookie existence is to allow to run distributed Erlang/Elixir. So the cookie will be used to allow nodes to talk with each other.

You can read more here, where at some point you will read:

First of all, you need to ensure all machines have a ~/.erlang.cookie file with exactly the same value.

lasseebert profile image
Lasse Skindstad Ebert Author

Correct :)

You can also set the cookie on startup of the application with some command line argument or env var, which might prevent erlang from saving a generated cookie. I haven't tried this though.