Choose the proxy's ports
Use this guide when lane URLs carry a port such as 8443, or when another web server on your machine wants ports 443 and 80.
Check which ports the proxy has
Section titled “Check which ports the proxy has”The proxy asks for 443 and 80. When it cannot have one, because another program holds it or the system does not allow it, it uses 8443 or 8080 and lane URLs carry that port. The doctor’s proxy group shows the ports and why:
$ devlanes doctorOn Linux, let the daemon bind 443 and 80
Section titled “On Linux, let the daemon bind 443 and 80”Linux keeps ports below 1024 for root. Give the devlanes binary the right to bind them, then restart the daemon. The path is the one the doctor prints after “runs from”; ~/.local/bin/devlanes is where the install script puts it.
$ sudo setcap cap_net_bind_service=+ep "$(readlink -f ~/.local/bin/devlanes)"$ devlanes daemon restartAn update replaces the binary and drops that right, so run both commands again after each update.
Move the proxy to other ports
Section titled “Move the proxy to other ports”Caddy, nginx or Traefik on the same machine competes with devlanes for 443 and 80, and on Linux the one that starts second does not get them. To leave them to the other program, give the proxy ports of its own:
proxy: https_port: 9443 http_port: 9080proxyPorts of the daemon's HTTP/HTTPS proxy, which serves every hosts entry, and whether other devices on the network may connect to it.
proxy.https_portPort the HTTPS proxy listens on; defaults to 443. When the port is taken or not allowed (low ports on Linux need extra permission), the daemon falls back to 8443 and service URLs carry the port.
Config referenceproxy.http_portPort for plain HTTP; defaults to 80, falling back to 8080 like https_port, and must differ from it. While HTTPS runs it redirects known hostnames to HTTPS; without a CA it serves them over plain HTTP.
$ devlanes daemon restartLane URLs then read https://myapp.localhost:9443. proxy.https_port and proxy.http_port have the details.
If another device should reach a lane
Section titled “If another device should reach a lane”Let the proxy accept connections from the network, then restart the daemon:
proxy: lan: trueproxyPorts of the daemon's HTTP/HTTPS proxy, which serves every hosts entry, and whether other devices on the network may connect to it.
proxy.lanAccept connections from other devices on the network; defaults to false, which refuses every peer that is not this machine. Those devices must still resolve the hostnames to this machine and trust the CA.
Config reference$ devlanes daemon restartThe device also has to resolve the lane’s hostnames to your machine and trust the devlanes CA, a certificate authority devlanes creates on your machine. Names under localhost always mean the device itself, so use a domain of your own from Fix programs that cannot resolve *.localhost. Every device on the network can then reach your lanes; Security has what that exposes.