Remote access
Cloudflare
Tunnel and access routingCloudflare can expose selected Stackarr-managed services without opening every local app directly.
What It Does
- Maps public hostnames to chosen internal services through a tunnel.
- Lets you decide which apps should be reachable beyond the local network.
- Can add an additional access policy in front of sensitive service routes.
How Stackarr Fits
Stackarr keeps Cloudflare routing explicit: setup and settings map hostnames to services such as Pulsarr or BookOrbit, and agent tools can inspect or update routes with clear confirmation.
Stackarr can publish selected app hostnames through Cloudflare Tunnel and place Cloudflare Access in front of each route. The origin stays on the private network. Stackarr does not need an inbound router port forward.
Before you start
Prepare these values in Cloudflare:
- A domain in a Cloudflare zone.
- The Cloudflare account ID and zone ID.
- A scoped API token with Tunnel Edit, Access Policies Edit, Zero Trust Edit, Zone Read, and DNS Edit.
- A hostname for each app, such as
photos.example.com. - An email address for every person who should pass Cloudflare Access.
Keep each app's own authentication enabled. Cloudflare Access adds an identity gate. It does not replace the application login.
[!WARNING] Native apps may not complete Cloudflare Access sign-in. Test mobile, television, and desktop clients before protecting a native-client route. Browser-based admin pages are the safest first route.
Connect the Cloudflare account
- Open Settings → Remote access.
- Enter the Cloudflare API Token.
- Enter the Cloudflare Account ID and Cloudflare Zone ID.
- Enter a stable Cloudflare Tunnel Name.
- If a tunnel already exists, enter its Cloudflare Tunnel ID.
- Save the settings.
- Select Save & rotate connector to create or refresh the connector credential.
- Wait for the operation to report Queued, then confirm that the connector becomes healthy in Cloudflare.
Treat the API token and connector credential as secrets. Do not place them in Git, screenshots, blog drafts, support messages, or public environment files.
Configure the Access allowlist
- Stay in Settings → Remote access.
- Enable Protect Routes with Access.
- Enter the approved addresses in Allowed Emails.
- Set Session Duration. The default is
720h. - Save the settings before publishing routes.
Cloudflare sends a one-time PIN to an approved email unless the account uses another configured identity provider. Keep the allowlist narrow. Remove old addresses when access is no longer required.
Publish one app from its settings
- Open Apps.
- Select Settings on the app.
- Find Open and connect.
- Enter the Public hostname, such as
photos.example.com. - Keep Require Cloudflare Access enabled for a browser-based private app.
- Select Add route.
- Confirm the warning that names the app and hostname.
- Wait for Public route saved and queued.
Leave the hostname empty and save again to remove only that app's route. This does not delete the tunnel or another app's route.
Review and publish the complete route list
Use Settings → Remote access → Routes and publishing when you need to review every route at once.
- Select Add route.
- Enter the public hostname.
- Select the matching Stackarr service.
- Enable Access when the client can complete the identity flow.
- Remove stale or duplicate rows.
- Keep Expose Listed Routes Only enabled.
- Keep Warn Before Public Exposure enabled.
- Select Save & apply routes.
This operation publishes the route list, DNS records, and Access policy to Cloudflare. A normal Save stores the configuration without publishing it.
Verify the route
Test from a device that is not connected to the home network.
- Open the hostname in a private browser window.
- Confirm that Cloudflare asks for identity before the app loads.
- Sign in with an approved address and confirm that the app login still appears.
- Repeat with an address outside the allowlist and confirm denial.
- Check the home router and confirm that the app has no inbound port forward.
- Stop the connector briefly and confirm that the hostname fails closed.
- Restore the connector and confirm that approved access returns.
For a native application, test every supported client. If a client cannot complete Access sign-in, remove Access from that route or keep the app private and use a VPN instead.
Troubleshoot or roll back
If Cloudflare returns a gateway error, verify the connector health and the app's private target before changing DNS.
If approved users loop at sign-in, check the hostname on the Cloudflare Access application, the email allowlist, and policy order.
If an unapproved user reaches the app, remove the hostname immediately:
- Open the app's Settings → Open and connect.
- Clear Public hostname.
- Select Update route.
- Confirm Public route removal queued.
- Verify from an external device that the hostname no longer reaches the app.
Do not restore a router port forward as a permanent fix. Correct the tunnel, route, or policy while the origin remains private.