Skip to content

HTTP on a local network

The Docker Compose, docker run and Arcane guides serve Lunar Paper over HTTP on host port 3000 by default. You can choose a different host port. Use that port in your browser address, port mapping, and firewall rules. You do not need a domain or a certificate.

  1. Set APP_URL to the server’s network address, such as http://192.168.1.20:3000. Also set HTTP_BIND_ADDRESS=192.168.1.20 to an interface assigned to the server. Apply both using the Compose startup command, or redeploy the Arcane project. An address with localhost only works on the server.
  2. Allow your chosen host port (3000 by default) through the server’s firewall. You do not need to open any other port.
  3. On the other computers, open exactly the APP_URL address.

The Compose HTTP access file binds to 127.0.0.1 by default. HTTP_BIND_ADDRESS selects the LAN interface and HOST_PORT selects the host port. Use the same address and port in APP_URL. With docker run, use -p 192.168.1.20:3000:3000, replacing the middle port if needed. The final 3000 is the container port and stays unchanged.

On Linux, ports that Docker publishes are not blocked by firewalls such as ufw. To make Lunar Paper reachable only from the server itself, use HTTP_BIND_ADDRESS=127.0.0.1 and APP_URL=http://localhost:3000 (or -p 127.0.0.1:3000:3000 with docker run).

When you use HTTP with a network address, browsers block camera and microphone recording and some clipboard actions. Everything else, including sign-in, still works. Browsers do not apply this restriction to localhost. If you need these features, use HTTPS. You can switch without losing data.

  • The connection is refused. Check that the IP address belongs to the server, that your chosen host port is published, and that the firewall lets the other computer in.
  • Sign-in keeps repeating, or saving fails. The address in the browser must match APP_URL exactly, including the port.
  • Setup will not unlock over HTTP. Open the exact APP_URL address, with no proxy in between.
  • The setup key is accepted, but then /setup/status says Not Found. Another installation on the same address is using the same cookie names. Give it its own COOKIE_NAMESPACE.
  • The browser switches http:// to https://. That host name was used with HTTPS before, and the browser remembers it. Use a different host name, or switch to HTTPS.