Skip to content
José Valim edited this page Oct 16, 2023 · 8 revisions

Q: How to address the "Your hostname does not resolve to a loopback address" message?

There may be different root causes for the problem above. Please find the subsection that applies to you.

Are you using macOS?

This may be caused by a faulty hostname configuration. You can verify if that's the case by opening the macOS Terminal application:

$ scutil --get HostName

If it prints "HostName: not set" or it prints a hostname made of only numbers or invalid characters, then the issue is confirmed. To address this, you can set the Hostname to _ and let macOS fill it in for you:

$ sudo scutil --set HostName _

Alternatively, you can set your hostname explicitly:

$ sudo scutil --set HostName my-machine

Prompt your password and you should be good to go.

Are you using a VPN?

Some VPNs, such as Cisco Any Connect, may block or disable the loopback address. Therefore, you must configure Desktop to use longnames.

  • If you are using Livebook Desktop on Windows, create a file named ".livebookdesktop.bat" in your User Profile folder with the following contents:

    set LIVEBOOK_DISTRIBUTION=name
    set [email protected]
    
  • If you are using Livebook Desktop on macOS, create a file named ".livebookdesktop.sh" at your User Home with the following contents:

    export LIVEBOOK_DISTRIBUTION=name
    export [email protected]
    
  • If you are using Livebook's CLI or from source, consider using longnames:

    $ livebook server --name [email protected]
    $ elixir --name [email protected] -S mix phx.server
    
Clone this wiki locally