🗂️
optional/skhub ¡ v1

skhub

Files. Chat. Video. Docs. All under your own roof.

skhub is SKWorld's self-hosted collaboration hub: a hardened, pinned Nextcloud deployment for a sovereign fleet. No third-party collaboration SaaS, no surprise cloud dependency, every setting checked into version control.

What skhub is

skhub is the deployment role (optional/skhub) inside SKStacks, SKWorld's Ansible + Docker Swarm sovereign infrastructure framework. It stands up a self-hosted Nextcloud instance, pinned by SHA-256 digest end to end, so the fleet gets its own files, chat, video calls, and office documents without handing any of it to a collaboration SaaS vendor.

Nextcloud core

Pinned nextcloud:31.0.14, backed by MariaDB 10.11.19 and Redis 8.10.2-alpine.

Security + delivery

ClamAV antivirus on uploads, a dedicated cron service, and notify_push for live, no-poll notifications.

Whiteboard + previews

Collaborative whiteboard (backend v2.0.0) and imaginary for fast image preview generation.

Collabora Online

Optional real-time collaborative document editing, Word/Excel/PowerPoint-compatible, right in the browser (26.04.5.1.1).

Talk HPB

Optional Nextcloud Talk High Performance Backend (aio-talk): Janus WebRTC signaling plus an eturnal STUN/TURN relay, for group chat and video calls.

Storage, your choice

Shared NFS by default, or point it at an external S3-compatible store, or at the fleet's own in-cluster Garage service (skstor) as a one-line shortcut.

Every image is pinned by digest, never a bare tag, and every setting comes from a per-environment vault file, never hardcoded into the playbook.

§Why this is the right way to run it

skhub is not "Nextcloud with defaults." It is Nextcloud run the way a sovereign fleet actually needs it run, with the rough edges found and fixed under real load, not assumed away.

  1. Sovereign by default, not by promise. File data, chat, video signaling, and documents all run on infrastructure the operator controls. There is no collaboration SaaS vendor in the data path, and the storage backend decision (NFS, external S3, or the fleet's own skstor) is made once, deliberately, up front, because Nextcloud only reads its S3 configuration on first install.
  2. SSO that doesn't break the clients. Nextcloud is as much an API (WebDAV, CalDAV, OCS, notify_push, Talk signaling) as it is a web app, so skhub deliberately skips a reverse-proxy SSO middleware that would break every one of those clients. Sign-in goes through Nextcloud's own user_oidc app against the fleet's Authentik instance (sksso), with automatic group mapping, a documented deprovisioning path, and a break-glass local login for recovery. Automation keeps local app passwords, never an SSO identity.
  3. Measured fixes, not guesses. The stock ClamAV config's database-reload memory spike was measured at +94% RSS; the tuned config removes that spike entirely while keeping the same signature database resident. NFS latency was measured causing real slowdowns (an admin integrity check took over five minutes over NFS in one case, and database-adjacent NFS latency measured as high as roughly 124ms round-trip in another), which is why skhub offers an option to pin the code tree and database/Redis data onto local disk on a specific node instead.
  4. Deploys fail loudly, not silently. A "mount drift" check refuses a deploy that would silently drop a live, still-in-use external storage mount. A config mistake shows up before it touches the running stack, not after someone notices a storage connection is gone.
  5. Real federation, not a marketing checkbox. Two separate skhub instances, each with its own Talk HPB, can federate chat, reactions, and calls over the OCM protocol between separate operator estates. File sharing federates separately through normal Nextcloud federated shares. This is tested end to end, not assumed to work.
  6. Nothing ships on claims alone. New skhub capability is release-gated by a dedicated lab stage in the project's own test harness (skstack06), which exercises the feature end to end against a real, disposable Nextcloud + Talk + Collabora stack: a real TURN allocation through the TLS-over-443 path, a real SMTP delivery through a lab mail server, a real bind-mount drop-and-refuse. This lab has already caught real bugs, including a healthcheck timing issue that made Nextcloud's first install crash-loop on a busy host.

Chat and video that work off the LAN

With the optional Talk HPB enabled, Nextcloud Talk gets its own TURN/STUN relay (eturnal), so calls work from outside the local network, not just inside it. A TLS-over-443 fallback keeps calls working on networks that block the raw TURN port, and port sizing follows a simple rule of thumb: roughly 2 x N² relay ports for an N-person call outside the LAN.

CapabilityDetail
Relayeturnal STUN/TURN, for calls reaching beyond the local network
FallbackTLS over 443, for networks that block the raw TURN port
FederationChat, reactions, and calls federate over OCM between two skhub instances, each using its own HPB
File sharingDoes not federate through Talk; handled through standard Nextcloud federated shares instead

§How it fits the workflow

skhub is the fleet's "files, chat, video, docs" layer. It is built to sit next to the fleet's own workflow engine (skflow, built on Windmill), the fleet's own SSO (sksso, Authentik), and the fleet's own local-inference gateway (skgateway), rather than standing alone.

file lands in skhub (Nextcloud) -> webhook_listeners fires an event -> dedicated webhook worker delivers it (~4s, vs. up to 5 min on cron alone) -> skflow (Windmill) picks it up and runs the workflow -> result/document written back into skhub sign-in: user -> skhub login -> user_oidc -> sksso (Authentik) <- group/account mapped automatically <- AI features: Nextcloud Assistant -> skgateway (OpenAI-compatible) -> operator's own self-hosted model (never a hardcoded cloud model id, never OpenAI's cloud)

Fast webhooks

A dedicated background-job worker handles webhook delivery for Nextcloud's webhook_listeners app. Without it, a webhook waits for the next 5-minute cron cycle; with it, delivery has been measured at about 4 seconds on a live instance.

skflow integration

That fast delivery is what makes skhub useful as a trigger for the fleet's workflow engine: a file landing in Nextcloud can kick off a workflow almost immediately instead of minutes later.

skgateway for AI

Nextcloud's built-in Assistant (chat, summarize, rewrite, translate, speech-to-text) runs against the operator's own self-hosted models through skgateway's model aliases. Image generation and cloud TTS are left disabled rather than silently falling back to a cloud default.

Shared ground truth

The fleet's AI agents, including the assistant agent (Lumina) and the operations agent (Atlas), can use skhub as a shared storage and collaboration surface the same way a human team would, since every client (web, desktop sync, mobile, WebDAV, CalDAV) talks to the same real Nextcloud underneath.

Backups and release process

A nightly db-backup sidecar dumps the database on a fixed wall-clock schedule (for example 03:00 in a chosen timezone, DST-correct), rather than just "every N hours from whenever it started," so backups land at a predictable time every night.

skhub deploys through a standard Ansible playbook (deploy_skhub-<env>.yml) run per environment, dev, staging, prod, with every setting coming from a per-environment vault file. New capability is release-gated by the skstack06 lab harness before it is considered released, an evidenced practice with real bugs caught, not an aspirational claim.

Part of the ecosystem

skhub holds the files. skwrit is the matter engine that turns taught processes into verified, published paperwork, and publishes its finished documents straight into skhub. Both are part of SKWorld, the sovereign AI ecosystem where you own the whole stack, from silicon to soul.