I could not make sense of this work without research. After three years at CERN, back in Bilbao I decided to work on my own and keep researching and learning. I believe entrepreneurship is the ultimate professional challenge — and, at the same time, an expression of creativity and a claim to freedom.
Zetesis comes from the Greek ζήτησις, inquiry: find the cause before proposing the solution.
Personal finance on your own server: Sure, Enable Banking, Wealthfolio and MCP
LabInfrastructureFinanceSureMCPSelf-hosting
I keep the household accounts in two open-source applications that run on a server of mine: Sure, for bank accounts, transactions and the budget, and Wealthfolio, for investments. The data stays at home, on my own disks. This post explains how it is set up: where the transactions come from, who can sign in, how I query the accounts from an AI assistant and what warns me if a transaction is lost on import.
I do not give banks, amounts, names or domains. The screens in the video are drawn and carry no figures.
Sure brings the accounts together on a server at home
Sure is an open-source personal finance manager: the community-maintained fork of Maybe Finance, a project its authors abandoned. It puts current accounts, cards and savings in one place, with their transactions, categories, rules and budgets, and it works out net worth.
It runs in the production cluster in the main house from the official image, unpatched and with its version pinned. The web app and the background worker share a pod, and the database lives in the PostgreSQL the cluster's other applications use. Argo CD deploys it from the infrastructure repository, like everything I described in How to manage multiple servers with GitOps: Kubernetes and Docker from one repository.
Every night, Enable Banking brings in the transactions
Transactions arrive on their own thanks to PSD2, the European directive that requires banks to give third parties access to accounts when the account holder consents. Connecting to each bank separately makes no sense for one person, so I use Enable Banking, an open banking aggregator that talks to European banks and offers a single API. Sure has it built in: I give consent on my bank's website and Sure keeps the session.
Once a day, in the early hours, Sure syncs every account: it asks Enable Banking for anything new and imports it. If I sign in and it has not synced yet that day, it also syncs when I sign in.
The family signs in with their home account, over OIDC
To sign in, the family uses the same account as in the other home applications. Sure and Wealthfolio delegate sign-in over OIDC, the standard an application uses to trust an identity provider to tell it who each person is; I explained the mechanism in Centralized identity management with Keycloak. Here the provider is the internal space of my Keycloak, where the people at home and the people who work with me have their accounts.
Sure also only links that account to a user that already exists in Sure with the same verified email. If someone signs in with a home account Sure does not know, Sure does not create a user for them.
Only people with permission for that application get in
Each application requires its own access role, and Keycloak checks it at sign-in, before sending the person back to the application: without the Sure role there is no way into Sure, even with the right password. The family has the Sure role and the Wealthfolio role, and not, for example, the Argo CD one.
Wealthfolio handles investments and passes their value to Sure
Investments live in Wealthfolio, another open-source application, built to track a portfolio: holdings, trades and their value according to market prices, which it refreshes every six hours. It keeps everything in SQLite, a database that fits in a single file, and it also runs in the cluster from its official image.
To see the whole net worth in Sure, a scheduled Kubernetes job reads the value of each investment account in Wealthfolio every day at 07:15 and stores it in Sure as a dated valuation, through Sure's API. Buys and sells stay in Wealthfolio; Sure gets the total and sees how it changes over time.
The job is a Python script that only uses the standard library, on the official Python image, with no server or disk of its own, and the network rules only let it talk to the two applications. If a read fails or the currency is not the expected one, the job fails and logs it: it never turns an error into a zero balance. Running it twice on the same day does not duplicate the valuation.
Both have a backup every night in the other house
Sure and Wealthfolio are backed up every night to the other house, with restic and K8up, like the rest of the cluster's applications; the whole setup is in Backing up my servers. For Sure, its files are copied, and its database goes with the backups of the shared PostgreSQL.
Wealthfolio needs one more step, because copying a SQLite file while it is being written can leave a half-written copy. Before each backup, a pod takes a snapshot with SQLite's backup API and checks its integrity, and only then does restic upload it.
I query my accounts from an assistant, over MCP
MCP is the protocol an AI assistant uses to call another application's tools. Sure ships its own MCP server: tools to read accounts, transactions, budgets or holdings, and others to create and edit transactions, categories or rules. With it I can ask an assistant how much I have spent this month in a category without exporting anything.
Between the assistant and Sure there is an MCP gateway, agentgateway, which can only be reached from the home network or over Tailscale and which checks who I am with a token from the same Keycloak. Sure gives full access to whoever connects, so the gateway does the separating: it splits Sure's tools into two groups, 24 that read and 24 that change data, and each group requires a different Keycloak group. Permission to read does not grant permission to write.
If the importer drops a transaction, I get an alert
When importing, Sure drops transactions that arrive with the same content as another one in the same download, so as not to duplicate them. The trouble starts when two legitimate transactions match on everything: in my tests, Sure dropped real transactions that only differed in the bank's reference. The case is described in an issue in Sure's repository, and I would rather not maintain a patch of my own.
So I watch the message the importer writes to its logs every time it drops something. Loki, which stores the clusters' logs, looks for it every five minutes and, if it shows up, Alertmanager sends me a Telegram alert with the affected sync. The alert counts drop events, not missing transactions, because a genuine duplicate leaves the same message: with it on my phone, I compare the bank statement with what is in Sure before touching anything. Another rule alerts me if Sure's logs stop arriving, so silence is never mistaken for everything being fine.
My finances are deployed from git too
Sure, Wealthfolio, the job that passes the portfolio's value, the backups and the alert rules are files in the infrastructure repository, and the secrets come from Infisical. Upgrading Sure means changing the pinned version and merging. Before the last upgrade I backed up the database and the files, because going back to the previous image does not undo the changes the new one makes to the database.