Access your personal Codumentor over HTTPS
Use your laptop's Community instance from another computer or phone without
opening an inbound router port. Codumentor stays on 127.0.0.1:2638; an external
tool provides the HTTPS connection. You do not need an SSH server or a
Codumentor tunnel plugin.
This guide describes manual setup, not a built-in remote-access feature.
Provider instructions were checked on 2026-10-18; the recipes have not been
end-to-end certified against those providers. Complete the validation
checklist for your installation.
Choose an access method
| Method | Who can reach the HTTPS endpoint? | What you need | Recommendation |
|---|---|---|---|
| Tailscale Serve | Authorized devices/users in your private Tailscale network | Tailscale on the laptop and accessing devices; account and access rules | Start here for your own computers and phone |
| Managed Cloudflare Tunnel + Access | Internet-facing hostname, with visitors restricted by an Access policy | Cloudflare account, domain on Cloudflare, cloudflared on the laptop; visitors need a browser | Use when installing a client on the accessing device is impractical |
| Tailscale Funnel | Anyone on the internet can reach the endpoint; Codumentor login must protect it | Tailscale on the laptop and Funnel permission | Public alternative; not a substitute for private Serve |
| ngrok | Public endpoint unless you add access policies | ngrok account, agent and token | Alternative with plan limits and a free-tier browser warning |
Do not use Cloudflare Quick Tunnels (trycloudflare.com). Cloudflare
explicitly documents that they do not support Server-Sent Events (SSE).
Codumentor's live UI uses text/event-stream, so a page loading successfully
is not enough: live updates need a working stream. Use a managed tunnel instead.
The free Tailscale Personal plan is for non-commercial use. Using Codumentor
Community for work does not make the network service eligible for that plan.
Check provider terms and current pricing before choosing a service.
Before exposing anything
- Start Codumentor and sign in locally at http://127.0.0.1:2638/app. For Community,
codumentorstarts the web server;codumentor apiis explicit. - Keep Codumentor bound to
127.0.0.1, not0.0.0.0. No inbound router port or public Codumentor listener is needed for these recipes. - Keep Codumentor authentication enabled, even behind private networking or Cloudflare Access. The Community default is the local
adminaccount. The first-start password is printed and saved in$CODUMENTOR_HOME/admin_password. See Community login and Authentication. - Review effective UI/API authentication overrides: neither surface should use
noneortest. Do not setallow_unauthenticated_network_access: trueas a tunnel setup step. Retain the persistent signing key generated by a user-home install; an explicit project deployment must configure its own stable key. - Retain tool approvals and protect the laptop account. Remote access reaches your conversations, repositories, connected accounts, and agent tools; a secret URL is not authentication.
Loopback is not an exposure detector. Codumentor refuses an anonymous
network bind, but that guard allows loopback. A tunnel can make an anonymous
loopback service remotely reachable without triggering the guard. The operator
must verify authentication before starting the tunnel.
The examples assume the forwarding tool runs on the same laptop as
Codumentor. If you run it in a container, 127.0.0.1 refers to that container,
not the laptop; do not solve that by casually exposing an unauthenticated host
port.
Recommended: private HTTPS with Tailscale Serve
Set up and open the connection
- Install a current Tailscale client on the laptop and on the computer or phone you will access it from. Sign the devices into your private Tailscale network (called a tailnet). Ensure its access rules permit only the intended users/devices to reach this service.
- On the laptop, inspect existing forwarding configuration first:
``bash``
tailscale serve status
tailscale funnel status
Do not replace an existing mapping on HTTPS port 443. Serve and Funnel cannot
share that listening port: switching it to Funnel makes it public. If it is
already occupied, use a separate configured listener according to the
Serve reference
rather than resetting unrelated services.
- With Codumentor running, start a foreground, private HTTPS proxy:
``bash``
tailscale serve --https=443 http://127.0.0.1:2638
Follow any browser consent prompts to enable HTTPS certificates. The command
prints an HTTPS address such as https://laptop.example.ts.net. These commands
use the syntax introduced in Tailscale 1.52; use a current client.
- On the other device, connect Tailscale, open the printed URL with
/appappended, and sign in with your Codumentor credentials. Keep both Codumentor and the foreground Serve command running on the laptop. - Configure Codumentor's HTTPS address as described in HTTPS configuration, then run the validation checklist.
Serve is private to permitted network users; it is not an invitation for anyone
who knows the URL. Do not rely on forwarded Tailscale identity headers as a
Codumentor login mechanism in this recipe.
Close the connection
Press Ctrl+C in the Serve terminal. To explicitly disable the default HTTPS
listener you created:
tailscale serve --https=443 off
tailscale serve status
Do not use tailscale serve reset: it can remove unrelated configuration.
If you later choose --bg for persistent operation, record that change: the
mapping can resume after a Tailscale restart or reboot, but it does not start
Codumentor for you. Use the targeted off command to revoke it.
Privacy and availability
TLS terminates in the laptop's Tailscale daemon, which forwards local HTTP to
Codumentor. Public HTTPS certificates expose the certified hostname in public
Certificate Transparency logs, even though Serve access remains private. Choose
a device name without confidential information.
The laptop must remain awake, online, and running Codumentor. A tunnel cannot
keep a sleeping laptop available. After sleep, network changes, or restart,
check the connection and let the browser reconnect; see the validation checklist.
Browser-only access: managed Cloudflare Tunnel + Access
Use this when the remote device should need only a browser. This is a
managed, published application, not a Quick Tunnel.
Protect first, then publish
- Create a Cloudflare account and activate a domain on Cloudflare. Choose a hostname, for example
codumentor.example.com. - Before publishing the route, create a self-hosted Cloudflare Access application for that hostname. Add a narrowly scoped Allow policy for your own identity and configure the required identity provider. Do not add a Bypass or allow-everyone policy. Follow the Access application guide.
- Create a managed Cloudflare Tunnel in the dashboard. Install
cloudflaredon the laptop using the dashboard's instructions for your operating system, and connect it to that tunnel. Treat its connector token and installation command as secrets: do not paste them into conversations or commit them. - Add a published application route for the same hostname, with local service URL
http://127.0.0.1:2638. Enable Protect with Access token validation as described in Cloudflare's setup guide; do not assume that Codumentor validates Cloudflare Access tokens itself. Keep Codumentor's own login enabled as a second layer. - Set Codumentor's external URL to
https://codumentor.example.com, restart Codumentor, and openhttps://codumentor.example.com/appfrom another network. Expect Access authentication first, then Codumentor login. - Test in a signed-out/private browser and with an unauthorized identity. Neither should reach your Codumentor data. Complete the validation checklist below.
See the managed tunnel setup
for current dashboard labels and operating-system commands. No inbound router
port is needed. Restrictive firewalls must allow Cloudflare's documented outbound
tunnel connectivity on port 7844; see its
firewall requirements.
Streaming: Cloudflare documents Content-Type: text/event-stream as the
signal needed to avoid buffering streaming tunnel responses. Codumentor's live
feed sends that content type. Nevertheless, verify incremental updates through
your actual Access/tunnel configuration; do not treat this as provider-certified
compatibility or replace the managed tunnel with a Quick Tunnel.
Privacy and shutdown
Browser HTTPS terminates at Cloudflare's edge, not only on your laptop.
The tunnel connection is separately encrypted. Cloudflare is an intermediary
for the application traffic; evaluate that against your source-code and
conversation confidentiality requirements. Choosing http://127.0.0.1:2638
means only the final local hop uses HTTP.
To stop access temporarily, stop the cloudflared connector process or its
installed service on the laptop. The dashboard installation may configure an
OS service that restarts automatically: closing a terminal does not stop such a
service. For lasting revocation, remove the published application route and its
unused DNS record, and uninstall/disable the connector service if no longer
needed. Do not remove Access protection while leaving the route published.
Revoke/rotate a connector token if it was disclosed. Verify the old URL can no
longer reach Codumentor.
Tell Codumentor its HTTPS address
Merge this into your existing trusted instance settings. For Community's
usual user-home install, edit $CODUMENTOR_HOME/config.yaml (normally
~/.codumentor/config.yaml, or C:\Users\<you>\.codumentor\config.yaml). Do not
put instance authentication or proxy settings in a discovered repository overlay,
and do not replace the rest of your model, authentication, or plugin settings.
api:
host: "127.0.0.1"
port: 2638
external_url: "https://laptop.example.ts.net" # replace with your actual URL
trust_forwarded: false
For Cloudflare, replace the example URL with https://codumentor.example.com.
Use the origin URL without /app. Restart Codumentor after editing.
external_url gives Codumentor a stable HTTPS address for absolute links and
OAuth callback construction and signals that session cookies should be Secure
unless you explicitly override auth.cookie_secure. Remove a legacy
cookie_secure: false override; do not disable secure cookies to fix proxy login
problems. Prefer the HTTPS URL for normal use after this change.
These root-hostname recipes do not require blindly trusting forwarded headers:
keep trust_forwarded: false. If your deployment needs forwarded client IPs or
other proxy-derived metadata, enable it only after verifying that your proxy
overwrites the relevant headers and untrusted clients cannot bypass that
boundary. With it off, client-IP logs and rate limiting may see the proxy rather
than individual visitors. See Security and
Configuration.
The UI and its API share one origin, so do not add wildcard cross-origin
permissions. Connected-account providers may require registering the new HTTPS
callback URL separately; publishing Codumentor does not update those external
registrations. If retiring remote access, restore your intended local URL
settings and restart.
Other HTTPS options
- Tailscale Funnel: after checking existing listener configuration, use
tailscale funnel --https=443 http://127.0.0.1:2638instead of Serve. This publishes a public endpoint; tailnet visitor restrictions do not apply. Keep Codumentor authentication enabled and configure its external URL. Stop the foreground process with Ctrl+C, or disable your listener withtailscale funnel --https=443 off. Funnel is documented as beta, uses tailnet*.ts.nethostnames, restricts public ports to 443/8443/10000, and has non-configurable bandwidth limits. It is not the recommended private default. - ngrok: after account setup and configuring the agent token locally,
ngrok http 2638publishes an HTTPS URL. Keep Codumentor login enabled; consider an additional identity-restricted ngrok access policy. Set the external URL and validate streaming. Stop the foreground agent to close the connection. Free-tier browser warnings are not authentication; quotas and identity-policy limits also apply. See the current free-plan limits.
SSH terminal access and raw SSH port-forwarding recipes are outside this
HTTPS-focused guide. An SSH forward alone does not supply a public HTTPS
hostname or browser certificate.
Validate before relying on remote access
Run these checks on your actual laptop and remote device. These are **operator
acceptance checks**, not claims that the providers have been tested in this
repository.
- [ ] HTTPS and access boundary: the remote
/appopens without a certificate warning. Serve is unreachable from a device outside the permitted network; Cloudflare Access rejects a visitor who is not allowed by its policy. - [ ] Codumentor authentication: a fresh browser session requires Codumentor login after any network/Access authentication. A wrong password fails. No unintended UI/API provider is anonymous or test-only.
- [ ] Cookies and sessions: browser developer tools show Secure and HttpOnly session cookies. Refreshing the page preserves the login; logging out and refreshing does not restore access to private data.
- [ ] Live streaming: send a request that produces a long response. Text and tool events arrive incrementally, and the conversation list updates without reloading. A page that loads but only updates at completion is a failed check.
- [ ] Approvals: request a harmless action that requires approval under your current policy. It waits for your decision remotely; rejection prevents it. Do not weaken approval policy to make this check pass.
- [ ] Files: upload a non-sensitive test attachment and download a generated test file through the HTTPS UI. Confirm contents and permissions; do not use real secrets as test data. Browser local-folder support depends on the remote browser and refers to that device's files, not the laptop's files.
- [ ] Reconnect: interrupt connectivity and restore it; then test laptop sleep/wake or a network change. Verify the connector recovers (restart it if needed), the browser reconnects, and you do not submit a duplicate action.
- [ ] Restart and shutdown: restart Codumentor and confirm expected session behavior. Stop/disable the forwarding endpoint, then verify that its old URL cannot reach Codumentor. Check for an automatically restarting connector service or persistent background mapping.
Troubleshooting
| Symptom | Check |
|---|---|
| Connection refused / gateway error | Laptop awake, Codumentor running on the configured port, connector running on the same host |
| Serve URL unreachable | Remote Tailscale connection, tailnet access rules, HTTPS consent, existing Serve/Funnel listener configuration |
| Login loops | Correct external_url, no insecure-cookie override, HTTPS URL used consistently, browser cookie settings |
| UI loads but live updates stall | No Quick Tunnel, streaming content type preserved, no proxy buffering/caching of the event feed |
| Connected-account sign-in fails | Callback URL registered with the provider and matching the configured external URL |
| URL still works after closing a terminal | Background mapping or OS connector service still running; use targeted disable/removal and retest |
Provider references
- Tailscale Serve and CLI reference
- Tailscale HTTPS certificates and hostname disclosure
- Tailscale Funnel and pricing / Personal-plan eligibility
- Cloudflare Access application and managed tunnel setup
- Cloudflare streaming troubleshooting and Quick Tunnel limitations
- ngrok agent quickstart and SSE streaming behavior