Access
door_openTwo doors, one machine
The platform note ends at Tailscale: *.orion.lab works from a phone on cellular once the mesh and the private CA are in place. That door is still how we reach Grafana, Portainer, and ClickHouse. It is the wrong door for a notes app.
Joplin on a phone wants a normal HTTPS URL. It will not install our private CA, and it cannot complete a Cloudflare Access login. So notes get their own public name, joplin.astrionlabs.com, on a Cloudflare Tunnel that only this service uses. The connector dials out. Nothing on the router is forwarded.
Core concept · private by default, public by exception
Dashboards and databases stay on the private namespace. A service is public only when a device that cannot join the mesh still has to reach it. Notes are that case. Signup on the public site is off, and there is no mailer.
The service
edit_noteJoplin, three processes
Three pods in their own namespace, plus a database on the Postgres we already had.
| Process | Image | Job |
|---|---|---|
| cloudflared | cloudflare/cloudflared | Holds the tunnel. The public hostname is set in Cloudflare, not in git. |
| joplin-web | joplin-web:3.7.21 | nginx. /app is the editor. Everything else is proxied. |
| joplin-server | joplin/server:3.7.2 | Sync API on port 22300. One process, 1 GiB, enough for a household. |
The web image is not on a registry. It is built from Joplin's v3.7.21 tag on another machine, for the laptop's linux/amd64 CPU, then imported into k3s. The deployment's pull policy is Never: if the image isn't already on the node, the pod stays down. orion does not compile it.
Apps sync against Joplin Server at that same public URL. End-to-end encryption is turned on in the client after the first sync. It is not a server setting. The editor at /app is the same login, and it is not the admin page.
Naming
linkOne hostname, on purpose
Every other HTTP service on orion is <name>.orion.lab, because the wildcard DNS and the wildcard certificate already cover it. Joplin refuses that pattern. The server accepts only the host in APP_BASE_URL. A request with any other Host is a 404, "Invalid origin". There is no joplin.orion.lab ingress.
The editor has the same constraint: it has to be served from that host. Putting it on a second origin is rejected. So nginx on the tunnel's target does both jobs. /app/ is a static site with a fallback to its own index.html. Every other path is proxied to the server, and the original Host is forwarded unchanged.
Gotcha · the probe needs the public host
A readiness check against the pod IP fails the origin check even when the process is healthy. The probe sends Host: joplin.astrionlabs.com. Running is not the same as answering the name the app expects.
Storage
databaseNo second database server
Joplin stores notes in Postgres. orion already runs one CloudNativePG cluster, a single instance, volume on the 1 TB disk. Joplin gets a database and a role on that cluster. Deleting the Joplin manifests does not drop the data: the database and the role both use a retain reclaim policy.
A second Postgres would have been a second volume, a second backup story, and more RAM on a 12 GB laptop. The operator already knew how to add a database.
The house
dnsWhat else is running
Same machine as the platform note: a 2017 IdeaPad, Ubuntu, k3s. Private names resolve only on the LAN and over Tailscale. Joplin is the public row.
| Service | Name | What it does |
|---|---|---|
| Joplin | joplin.astrionlabs.com | Notes sync, and the web editor at /app. The one public service. |
| Grafana | grafana.orion.lab | Dashboards. VictoriaMetrics for metrics, ClickHouse for telemetry. |
| Portainer | portainer.orion.lab | The cluster UI. |
| CH-UI | chui.orion.lab | A browser for ClickHouse. |
| ClickHouse | clickhouse.orion.lab | Columnar store for logs and telemetry. Data on the 1 TB disk. |
| Postgres | in-cluster | CloudNativePG, one instance. Joplin's database lives here. |
| NATS | in-cluster | JetStream. The queue in front of ClickHouse. |
| VictoriaMetrics | in-cluster | PromQL metrics, 30-day retention. Scrapes the node, kube-state, Traefik, ClickHouse, Postgres, NATS, and cAdvisor. |
VictoriaMetrics replaced a full Prometheus install. It scrapes node-exporter and kube-state-metrics, plus Traefik, ClickHouse, Postgres, NATS, and the kubelet's cAdvisor endpoint, and keeps 30 days on the big disk. Grafana is the only dashboard in front of that, at grafana.orion.lab, with ClickHouse as a second datasource for the telemetry SQL.
Where the platform note left off
k3s, CoreDNS, the private CA, Traefik, ClickHouse, NATS, and Tailscale are the floor. Joplin, Grafana, Portainer, CH-UI, CloudNativePG, and VictoriaMetrics are what that floor is holding up.
Reference
menu_bookNames from this note
- Joplin Server
- The sync API. Apps talk to it; it is not the editor.
- APP_BASE_URL
- The only hostname Joplin Server will accept. A second name is a 404.
- Cloudflare Tunnel
- An outbound connector. The laptop is not port-forwarded.
- CloudNativePG
- The Postgres operator. One cluster, many databases.
- VictoriaMetrics
- A single-binary Prometheus replacement. Grafana's metrics datasource.