Connect to Webshare over WAN

Is there a way to connect to a webshare over the WAN?

I would also want to know how to do this. Sharing download links with people outside of the LAN is a pretty common use case.

I tried setting this up via reverse proxy. I can access the main webshare UI but download links don’t work. I suspect it’s because links are created using port 756 which is not exposed to WAN.

How do we set this up?

FWIW, I figured out how to configure Nginx Proxy Manager to expose Webshare over WAN. Here is a short summary.

Step1: Expose the webshare service on port 755 to WAN using Nginx Proxy Manager. This part was pretty standard.

Step2: Expose port 756. TrueNAS 26 WebShare serves anonymous download links from a separate server on port 756 and it hardcodes :756 into every link. I exposed that link server through NPM (new :756 server block + container port publish). I also had to open the ingress port for TCP 756.

This is now working but it was a little tricky to setup.

Hey Marius,

Can you elaborate on this? I am trying to get this working too with no luck using Zoraxy NPM.

Thanks!

Exposing TrueNAS 26 WebShare over WAN via Nginx Proxy Manager

The setup: TrueNAS 26’s WebShare app runs two HTTP services, not one. Port 755 is the main WebShare UI (share browser, download pages). Port 756 is a separate link server that serves the actual file content behind anonymous download links. When WebShare generates a share link, it bakes :756 into the URL, so the browser is sent directly to port 756 on whatever host it resolved. That port number is not configurable and can’t be remapped.

Step 1: Proxy the main service (755): standard

  • In NPM, create a proxy host forwarding your chosen WAN-facing hostname to the TrueNAS box (the VM running WebShare) on port 755, plain HTTP upstream.
  • This alone gives you a working WebShare UI from outside. Pages load, shares list correctly.
  • The trap: every generated download link points at :756, which isn’t published, so downloads time out / fail from WAN even though the UI works fine. From LAN it all works because 756 is reachable locally.

Step 2: Proxy the link server (756): three separate things

Exposing the second service required three coordinated changes, which is why this step was the real work:

  1. New NPM server block. A second proxy host in NPM forwarding to the same TrueNAS host on port 756 (a custom listen port on the proxy host. NPM defaults to publishing only 80/443/81).
  2. Container port publish. NPM runs as a Docker container, so a listener on 756 inside the container is unreachable from outside unless the port is mapped. The container’s compose/run config had to be edited to add -p 756:756 (or the equivalent ports entry) and the container recreated.
  3. Ingress firewall rule. Inbound TCP 756 opened on the router/firewall facing the WAN. This is easy to miss because 755 went through the same NPM container, but any new published port needs its own firewall opening.

Constraints worth remembering

  • The external port must literally be 756. Because the links hardcode :756, you can’t remap it to another external port (e.g., map WAN 17556 → container 756) — the share URLs would still point at 756. Same trick can’t be used to hide the port behind 443.
  • Both proxies point at the same TrueNAS host; they differ only in port (755 UI, 756 file serving for anonymous links).
  • Anonymous download links are unauthenticated by design — anyone with the link (and WAN reachability of 756) can fetch the file. The link’s unguessability is the only access control.

Note, while this works, typically sharing anything out over the WAN is a bit on the dangerous side. Untrusted users shouldn’t be hitting end-points that aren’t specifically hardened to be WAN visible.

Personally I’m using Tailscale for this, but there are other options as well, such as Cloudflaire

Agreed on the risks. Exposing the shares over the WAN is a bit dangerous.

But for me, that is the entire point of my NAS. 90% of what’s on it is personal files, videos and pictures that I’d like to be able to share with friends and family. Tailscale isn’t really an option with some less-technical people.

TrueNas should consider making this use case easier to setup.

It’s been a topic of deliberation here multiple times, believe me :wink:

But that said, nothing to announce yet. Both are hard problem spaces. Either harden the product to make WAN sharing safe (if it ever truely can be) or find ways to make the VPN / Networking portion easier to setup and manage for mere mortals, which is it’s own special challenge.

kris mentioned cloudflare. if tailscale is a nonstarter for family, cloudflare tunnel is the usual path that doesnt open 755/756 on your wan.

rough shape:

  1. install cloudflared on the truenas box (app or bare binary)
  2. one tunnel, two public hostnames pointing at the two webshare listeners on localhost
  3. in cloudflare dns those CNAMEs go to the tunnel
  4. still need webshare itself to generate links on the public hostname/port people actually hit. if it keeps baking :756 onto your lan ip, the npm/zoraxy path mariusz posted is still required, or you put both under one hostname with path rules if the app lets you set an external url

dont put auth-less share endpoints straight on your home ip. tunnel + cloudflare access email otp on the ui hostname is what i do when relatives wont install a vpn.

Though it’s beyond the scope of this, but I managed to achieve the same (webbased sharing files with others) via FileBrowser Quantum (files.raineslair.de)