For OctoPrint remote access without forwarding the printer’s web or camera ports, use Tailscale or the OctoEverywhere plugin. If you manage your own VPN, connect directly over WireGuard or put an authenticated Caddy reverse proxy behind the VPN. Keep OctoPrint’s login enabled and check both the interface and the webcam from outside your home network.
Start with a working local connection. The Raspberry Pi setup guide covers first boot and account creation. If the printer itself stops, use the serial-link and host troubleshooting guide: a remote browser and the printer’s USB connection are separate parts of the system.
Which port OctoPrint and OctoPi use
Every route below points at OctoPrint’s local address, so find the port first.
| Install | Web interface | Webcam stream | Source |
|---|---|---|---|
| OctoPi image | http://octopi.local and https://octopi.local (no port in the URL) | If OctoPi detects a USB webcam or Raspberry Pi camera, the MJPG-streamer feed is available at http://octopi.local/webcam/?action=stream or directly at http://octopi.local:8080/?action=stream on its configured port 8080. | OctoPi README |
| Manual OctoPrint install | Port 5000 by default (server.port) | Set up separately | config.yaml docs |
OctoPi uses a self-signed certificate for its HTTPS address. The examples below reach the local OctoPi frontend over HTTP on port 80. The standard ports are 80 for HTTP and 443 for HTTPS. OctoPi README, MDN URL guide.
On a manual install, OctoPrint attempts to bind to all available interfaces when server.host is unset. The hostname octopi.local is the image default; the setup guide covers changing it.
Why not to port forward OctoPrint
The OctoPrint project recommends a VPN for private access and points readers to its plugin repository for cloud and messenger options. OctoPrint remote access guidance, Remote Access plugins.
Keep the OctoPrint web port, camera port and SSH off the public internet. If you host WireGuard behind a router, forward only the VPN’s listening port. WireGuard sends its packets over UDP. WireGuard protocol.
Choose the access route
| Method | Client requirement | What you maintain |
|---|---|---|
| Tailscale | Enrolled client on each device | Device membership and access rules |
| WireGuard | A configured VPN peer | Keys, endpoint and firewall rules |
| Authenticated proxy inside a VPN | VPN access plus browser credentials | Proxy, certificates and backend restrictions |
| OctoEverywhere | OctoPrint plugin plus the OctoEverywhere service | Plugin and account access |
Tailscale: connect the host and your device
On OctoPi or another supported Linux host, install Tailscale and connect it to your tailnet. Tailscale Linux installation.
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
tailscale status
tailscale ip
tailscale up prints a sign-in URL. Open it, then check that the host appears on the admin console’s Machines page. Install Tailscale on your remote phone or laptop and sign in to the same tailnet.
Use Tailscale Serve to give the interface a private HTTPS address. On OctoPi, point it at the local web frontend on port 80.
sudo tailscale serve --bg http://127.0.0.1:80
tailscale serve status
For a manual install, use http://127.0.0.1:5000 as the target. With --bg, Serve runs in the background and resumes after a restart. Serve command reference.
If Serve prompts you to enable HTTPS certificates for the tailnet, follow its consent link. Open the private HTTPS URL that Serve reports. Keep the printer on Serve and leave Funnel off for this service. Tailscale Serve setup.
Review every grant that covers the printer host. To allow only Serve on its HTTPS port, limit the relevant grant’s ip field to ["tcp:443"] and check that other rules do not grant broader access. If OctoPi starts MJPG-streamer after detecting a supported camera, clients that can reach its configured port 8080 can open the stream directly. Tailscale grants, OctoPi README.
Try the URL from your phone with Wi-Fi disabled and Tailscale connected. Then disconnect Tailscale and check that the private URL stops loading over that connection. Check the camera and live temperature updates as well as the initial page.
WireGuard: a direct host tunnel
An existing router VPN can provide access to the printer network using its own routing and firewall setup. For a smaller example, the OctoPrint host itself can be the WireGuard endpoint, which avoids routing through it to other LAN machines. The following pair uses an illustrative 10.77.0.0/24 tunnel network; choose a different range if it overlaps your networks.
Install WireGuard on each device. To generate a separate key pair on each Linux peer, use the commands below. Insert each device’s own private key and the other peer’s public key in place of the uppercase labels. WireGuard Quick Start.
umask 077
wg genkey | tee privatekey | wg pubkey > publickey
Host configuration, /etc/wireguard/wg0.conf:
[Interface]
Address = 10.77.0.1/24
ListenPort = 51820
PrivateKey = HOST_PRIVATE_KEY
[Peer]
PublicKey = CLIENT_PUBLIC_KEY
AllowedIPs = 10.77.0.2/32
Remote client configuration:
[Interface]
Address = 10.77.0.2/32
PrivateKey = CLIENT_PRIVATE_KEY
[Peer]
PublicKey = HOST_PUBLIC_KEY
Endpoint = vpn.example.com:51820
AllowedIPs = 10.77.0.1/32
PersistentKeepalive = 25
Replace the example endpoint with your reachable VPN hostname. If the host is behind your router, forward the UDP port selected by ListenPort to the host. Allow that UDP port through the host firewall and allow printer web traffic from the client on the WireGuard interface. Keep public web access blocked. WireGuard protocol, wg-quick manual.
On Linux, save each peer’s configuration as /etc/wireguard/wg0.conf on that peer and start it with sudo wg-quick up wg0. The client’s AllowedIPs routes only the host’s tunnel address through WireGuard. Inspect the tunnel with sudo wg show. wg-quick manual, WireGuard Quick Start.
On the remote client, open http://10.77.0.1/ for OctoPi or http://10.77.0.1:5000/ for a manual install. The client’s 25-second keepalive can keep a NAT mapping open. If you see a handshake but the page fails, check the service binding, web port and firewall. WireGuard Quick Start.
Reverse proxy with authentication
Keep OctoPrint’s login enabled and restrict the proxy to VPN clients. The OctoPrint project recommends a separate machine for the proxy. This example uses a dedicated Caddy instance on the OctoPi host, with a private hostname and an HTTPS listener on port 8443. OctoPrint remote access guidance.
Caddy normally adds HTTP redirects on port 80. The example disables those redirects so OctoPi’s existing frontend can use that port. Automatic HTTPS, Caddy global options.
Use Caddy 2.8 or later for basic_auth. Run caddy hash-password and replace the label below with the generated hash. The proxy login uses HTTPS to protect the credentials in transit. Caddy basic_auth directive.
{
auto_https disable_redirects
}
https://printer.home.arpa:8443 {
tls internal
basic_auth {
operator REPLACE_WITH_GENERATED_PASSWORD_HASH
}
reverse_proxy 127.0.0.1:80 {
header_up -Authorization
header_up X-Scheme https
}
}
Configure private DNS or a client hosts entry so printer.home.arpa resolves to the proxy. With Caddy’s Linux systemd service, save the example in /etc/caddy/Caddyfile, restrict port 8443 to VPN clients in the host firewall, then apply it with sudo systemctl reload caddy. Caddy service documentation.
The tls internal directive issues the site certificate through Caddy’s local CA. For the documented systemd setup, copy its public root certificate from /var/lib/caddy/.local/share/caddy/pki/authorities/local/root.crt and install it in the authorized client’s trust store before opening the proxy URL. Caddy tls directive, Caddy service documentation.
Caddy’s reverse proxy supports WebSockets. The example removes the Authorization header before forwarding the request, keeping the proxy’s Basic credentials out of OctoPrint. Caddy reverse_proxy directive.
In a private browser window, open https://printer.home.arpa:8443, pass the proxy login, then sign in to OctoPrint. Check the webcam, live status and file list. Restrict direct access from remote clients to OctoPi’s original web and camera endpoints so they have to use the proxy.
If redirects or download URLs use the wrong scheme or host, review the server.reverseProxy keys in the config.yaml documentation:
| Key | Default | What it does |
|---|---|---|
schemeHeader | X-Scheme | Header OctoPrint reads for http or https |
hostHeader | X-Forwarded-Host | Header OctoPrint reads for the public host |
trustedProxies | [] | ”List of trusted proxy servers for which to ignore the IP address” |
trustLocalhostProxies | true | Ensures 127.0.0.0/8 and ::1 are always treated as included in trustedProxies |
Caddy sets X-Forwarded-Host and X-Forwarded-Proto by default. The example also sets X-Scheme to https for OctoPrint’s default scheme header. Trust only the actual proxies in the chain, including any OctoPi frontend between Caddy and OctoPrint. Caddy reverse proxy headers, OctoPrint config.yaml.
OctoEverywhere: a cloud remote access plugin
OctoEverywhere uses a cloud account to provide browser access to the OctoPrint interface. The plugin listing includes compatibility with OctoPrint 1.3.0 and later. OctoEverywhere plugin listing.
Open the repository browser in OctoPrint’s Plugin Manager, search for OctoEverywhere and select Install. Once OctoPrint restarts, follow the setup link in its web interface to link the printer. Plugin installation guide, OctoEverywhere setup.
Once it is set up, open the printer on a phone using mobile data and confirm the expected printer identity and camera view. Keep the local OctoPrint account credentials available too, so the service is not your only way to administer the machine. If you retire the service, remove the association and the plugin, then check that the local interface still works.
Accounts, cameras and application keys
For a monitoring account, remove the default Operator membership and assign Read-only Access in Settings > Access Control. Keep the Guests group without permissions and leave automatic login off. OctoPrint access controls.
OctoPrint embeds the webcam and leaves access control to the camera service or proxy. Anyone who can reach the raw webcam URL may be able to view it. OctoPrint access controls. Route both the webcam stream and snapshot URLs through the protected connection, and on Tailscale restrict direct access to the configured camera port as described above.
Use an application-specific API key for each compatible app. Approve the app’s request in OctoPrint’s web interface and manage access per user or as an administrator. Application Keys plugin. Revoke unused keys when changing phones or retiring integrations, and remove lost devices from the VPN or OctoEverywhere account as well.
A repeatable connection check
With the printer idle, open the remote URL over mobile data and verify the expected printer, camera and live status. Then check that access is denied when you remove the credential or connection that protects that route.
- Tailscale or WireGuard. Disconnect the VPN, then retry the printer page and private camera URL. Both should be unreachable.
- Caddy. Keep the VPN connected and open a browser window with no saved proxy credentials. The UI and camera URL through the proxy should require the proxy login.
- OctoEverywhere. Sign out of the cloud account and retry the same printer URL. Confirm that the account is required for the printer view.
If the interface disappears during a print, first establish whether the machine is still printing. Avoid restarting a host that is feeding an active job merely to fix the browser, and work through the disconnect diagnostic order locally when necessary.
The examples were adapted from the linked project documentation for OctoPrint 2.0.1 and OctoPi 1.1.0. The commands and configurations were not run for this article. OctoPrint image downloads.