I wanna connect to an elixir runtime running on a separate node with livebook, but I cannot get it to work. I can connect to the other node through an iex session just fine but not through livebook.
I want to change the hostname of the nodes spawned by livebook but I cannot figure out how to do that… any ideas?
I figured it out…
I’m running livebook like this
iex -S mix phx.server in a checkout of the livebook repo.
If I give my livebook server node a name like this
iex --name email@example.com -S mix phx.server the spawned runtimes will copy that hostname instead and connections to my external node works.
You can configure the various distributed node settings with environment variables set when starting Livebook. I use a small script to do it, which you can find here: Tiny helper script to start Livebook connected to production (fly.io) or development - #2 by zachallaun
I believe the
LIVEBOOK_DEFAULT_RUNTIME variables will be most relevant to you. If you’re connecting to a node via IPv6, you will also need the