Local's router not starting

What issue or error are you experiencing?

After upgrading from 7.2.1 to 9.0.1 the router is not starting anymore. In the log’s i’m seeing this error
2024/04/10 16:04:40 [emerg] 4580#0: bind() to 0.0.0.0:80 failed (13: Permission denied)
But the port 80 and 443 are not even in use when i check the port usage. Seems like a permissions issue.

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

On Linux upgrade from 7.2.1 to 9.0.1 and try to start an existing site.

System Details

  • Local Version:
    9.0.1
  • Operating System (OS) and OS version:
    Linux Ubuntu 22.04

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

local-logs1.zip (871.4 KB)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hey @h_dwd

That’s definitely odd! Have you tried a full restart to see if that clears up any processes or things that may be still using those ports?

I just double checked that the 9.0.1 version of Local works on both Pop_OS and Ubuntu 22.04 for me.

@ben.turner yes i have tried a full restart, but it didn’t help

I did find another post on this forum with the same issue: V7.2.1 - Local's router is having trouble starting [bind() Address already in use] - #9 by nickc

I tried to follow the steps explained in the solution, but it doesn’t help

@h_dwd I’m sorry that you ran into this. Like Ben, I can’t reproduce it yet. You could try:

  1. Stopping all sites and quitting Local.
  2. Opening ~/.config/Local/lightning-services/.
  3. Deleting any nginx-* folders you see there.
  4. Starting Local. (Local will copy its bundled nginx service binary and supporting files to the lightning-services folder again to restore it afresh.)
  5. Approving any requests from Local that say “Authentication is needed…” when you start a site.

If you still see the “Permission denied” failure for the router, it may be helpful if you could share the output of this:

getcap ~/.config/Local/lightning-services/nginx-1.16.0+7/bin/linux/sbin/nginx

If it does not end with nginx cap_net_bind_service=ep, you can try:

sudo setcap cap_net_bind_service=+ep ~/.config/Local/lightning-services/nginx-1.16.0+7/bin/linux/sbin/nginx

Then restart Local and try to start a site.

1 Like

Tried the steps you mentioned but it still doesn’t work

Output of getcap ~/.config/Local/lightning-services/nginx-1.16.0+7/bin/linux/sbin/nginx shows the correct capabilities (ends with nginx cap_net_bind_service=ep )

But the log still shows permission denied, cannot bind to port 80, while the port is not even in use.

I just downgraded to 7.0.1 and everything works again. I’ll try updating again sometime in the future.

To reproduce this issue you should try installing a 7.x version and then update it.

That’s interesting @h_dwd !

One more thing to try. First, quit Local and then, within the ~/.config/Local/run folder there should be a router folder. Delete that folder and try starting Local and a site.