In this guide
Routing and Cloudflare
Publish only what you reviewed
Separate discovery, association, connector ownership, publication and external verification. A saved mapping is not proof that traffic reaches the right protected application.
These are source-reviewed operator procedures, not a certification of connected-tunnel or production readiness. Real connector handover, public TLS, Access behavior and intended-backend traffic require separate testing on your actual installation. Nothing in this guide changes your Cloudflare account.
Understand the five separate steps
- Discover
- Read allowed account, zone, tunnel and DNS inventory with a management API token.
- Associate
- Record which observed route belongs to a Den app, environment/profile and service. Metadata alone does not take ownership.
- Manage connector
- Explicitly hand over a specific cloudflared container to Den, with separate connector credentials and a host recovery path.
- Publish
- Apply a reviewed exact-hostname serving rule and eligible DNS effect using durable operation receipts.
- Verify externally
- Check trusted TLS, the selected authentication behavior and an app-specific response independently of configuration readback.
These controls do not change how you sign into Den. Keep the dashboard's own local/Cloudflare/HTTPS access plan separate, as described in Install and secure. Do not expose manager or agent ports to solve an application routing problem.
Connect scoped discovery access
As the independent Den owner, open Cloudflare. Supply the exact account ID, an explicit allowlist of 1–25 zone IDs and a scoped management API token. Zone membership is checked; account names and domain names are not interchangeable with resource IDs.
Discovery needs account/zone inventory, tunnel-read and selected-zone DNS-read permissions. Access-application read is optional for discovery but required where the chosen publication protection needs its evidence. Missing capabilities are reported individually. A saved token with partial read access does not prove tunnel/DNS write permission or Access coverage.
A Global API key and a tunnel connector token are not substitutes for the management token. The management credential is encrypted in manager state, never sent to cloudflared or application environments, and is not included in ordinary recovery profiles. Preserve the matching manager key and database securely.
- Review and save the credential for the intended account and zones.
- Use an explicit refresh to collect current inventory. Normal page loads read cached local observations; they do not continuously call Cloudflare.
- Read the last successful time for each inventory section and the latest refresh result. Older than fifteen minutes is marked stale. A failed refresh can retain older data with a current error.
- Resolve the permission or connectivity issue before a mutation that needs fresh evidence. Do not repeatedly refresh a rate-limited account or broaden permissions without reviewing the actual need.
Discovery does not create a tunnel, adopt a connector, edit DNS/Access, publish a route or change Den's authentication.
Associate an existing application route
- In Application associations, select an inventoried tunnel and explicitly refresh routes and Docker metadata.
- Select the observed connector for network matching. Docker metadata alone cannot prove which tunnel its token belongs to.
- Choose the exact rule and app/service candidate. Resolve multiple candidates explicitly; verify project/service labels, container port and a network shared with the connector.
- Save the association and review it in the app's Routing tab.
An external or host-port origin without a confirmed Docker match can remain visible without gaining Den lifecycle ownership. A matching Public URL is not sufficient association evidence.
Saving or removing an association changes local metadata only. It does not edit ingress/DNS, stop a connector, join an application network or unpublish traffic. Stopped or archived apps can retain associations and routes. Path, wildcard, non-HTTP, duplicate and complex rules remain external rather than being simplified or silently deleted.
Review connector handover
Connector adoption is a host-level change with immediate traffic consequences. Keep independent host access and the original container/image/controller definition. A new replica can receive traffic immediately, and retiring the old one can drop long-running streams.
- Refresh the intended tunnel and exact original running container. Confirm all existing origins, networks, controller ownership and a recovery route that does not depend on this tunnel.
- Provide the connector token separately and an approved official
cloudflare/cloudflared@sha256:…image. Docker must supportvolume-subpath, and the chosen cloudflared must support--token-file(2025.4.0 or later);APP_CONFIG_VOLUME_NAMEmust identify the agent's actual protected volume, and the configuredDATA_HELPER_IMAGEmust already be available locally with Node. - Preview the plan. Read host/installation identity, original fingerprint, networks, credential version, origins and expiry. Unsupported startup, mounts, host networking or certificate requirements block adoption.
- After exact review, run handover and track its operation. The image and origins are checked before retiring the original. Candidate readiness must prove the correct tunnel and applied configuration, not just a running process.
- Disable the identified old external Compose/controller yourself using its approved host procedure, retain its protected definition, then explicitly confirm that step in Den. Until confirmed, handover remains incomplete and image updates/rollback are blocked.
- Verify current local connector readiness and real application traffic separately.
The replacement receives a protected token-file mount, not the management token or Docker socket. Lost Docker responses retain phase intent and ownership for review. Do not create or start another candidate just because the reply was lost.
Intentionally stopped origins are not a blanket exception
Use an explicit short-lived offline-origin review tied to the original container, configuration and private version evidence. Only observed-unreachable origins can be acknowledged. Healthy origins remain mandatory; an acknowledged origin that becomes reachable also becomes mandatory for the candidate.
The required checks only grow. Candidate tunnel identity, applied version, networks and credentials remain required. Routes stay intact and no application is automatically started. Changed or expired evidence requires a new review.
Update, roll back or diagnose a connector
Once handover is complete, preview an approved official digest-pinned image update. Ordinary updates reuse the immutable connector credential and saved tunnel observation; credential rotation is a separate task. Review observation age and refresh after external tunnel changes.
Rollback uses a retained previous official repository digest and another verified replacement. An old image configuration ID is not an invented repository digest. If no suitable digest exists, the retained original container and independent host procedure are the recovery option.
Check local connector readiness makes an explicit Docker/private-readiness observation, including during an execution hold. It does not restart the connector, pull helper images, call Cloudflare or release the hold. Treat its timestamp separately from external application verification.
A Docker-engine recreation can replace the built-in bridge identity. This repair is specifically for a missing built-in primary bridge, not any changed network. First restore the retained usable fallback through independent host recovery and verify the failed managed connector is stopped. Choose Prepare stopped connector repair, perform a fresh review of the fallback's origins and private applied version, and preserve the exact image and credential. Keep matched builds/checkpoints. Unknown or deleted user-defined networks remain blocked; do not prune peers or rewrite ownership by hand.
Prepare and publish an exact hostname
- Deploy the intended app and verify its declared serving endpoint. Select the exact environment/profile, service, HTTP/HTTPS port, allowed zone and existing tunnel.
- Choose explicit application-owned authentication or an existing compatible Access application. Review existing Access coverage and protecting policies. Den does not create Access policies or remove protection as a fallback.
- Align the saved Public URL and declared public-origin/provider/consumer bindings. Synchronize/configure those fields and redeploy affected apps, including frontend builds or callbacks where needed, before publication.
- Preview. Check hostname, DNS ownership, rule/zone baseline, all managed replicas, configuration delivery, network effects and expiry. Plans expire after fifteen minutes and bind the owner, credential version and exact app/profile state.
- Resolve blockers, acknowledge the exact effects and apply once. Track the common operation through serving-network preparation, rule change, delivery/readback and DNS effects.
- Read the final receipt and perform separate external verification below. Do not interpret a saved mapping or configuration success as green application health.
New publication refuses occupied DNS and overlapping rules rather than taking ownership. Unknown/external/stale replicas block publication. Every active replica must have matching identity and private applied-configuration evidence; a tunnel status or initial metrics gauge is insufficient.
HTTPS origins require the reviewed trusted certificate server name. Do not disable certificate verification to force a route through. The initial editor limits standard public certificate assumptions to the apex or one subdomain level; deeper names are blocked pending a supported verified-custom-coverage path.
Generated ingress joins only the selected frontends to a dedicated owned network and stable aliases. It excludes databases, unselected services and manager-agent private networks. Unrelated rules, catch-all behavior and supported origin settings are preserved; unsupported shapes block mutation.
Keep adoption and DNS migration explicit
Adopting a supported existing exact route and matching tunnel CNAME preserves existing origin settings and records the DNS as externally owned. Later unpublish retains that external record. A metadata association alone is not publication adoption.
When the UI offers an eligible existing CNAME migration, review the exact zone, hostname, record ID and previous target. The intended serving route is prepared and verified before patching that record's target in place. MX/TXT records, TTL, proxy state and unrelated metadata must remain intact. The CNAME remains external.
If the record identity, baseline or target changes, stop and refresh the review. A lost response does not authorize a second write. Readback distinguishes the intended result from the prior or conflicting state. A retained route with uncertain DNS keeps a hold.
Migration repair is a separate eligible review after independent reconciliation and verified deny recovery. It is not ordinary republish, an automatic retry or permission to restore a whole-zone snapshot. Never delete mail records or overwrite external DNS to make a new-publish plan fit.
Verify TLS, protection and the backend
- Choose Check current rule, DNS and replicas. Obtain fresh matching scope, exact rule, DNS, protection and replica evidence. This diagnostic observation expires after five minutes, separately from the fifteen-minute publication plan. Cached page loads are not fresh cloud checks.
- Open external-verification details. Choose a read-only path and provide the SHA-256 of an application-specific expected response body, including exact newline bytes. A generic health response may not uniquely identify your app.
- Choose the credential mode and, if needed, enter the transient authorized credential in the same form before acknowledging and selecting Run reviewed external verification. There is one action, not a second credential submission after the challenge. The bounded check uses the exact hostname, trusted certificate verification, a pinned public address, no followed redirects and bounded responses.
- For Access protection, the service first verifies an unauthenticated redirect to the correct Cloudflare Access login path. A generic 401/403 or unrelated redirect is not accepted as proof.
- Only after that internal challenge check succeeds does the service send the supplied authorization for the intended backend check. Credentials are transient; keep them out of saved notes and support output. Public app endpoints can be checked without a credential.
- Read TLS, Access and expected-backend results separately, plus the post-probe drift check. Success is point-in-time evidence, not monitoring or proof of every application workflow.
No normal page view or successful API write substitutes for this external evidence. If configuration drifts, old external success must not be relied on.
Unpublish and handle partial effects
Explicit unpublish places an exact http_status:404 deny before wildcard fallthrough. Only after verified delivery may Den delete the exact matching Den-owned CNAME. External DNS is retained, and the deny also protects cached DNS. Stopping, archiving or forgetting an app does not unpublish it.
Read the operation and verify the denied route. If an intermediate effect is uncertain, use independent access to compare actual cloud/container state and complete the owner's System health → Execution review. Release records interruption; it does not resume a cloud write.
Review partial-effect recovery prepares a new exact plan to deny the hostname and remove only matching owned DNS after delivery. It requires the original operation and reconciled receipts. Changed rules, replacement record IDs and unknown ownership block recovery. Serving networks/bindings remain for separate review.
Restoring service needs a new publishing review. Do not replay a previous mutation, restore an older whole-tunnel snapshot or erase a journal hold. Cloudflare does not provide atomic exclusion against every other editor; coordinate external edits and investigate drift.
Preserve recovery and profile boundaries
Before a profile switch, unpublish, reconcile partial outcomes, stop the app and preview release of the exact retained binding. Den archives the binding while retaining networks, attachments and rollback state. Then perform the current profile routing review; hostnames remain denied until separately republished.
Export encrypted Cloudflare metadata is metadata only. Pair it with the matched manager database/key, protected agent configuration, complete execution journal/protection key/witness, connector credentials and host recovery instructions. It is not a full host backup.
Import disarmed metadata stores authenticated source evidence for review. It does not replace the installation identity, activate credentials, start connectors, claim DNS ownership or replay source operations. Recording a disarmed review leaves it disarmed. Full host restoration requires matching protected state and independent host access.
Use an isolated authorized test hostname for live acceptance before a consequential handover. Preserve unrelated domains, paths, mail records and a recovery path throughout.