Open-Source Office Environment — Reference Architecture

A coherent, end-to-end open-source stack for a small-to-mid-size office. “Coherent” means one identity domain, one OS family, one virtualization platform, one storage/collaboration hub, and single sign-on woven through every service — the open-source analogue of a Windows-Server + Active-Directory + Microsoft-365 estate.

Every component below is free/open-source software (OSI-approved license) and self-hostable on hardware the office owns and controls.

License note — AGPL is treated as open-source here. “Community Edition” products are only included where their core is genuinely FOSS (not feature-gated freemium).


1. Design Principles

  1. One OS family. Debian (stable) everywhere — clients, servers, appliances. One package model, one update cadence, one set of sysadmin skills.
  2. One identity. FreeIPA is the directory of truth (LDAP + Kerberos + DNS + CA). All services authenticate against it; SSSD joins clients to the domain.
  3. One SSO plane. Keycloak (OIDC/SAML) sits in front of web apps, federated to FreeIPA. One login per person across mail, files, chat, conferencing, accounting, project boards.
  4. One collaboration hub. Nextcloud for files, calendars, contacts, and as the auth bridge to Collabora/OnlyOffice.
  5. One virtualization platform. Proxmox VE runs all VMs/LXCs; Proxmox Backup Server handles snapshots + dedup.
  6. Own the hardware, own the firmware. coreboot/Libreboot firmware on clients, OpenBMC on servers, OpenWrt on the network edge.
  7. No telemetry-leaking proprietary clients. Firefox/LibreWolf as the standard browser; no Chrome, no proprietary meeting clients.
  8. Everything backed up, everything reproducible. Infrastructure-as-code (Ansible) so the whole estate can be rebuilt from a Git repo.

2. High-Level Architecture



Core Infrastructure (Proxmox VE cluster)LDAP/KerberosHTTPS / KerberosOIDCOperationsPrometheus + GrafanaWazuh
SIEM / XDRProxmox Backup ServerBorgmatic offsiteProductivity & Business AppsMattermost / Matrix
chatJitsi Meet
video conferencingOpenProject
project / planningERPNext
accounting · CRM · inventoryKimai
time trackingZammad
helpdeskForgejo
git + CINetwork Edge (OpenWrt / OPNsense)Firewall + VPN
WireGuardUnbound + Pi-hole
DNSSEC / ad-blockKea DHCPWi-Fi APs
OpenWrtUsers & DevicesWorkstations
Debian + SSSDLaptops
Debian + corebootThin clients
LTSP PXE bootMobile
Nextcloud/DAVx5FreeIPA
LDAP + Kerberos + DNS + CAKeycloak
SSO / OIDC / SAMLNextcloud
files · cal · contactsCollabora / OnlyOffice
document co-editingPostfix + Dovecot
+ Rspamd + ClamAVRoundcube
webmail

3. The Stack, Layer by Layer

LayerPrimary choiceRoleAlternatives
Firmware — clientscoreboot + SeaBIOS (Libreboot where supported)Boot firmware with no proprietary blobsU-Boot (RISC-V/ARM)
Firmware — serversOpenBMCOut-of-band server mgmt (IPMI replacement)OpenBMC on vendor BMCs
HardwareSystem76 / Framework laptops; OpenPower or standard x86 servers; RISC-V for niche appliancesOpen / vendor-open hardwareRaspberry Pi, Raptor Talos
Network OS — routerOPNsense (free, hardened FreeBSD fork)Firewall, routing, NAT, VPN concentratorOpenWrt on x86, VyOS
Network OS — switches/APsOpenWrtManaged switches and Wi-Fi APsOpenSwitch
VPNWireGuardSite-to-site + remote accessOpenVPN, Tailscale/Headscale (OSS control plane)
DNSUnbound (recursive, DNSSEC) + Pi-hole (local ad/block) + FreeIPA DNS (internal zones)Resolution + filtering + internal namingCoreDNS, Knot Resolver, AdGuard Home
DHCPKea DHCPAuthoritative DHCP / DHCPv6dnsmasq
Client OSDebian (stable), GNOME or KDE desktopStandard workstation/laptop OSRocky/Alma, Fedora, Ubuntu LTS
Client joinSSSD + FreeIPA clientDomain join, Kerberos login, sudo/HBAC rulesrealmd
Thin clientsLTSP (PXE/NFS root)Diskless Debian boot from network
Directory / identityFreeIPALDAP + MIT Kerberos + integrated DNS + CA — the “Active Directory for Linux”389 DS, OpenLDAP + Kerberos (manual)
SSO / web authKeycloakOIDC / SAML IdP, federated to FreeIPA; SSO for every web appAuthentik, LemonLDAP::NG
VirtualizationProxmox VE (KVM + LXC)All workloads as VMs/LXC containersoVirt, libvirt+virt-manager
Container runtimePodman + LXCApp-level containers where appropriateDocker, Kubernetes (k3s)
Reverse proxy / TLSTraefik or Nginx + Certbot (internal step-ca or FreeIPA CA)TLS termination, routing, ACME certsHAProxy, Caddy
Mail — MTA/MDAPostfix + DovecotSMTP, IMAP/POP3, sieve
Mail — anti-spam/anti-virusRspamd + ClamAVSpam scoring, DKIM/DMARC/SPF, AVSpamAssassin, Amavis
Mail — webmailRoundcube (or SnappyMail)Browser mail access
Mail — listsMailman 3Mailing listsSympa
Calendar/contactsNextcloud (CalDAV/CardDAV) + optionally RadicaleShared calendars/address booksBaïkal
Files / syncNextcloudFile sync, share, WebDAV, sharing linksSeafile, ownCloud
Office suite (desktop)LibreOfficeDocument authoringCalligra
Office suite (collab web)Collabora Online (or OnlyOffice Docs Community, AGPL)Real-time co-editing of ODF/OOXML in browser
Document scanning/OCRPaperless-ngxScan, OCR, archive, full-text search
ChatMattermost (Slack-like) or Matrix (Synapse + Element)Team messagingRocket.Chat
Audio/voiceJitsi Meet’s jigasi bridge, or MumbleVoice channels
Video conferencingJitsi Meet (self-hosted, no client install for browser/SIP)Meetings, webinars, screen shareBigBlueButton (e-learning heavy)
Project / PMOpenProjectProject planning, Gantt, time, bug trackingTaiga, Redmine, Leantime
KanbanWekanLightweight boardsFocalboard
Accounting / ERPERPNext (Frappe framework, GPLv3)Books, invoicing, payroll hooks, CRM, inventory, manufacturingOdoo Community (watch AGPL/OOL modules), GnuCash (desktop-only), Ledger CLI
Invoicing (light)Invoice Ninja (self-hosted)Standalone invoicing if ERPNext is overkill
Time trackingKimaiTimesheets, billing export
HROrangeHRMStaff records, leave
Helpdesk / ITSMZammadTicketing, knowledge baseosTicket, Request Tracker
Version control / CIForgejo (+ Forgejo Actions) or GiteaGit hosting, code review, CIGitLab CE (heavier)
Wiki / knowledge baseBookStack or MediaWikiInternal docsDokuWiki
DatabasePostgreSQL (primary), Redis, MariaDB (where an app needs it)App data stores
Object storageMinIO (S3-compatible)App-level object storage, Nextcloud S3 backend
Monitoring — metricsPrometheus + Grafana + AlertmanagerTime-series, dashboardsZabbix
Monitoring — networkLibreNMSSNMP device inventory & uplink graphsZabbix
Monitoring — uptimeUptime KumaSynthetic checks / status page
Logging / SIEMWazuhLog aggregation, HIDS, XDR, complianceElastic Stack (Free tier), Graylog
Backups — VMProxmox Backup ServerDedup, incremental, encrypted VM/LXC backups
Backups — file/appBorgmatic (BorgBackup) / ResticApp + file backups to offsite targetBareos, UrBackup
Security hardeningOpenSCAP, fail2ban, AIDE, certbot/step-caCompliance scans, intrusion detection
BrowserFirefox ESR (or LibreWolf)Standard, privacy-respecting browser
Printing / scanningCUPS + SANEPrint & scan spooling
File sharing (legacy)SambaSMB shares for any Windows-guest or scanner needsNFS (internal)
Configuration mgmtAnsible (+ Forgejo repo)Declarative infra, reproducible rebuildsSalt, Puppet
Remote access / supportRustDesk (self-hosted) or MeshCentralRemote desktop / support sessions
DNS records automationlexicon / FreeIPA DNS API + AnsibleKeep DNS in sync with deployments

4. How Coherence Works (the “glue”)

The estate is coherent because five things are shared across every service:

4.1 Identity — FreeIPA is the source of truth

  • Every person and service is a FreeIPA principal (Kerberos) and LDAP entry.
  • HBAC (Host-Based Access Control) rules decide who can SSH into which hosts; sudo rules are centrally managed.
  • FreeIPA runs the internal DNS (zone office.local) and an internal CA so every service gets a real TLS certificate — no self-signed warnings, no browser exceptions.

4.2 Single Sign-On — Keycloak

  • Keycloak federates to FreeIPA (LDAP user federation + Kerberos).
  • Each web app (Nextcloud, Jitsi, Mattermost, OpenProject, ERPNext, Zammad, BookStack, Roundcube, Paperless, Grafana) is registered as an OIDC or SAML client.
  • A user logs in once per day; everything else is seamless. Joining a new app = registering one OIDC client in Keycloak + pointing the app at it.

4.3 Storage — Nextcloud as the hub

  • Home directories for “personal cloud” files; group folders for departments.
  • Calendars (CalDAV) and contacts (CardDAV) live in Nextcloud and sync to mobile via DAVx⁵.
  • Nextcloud mounts the Samba-backed scanner drop folder so Paperless-ngx ingests scans automatically.
  • Nextcloud integrates Collabora/OnlyOffice for in-browser document editing with the same SSO identity.

4.4 Mail tied to identity

  • Postfix uses FreeIPA LDAP for recipient validation; Dovecot authenticates IMAP against Kerberos/LDAP.
  • Mailing lists (Mailman) and shared mailboxes (Dovecot’s acl) reuse the same directory groups, so “finance@”, “sales@”, etc. are just FreeIPA group memberships.

4.5 Observability & secrets shared

  • Prometheus scrapes every exporter via the same TLS CA; Grafana authenticates via Keycloak OIDC.
  • Secrets (DB passwords, API keys) are stored in Vaultwarden (self-hosted Bitwarden) or FreeIPA’s password vault, never sprinkled in Ansible vars.

5. Deployment Topology (example: 3-node office)

#Host (VM/LXC on Proxmox)RolesNotes
1ipa1FreeIPA, internal DNS, CAReplicas: ipa2
2keycloak1Keycloak SSOBehind reverse proxy
3mail1Postfix, Dovecot, Rspamd, ClamAV, RoundcubeDMARC/DKIM via Rspamd
4nextcloud1Nextcloud + Collabora + MinIO (S3 primary storage)Postgres on db1
5chat1Mattermost (or Synapse)OIDC to Keycloak
6jitsi1Jitsi Videobridge + Jicofo + ProsodyBehind reverse proxy
7erp1ERPNext + MariaDBOIDC to Keycloak
8pm1OpenProjectOIDC to Keycloak
9help1Zammad + ElasticsearchOIDC to Keycloak
10git1Forgejo + Forgejo Actions runnersOIDC to Keycloak
11obs1Prometheus, Grafana, Alertmanager, Uptime KumaOIDC to Keycloak
12sec1Wazuh manager + indexer + dashboard
13db1PostgreSQL (for Nextcloud, Keycloak, Zammad, OpenProject)Point-in-time recovery
14pbs1Proxmox Backup Server (physical or dedicated)Offsite sync with Borgmatic
15edge1OPNsense + WireGuard (physical, dual-WAN)
16sw1..n, ap1..nOpenWrt switches & Wi-Fi APs (physical)

The three Proxmox nodes form a Ceph or ZFS-over-replication cluster with live migration; losing one node moves workloads automatically. pbs1 holds encrypted, deduplicated backups; an offsite Borgmatic target holds a second copy.


6. Security & Compliance Posture

  • TLS everywhere, internal CA (FreeIPA / step-ca); Certbot/ACME for public-facing names. No plaintext protocols on the LAN.
  • WireGuard for all remote access; no exposed RDP/SSH to the internet.
  • SELinux/AppArmor enforcing on servers; OpenSCAP profiles applied (Debian CIS baseline).
  • fail2ban + Wazuh for brute-force detection and host-based detection; logs ship to Wazuh indexer.
  • AIDE file-integrity monitoring on ipa1, db1, mail1.
  • DNS filtering via Pi-hole; DNSSEC validation via Unbound.
  • Least privilege via HBAC — developers can’t reach finance DBs, finance can’t reach git runners, all enforced centrally in FreeIPA.
  • Backups follow 3-2-1: PBS (on-site, deduped), Borgmatic offsite, nextcloud files also snapshotted to MinIO.

7. Adoption & Migration Path

  1. Stand up the spine first — Proxmox cluster → FreeIPA → Keycloak → reverse proxy + TLS. Nothing else is built until SSO works.
  2. Migrate identity — create users/groups in FreeIPA matching existing roles; join a pilot Debian workstation via realm join.
  3. Email — cut over Postfix/Dovecot, migrate mailboxes with imapsync, configure DKIM/DMARC.
  4. Files & office — deploy Nextcloud + Collabora; migrate shared drives into group folders; install LibreOffice on clients.
  5. Collaboration — Mattermost/Matrix + Jitsi; switch the office off proprietary meeting clients.
  6. Business apps — ERPNext for accounting/invoicing; OpenProject for delivery; Kimai for time; Zammad for IT requests.
  7. Observability & backup — Prometheus/Grafana/Wazuh last, once there’s something to watch; PBS from day one.
  8. Automate everything — the entire build is captured in an Ansible playbook in Forgejo, so the estate is reproducible and rebuildable in hours, not weeks.

8. Where Proprietary Stays Out (intentional)

AvoidedOpen replacement
Windows Server / Active DirectoryFreeIPA
Exchange / OutlookPostfix+Dovecot+Roundcube, Nextcloud for calendar
Microsoft 365 / SharePointNextcloud + Collabora
Teams / ZoomJitsi Meet + Mattermost/Matrix
SlackMattermost
QuickBooks / XeroERPNext (or GnuCash for simple bookkeeping)
JiraOpenProject
GitHub (cloud)Forgejo (self-hosted)
Zoom/Webex client installJitsi (browser-only)
Chrome / EdgeFirefox ESR / LibreWolf
Dropbox / Google DriveNextcloud
LastPass / 1Password (cloud)Vaultwarden (self-hosted Bitwarden)

9. Total Licensing

Every component above ships under an OSI-approved license (GPL, AGPL, LGPL, MPL, Apache-2.0, or BSD). The whole estate can be operated with zero per-seat licensing fees, auditable end-to-end, and rebuildable from a single Git repository. That is the definition of “completely open source.”

Comments

Leave a Reply