Table of contents
Services
Status 2026-12-01: step 0 done (decision 111); the split, steps 1 to 4, waits for lip's go. Decision 110.
Since RC2 (decision 140) Tasks, Projects, AI and the mail jobs are no longer in
sftpgo-hooks: what is left is Drive (sign-in hooks, shared folders, port 8004), Photos
(keys, group albums) and key provisioning, in 8 modules, 3 ports and 2 background loops. It
holds the SFTPGo admin, Drive's data read-only, the Immich admin key and a read-only
directory user: no LLDAP admin and no mailbox. The sections below describe the service
before that; steps 2 and 3 have nothing left to move, and the plan needs deciding again.
Before RC2
sftpgo-hooks began as SFTPGo's sign-in hook. It now holds about 2,900 lines in 20 modules,
4 listening ports and 7 background loops: Drive, Tasks, Photos, Projects, AI drafts, mail
sorting and linking, contact categories and key provisioning. No decision put them together:
each feature went where the directory lookup and key provisioning already were.
| One process holds | Reach |
|---|---|
LLDAP admin (konbi-projects) |
the whole directory |
| Mail sorting account | every mailbox |
| SFTPGo admin, Drive data read-only | every file |
| Each person's Vikunja password | every task list |
| Immich admin key (users only) | Photos accounts |
It has no route reachable from outside.
- Modules import each other in circles; the router for everything is called
caldav_tokens.py. - Changing any feature restarts Drive sign-in.
Rule
- One service per app it administers, named after it, like
chat-service. - A service holds only the admin access of its own app.
- A service needing another app asks that app's service through a small documented API.
- A plugin key opens only that plugin's routes.
- Each service has its own provisioning secret.
- Shared code (directory lookup, provisioning, HTTP, state files) is one library, which imports no service.
Target
| Service | Does | Holds | Called by |
|---|---|---|---|
drive-service |
SFTPGo sign-in hooks, group folders, shared and project folders | SFTPGo admin, Drive data read-only | SFTPGo, Bulwark, projects |
tasks-service |
Vikunja accounts and keys, phone passwords, Tasks emails, drafts from emails | Vikunja passwords, tasks@ |
Vikunja, Bulwark, projects |
photos-service |
Immich keys, group albums | Immich admin key | Bulwark, projects |
projects-service |
projects, their page and summary | LLDAP admin | Bulwark |
mail-worker |
sorting, linking, contact categories, their switches | mail sorting account | Bulwark (switches only) |
All five read the directory with a read-only user. Not chosen: one service per feature (many more containers on a 12 GB server, the same secrets copied around), or only tidying the code (readable, but one process still holds everything).
Cost: four more small Python containers (roughly 150 to 200 MB of memory, estimated), calls
between services that can fail, and a konbi-bulwark change for a secret per service.
Order
Each step ships alone, with its browser checks passing.
| Step | Change |
|---|---|
| 0, done | Without splitting: each plugin key opens only its routes (rule 4), the /konbi-connect routes and their servers removed, leftover state removed, health check and 512 MB limit |
| 1 | Shared library, one module per area, no import circles; still one container |
| 2 | mail-worker out, with its own provisioning secret (konbi-bulwark change) |
| 3 | projects-service out; it asks Drive, Tasks and Photos instead of holding their access |
| 4 | tasks-service and photos-service out; what is left is renamed drive-service |