Backoffice
My own web console for reaching and running a two-site home lab from any browser, behind one Cloudflare domain, with its own sign-in, 2FA and audit trail.
The problem
Everything I run at home is private: the hypervisor, the routers, the NVR, the monitoring server, the secrets vault, the containers, the files. My normal way in is a ZeroTier VPN, and on my own devices that works well.
It stops working on a machine where I can’t use a VPN client, such as a work PC. There I can’t install software or join my network, but I may still need to look at a failed job, restart a container or open a terminal.
I built Backoffice for that. It puts all my private resources behind one Cloudflare-protected domain, so a browser is the only thing I need. It also replaces a pile of separate admin pages, each with its own address and login, with one console.
How I get in
- The browser opens one public domain.
- Cloudflare Access checks who I am before anything reaches my network.
- A Cloudflare Tunnel carries the request home. The tunnel connects outwards, so the console needs no open port on my router.
- A reverse proxy hands it to Backoffice, which has its own sign-in with 2FA.
- Backoffice talks to the private resource from inside the network. Admin web apps are served as paths of the same domain, and the proxy asks the console for permission before it forwards anything to them.
What it can do
- See the lab: hosts with live status and usage, a topology map of both sites, Zabbix problems, Grafana and Cloudflare status, reports, and a page that collects whatever needs attention.
- Operate it: Proxmox guests, Docker containers and stacks, systemd services, MikroTik routers and Wi-Fi, RabbitMQ, Vault and PostgreSQL.
- Run the jobs: every scheduled script reports its result, so a backup that went silent shows up as stale instead of as nothing. Backup and restore are buttons.
- Work remotely: an SSH terminal, a file manager, VS Code, virtual machine consoles, remote desktop and a browser that lives inside my network, all in a tab.
- Do the daily things: a wiki, mail, Discord, office documents, printing and scanning, and an editor for the pages of this website.
These are screenshots of my own console. I blurred addresses and a few other private details.
Tools, one click away

Tiles marked Backoffice open through the console. The others are shortcuts to outside services.
| Need | Tool, opened in the browser |
|---|---|
| Shell and files | SSH terminal, file manager, VS Code (code-server) |
| Desktops and consoles | RustDesk, Virt Manager, WinBox, Proxmox consoles |
| Inside web pages | Firefox running in my network, shown in a tab |
| Admin interfaces | Proxmox, Zabbix, RabbitMQ, Vault, Portainer, the NVR |
| Utilities | IT Tools, printer and scanner, wiki, mail, Discord |
A tour

Both sites on one map, with live status on each box.

The host list, with a terminal, files and more on each card. The travel laptop was off at the time.

The file manager: a host’s filesystem over SFTP, with tabs, search and upload.

Proxmox: guests, health and resource use.

The network: which internet line is active, Wi-Fi clients per access point, and every router.

Containers across four Docker hosts.

One host at a glance.

State, resource use and quick actions. The containers the console depends on are marked as protected.

Vault: state, snapshots, certificates and the actions I use most.

RabbitMQ: queues, consumers and dead letters.

PostgreSQL: tables, SQL, diagrams, backup and restore.

The wiki that holds my operations documentation.

Monitoring: availability and current problems from Zabbix.

Discord inside the console: alerts land in their channels, and I can answer from the same page.
The code
It is a Python application: FastAPI with server-rendered Jinja2 pages and plain JavaScript, no frontend framework. Terminals and remote desktops use xterm.js and noVNC over WebSockets. Data lives in PostgreSQL. It is about 40,000 lines of Python, roughly one module per feature. The repository is private, so this is the short map:
| Area | Modules | What they do |
|---|---|---|
| Identity | accounts, stepup, perms |
Accounts, sessions, 2FA and what each role may open |
| Reaching hosts | sshrun, terminal, files |
One SSH channel for scripts, the terminal and files |
| Run history | consumer, runs |
Reads script results from RabbitMQ into PostgreSQL |
| Live status | integrations |
Overlays Proxmox and Zabbix data on the host list |
| Configuration | config, labsettings |
Resolves secrets and settings at runtime |
- Run health: results are deduplicated, failures are tracked as streaks, and the next expected run comes from the script’s cron entry. The UI tells apart “the consumer is down” from “the script is silent”.
- Failing in pieces: each outside system fails on its own and reports its error as data, so one dead API never blanks a page.
- Lab data is data: everything that names my lab is imported from data files into the database, and a test renders the main pages without them to prove the code holds no lab-specific values.
Security
One door to everything is convenient, and it is also the thing most worth attacking. So there are several layers:
- Two gates: Cloudflare Access first, then the console’s own accounts. The console trusts no identity header from a proxy.
- Passwords and 2FA: passwords are hashed with scrypt, TOTP is mandatory for administrators and its secret is stored encrypted, and repeated failures lock the account for a while.
- Sessions: a random token in an HttpOnly cookie, of which the server keeps only a hash.
- Step-up: the riskiest actions, such as opening a terminal or a remote desktop, writing to Vault, changing the database or users, or restoring a backup, ask for a fresh 2FA code.
- Request forgery: changes are accepted only from the console’s own pages, and each terminal or desktop opens with a short-lived, single-use ticket.
- Least privilege: operators get only what is switched on for them, and a new route stays admin-only until I decide otherwise.
- Hosts: SSH host keys are pinned, and an unknown key is refused. The backup and restore buttons run only allowlisted scripts.
- Secrets: the app starts from three bootstrap values and reads the rest from Cloudflare Workers KV at runtime, so no secret lives in the repository or the image.
- Container: the console runs as a non-root user, on a read-only filesystem, with all Linux capabilities dropped.
- Audit trail: changes are recorded with who made them, when, from where and whether they worked.
Delivery
Tests run against a real PostgreSQL in the pipeline before anything is built. The pipeline assigns version numbers at deploy time and tags each shipped image, so a rollback is a retag.
How sign-in changed
Sign-in first came from an external identity provider in front of every admin page. I replaced it with native accounts and 2FA, so the console itself decides who may do what.
What I would change
The console runs on one of the hosts it monitors, so if that host fails, I lose the view just when I need it. I would add a small independent check, outside that host, that tells me when the console is unreachable.