diff --git a/docs/nextcloud-infrastructure-transparency.md b/docs/nextcloud-infrastructure-transparency.md new file mode 100644 index 0000000..6a589d9 --- /dev/null +++ b/docs/nextcloud-infrastructure-transparency.md @@ -0,0 +1,86 @@ +# Nextcloud: Data Safety & Infrastructure Transparency + +This is a quick guide to show how I've set things up, where your data actually lives, and what happens if something breaks. My main goal is to make sure your files are **never permanently lost**, even if the service goes offline for a bit. + +## 1. Where is the data? + +I use a multi-region setup in Europe so that your files and settings aren't stuck in one single building. + +| **Data Type** | **Primary Location** | **Infrastructure** | **Privacy** | +| :--- | :--- | :--- | :--- | +| **Your Files** (Photos, etc.) | Nuremberg, Germany | S3 Object Storage (NBG1) | EU (GDPR) | +| **Settings & Shares** | Nuremberg, Germany | Replicated PostgreSQL Cluster | EU (GDPR) | +| **Emergency File Backups** | Helsinki, Finland | Storage Box Vault (HEL1) | EU (GDPR) | +| **Database Backups** | Falkenstein, Germany | S3 Object Storage (FSN1) | EU (GDPR) | + +## 2. Technical Setup & Reliability + +I’m using a modern "cloud-native" stack to keep things stable: + +* **3-Node Server Cluster:** The Nextcloud app runs across three different server nodes. I keep at least two active copies running at all times. If one server crashes, the system automatically moves your connection to a healthy one. + +* **S3 Storage Redundancy:** Your files are stored using "Erasure Coding." This means they are split into fragments and spread across many physical disks. The system can handle three disks dying at the exact same time without losing a single byte of your data. + +* **SQL Database Replication:** Your account settings and calendars are managed by a PostgreSQL cluster. This is mirrored across multiple volumes so that a single disk failure doesn't lock you out of your account. + +## 3. The "Never Unrecoverable" Guarantee + +I don't guarantee 100% "up-time" (the site might go down for maintenance or if a datacenter has a major issue), but I follow a 3-Region Safety Rule to prevent data loss: + +* **Daily Sync to Finland:** Every 24 hours, the system automatically mirrors all files from the Nuremberg storage to a separate **Storage Box** in Helsinki. + +* **Database Dumps:** Every day, I export a compressed SQL dump of the database and store it in a different S3 bucket in Falkenstein. + +* **Immutable Snapshots:** The backup vault in Helsinki uses "Snapshots." These are read-only versions of the past. If a bug accidentally deletes something, I can "roll back" the storage to how it looked yesterday. + +## 4. Technologies I Use + +If you're curious about the specific tools I'm using to run this, here is the tech stack: + +* [**Nextcloud**](https://nextcloud.com/): The core collaboration platform for your files, contacts, and calendars. + +* [**Kubernetes**](https://kubernetes.io/): The "brain" that manages my 3-node cluster and ensures the apps stay running. + +* [**PostgreSQL**](https://www.postgresql.org/): The high-performance database engine that stores all your account settings and metadata. + +* [**Hetzner**](https://www.hetzner.com/): The German cloud provider where all the physical servers are located. + + * [**Object Storage (S3)**](https://www.hetzner.com/cloud/object-storage/): The specific high-durability service used for storing your actual files in Nuremberg and backups in Falkenstein. + + * [**Storage Box**](https://www.hetzner.com/storage/storage-box/): The independent storage vault in Helsinki used for the daily file mirrors and snapshots. + +## 5. Infrastructure Costs (Monthly) + +The following table shows the total monthly costs for the entire setup. These are the platform costs for everyone combined, not per person. + +**Note on Server Costs:** I am covering the server node costs myself, as I utilize the cluster for other personal projects as well. + +| **Component** | **Description** | **Cost (Approx.)** | +| :--- | :--- | :--- | +| **Servers (Nodes)** | 3x Cloud Instances (**CAX11 ARM64**) | \~€13.50 | +| **PostgreSQL Volumes** | High-speed block storage for database replication | \~€2.00 | +| **S3 Object Storage** | Primary storage (NBG1) & DB backups (FSN1) | \~€7.72\* | +| **Storage Box** | 1 TB Backup Vault in Helsinki (BX11) | \~€3.81 | +| **TOTAL** | **Combined platform cost** | **\~€27.03** | + +*\*The S3 base price includes the first 1 TB of storage and 1 TB of egress traffic. If usage exceeds these limits, pay-as-you-go rates apply (approx. €7.74 per additional TB).* + +> **Performance Note:** I am currently evaluating if the **CAX11 ARM64** instances are sufficient for our specific needs. If the system feels slow during heavy use, I may upgrade these to larger instances in the future. + +## 6. Privacy & Security + +* **Sovereign Cloud:** Everything stays in the EU. I don't use any US-based companies (like AWS or Google) to store the data, which keeps it away from the US CLOUD Act. + +* **Admin Access:** Right now, data is stored "at rest" without server-side encryption. This makes the system faster and easier for me to fix if things break, but it means I (as the admin) can technically see the files on the backend. + +* **End-to-End Privacy:** If you have extremely private documents, I recommend encrypting them on your computer (using something like Cryptomator) before uploading them. + +## 7. What happens if...? + +| **Event** | **What you'll see** | **My Recovery Plan** | +| :--- | :--- | :--- | +| **A single server fails** | Nothing / Minimal lag | Automatic move to a healthy server node. | +| **You accidentally delete a file** | It's gone | I can try to pull it from the 24h Helsinki Snapshot vault. | +| **Major Datacenter Disaster** | Site goes offline | I'll rebuild the setup in a new region using the SQL dumps and File mirrors. | + +*I update this whenever I change the hardware or backup routine. Last update: April 2026.* diff --git a/docs/nextcloud-infrastructure-transparency_de.md b/docs/nextcloud-infrastructure-transparency_de.md new file mode 100644 index 0000000..3f499e5 --- /dev/null +++ b/docs/nextcloud-infrastructure-transparency_de.md @@ -0,0 +1,86 @@ +# Nextcloud: Datensicherheit & Infrastruktur-Transparenz + +Dies ist eine kurze Anleitung, die zeigt, wie ich alles eingerichtet habe, wo eure Daten tatsaechlich liegen und was passiert, wenn etwas schiefgeht. Mein Hauptziel ist es sicherzustellen, dass eure Dateien **niemals dauerhaft verloren gehen**, selbst wenn der Dienst mal kurzzeitig offline ist. + +## 1. Wo liegen die Daten? + +Ich verwende ein Multi-Region-Setup in Europa, damit eure Dateien und Einstellungen nicht in einem einzigen Gebaeude festsitzen. + +| **Datentyp** | **Primaerer Standort** | **Infrastruktur** | **Datenschutz** | +| :--- | :--- | :--- | :--- | +| **Eure Dateien** (Fotos etc.) | Nuernberg, Deutschland | S3 Object Storage (NBG1) | EU (DSGVO) | +| **Einstellungen & Freigaben** | Nuernberg, Deutschland | Replizierter PostgreSQL-Cluster | EU (DSGVO) | +| **Notfall-Datei-Backups** | Helsinki, Finnland | Storage Box Vault (HEL1) | EU (DSGVO) | +| **Datenbank-Backups** | Falkenstein, Deutschland | S3 Object Storage (FSN1) | EU (DSGVO) | + +## 2. Technisches Setup & Zuverlaessigkeit + +Ich verwende einen modernen "Cloud-Native"-Stack, um alles stabil zu halten: + +* **3-Node-Server-Cluster:** Die Nextcloud-App laeuft auf drei verschiedenen Server-Nodes. Ich halte immer mindestens zwei aktive Kopien am Laufen. Wenn ein Server abstuerzt, leitet das System eure Verbindung automatisch auf einen funktionierenden um. + +* **S3-Speicher-Redundanz:** Eure Dateien werden mittels "Erasure Coding" gespeichert. Das bedeutet, sie werden in Fragmente aufgeteilt und auf viele physische Festplatten verteilt. Das System kann den gleichzeitigen Ausfall von drei Festplatten verkraften, ohne ein einziges Byte eurer Daten zu verlieren. + +* **SQL-Datenbank-Replikation:** Eure Kontoeinstellungen und Kalender werden von einem PostgreSQL-Cluster verwaltet. Dieser wird ueber mehrere Volumes gespiegelt, sodass ein einzelner Festplattenausfall euch nicht aus eurem Konto aussperrt. + +## 3. Die "Niemals unwiederbringlich verloren"-Garantie + +Ich garantiere keine 100%ige Verfuegbarkeit (die Seite kann fuer Wartungsarbeiten oder bei einem groesseren Rechenzentrumsproblem offline gehen), aber ich befolge eine 3-Regionen-Sicherheitsregel, um Datenverlust zu verhindern: + +* **Taegliche Synchronisation nach Finnland:** Alle 24 Stunden spiegelt das System automatisch alle Dateien vom Nuernberger Speicher auf eine separate **Storage Box** in Helsinki. + +* **Datenbank-Dumps:** Jeden Tag exportiere ich einen komprimierten SQL-Dump der Datenbank und speichere ihn in einem anderen S3-Bucket in Falkenstein. + +* **Unveraenderbare Snapshots:** Der Backup-Vault in Helsinki verwendet "Snapshots". Das sind schreibgeschuetzte Versionen der Vergangenheit. Wenn ein Fehler versehentlich etwas loescht, kann ich den Speicher auf den Zustand von gestern "zuruecksetzen". + +## 4. Technologien, die ich verwende + +Falls ihr neugierig seid, welche konkreten Tools ich zum Betrieb verwende, hier ist der Tech-Stack: + +* [**Nextcloud**](https://nextcloud.com/): Die zentrale Kollaborationsplattform fuer eure Dateien, Kontakte und Kalender. + +* [**Kubernetes**](https://kubernetes.io/): Das "Gehirn", das meinen 3-Node-Cluster verwaltet und sicherstellt, dass die Apps weiterlaufen. + +* [**PostgreSQL**](https://www.postgresql.org/): Die Hochleistungs-Datenbank-Engine, die alle Kontoeinstellungen und Metadaten speichert. + +* [**Hetzner**](https://www.hetzner.com/): Der deutsche Cloud-Anbieter, bei dem alle physischen Server stehen. + + * [**Object Storage (S3)**](https://www.hetzner.com/cloud/object-storage/): Der spezielle Hochverfuegbarkeits-Speicherdienst fuer eure eigentlichen Dateien in Nuernberg und Backups in Falkenstein. + + * [**Storage Box**](https://www.hetzner.com/storage/storage-box/): Der unabhaengige Speicher-Vault in Helsinki fuer die taeglichen Datei-Spiegelungen und Snapshots. + +## 5. Infrastrukturkosten (monatlich) + +Die folgende Tabelle zeigt die gesamten monatlichen Kosten fuer das komplette Setup. Dies sind die Plattformkosten fuer alle zusammen, nicht pro Person. + +**Hinweis zu den Serverkosten:** Ich uebernehme die Serverkosten selbst, da ich den Cluster auch fuer andere persoenliche Projekte nutze. + +| **Komponente** | **Beschreibung** | **Kosten (ca.)** | +| :--- | :--- | :--- | +| **Server (Nodes)** | 3x Cloud-Instanzen (**CAX11 ARM64**) | \~13,50 EUR | +| **PostgreSQL-Volumes** | Hochgeschwindigkeits-Blockspeicher fuer Datenbank-Replikation | \~2,00 EUR | +| **S3 Object Storage** | Primaerspeicher (NBG1) & DB-Backups (FSN1) | \~7,72 EUR\* | +| **Storage Box** | 1 TB Backup-Vault in Helsinki (BX11) | \~3,81 EUR | +| **GESAMT** | **Kombinierte Plattformkosten** | **\~27,03 EUR** | + +*\*Der S3-Grundpreis beinhaltet das erste 1 TB Speicher und 1 TB Egress-Traffic. Bei Ueberschreitung gelten nutzungsbasierte Preise (ca. 7,74 EUR pro zusaetzlichem TB).* + +> **Hinweis zur Performance:** Ich evaluiere derzeit, ob die **CAX11 ARM64**-Instanzen fuer unsere spezifischen Anforderungen ausreichend sind. Falls das System bei starker Nutzung langsam wirkt, werde ich diese in Zukunft moeglicherweise auf groessere Instanzen upgraden. + +## 6. Datenschutz & Sicherheit + +* **Souveraene Cloud:** Alles bleibt in der EU. Ich verwende keine US-basierten Unternehmen (wie AWS oder Google) zur Datenspeicherung, wodurch die Daten dem US CLOUD Act entzogen bleiben. + +* **Admin-Zugriff:** Derzeit werden die Daten "at rest" ohne serverseitige Verschluesselung gespeichert. Das macht das System schneller und einfacher zu reparieren, bedeutet aber, dass ich (als Admin) technisch gesehen die Dateien im Backend einsehen kann. + +* **Ende-zu-Ende-Privatsphaere:** Wenn ihr extrem vertrauliche Dokumente habt, empfehle ich, diese auf eurem Computer zu verschluesseln (z.B. mit Cryptomator), bevor ihr sie hochladet. + +## 7. Was passiert, wenn...? + +| **Ereignis** | **Was ihr seht** | **Mein Wiederherstellungsplan** | +| :--- | :--- | :--- | +| **Ein einzelner Server faellt aus** | Nichts / Minimale Verzoegerung | Automatische Umleitung auf einen funktionierenden Server-Node. | +| **Ihr loescht versehentlich eine Datei** | Sie ist weg | Ich kann versuchen, sie aus dem 24h-Helsinki-Snapshot-Vault wiederherzustellen. | +| **Groessere Rechenzentrums-Katastrophe** | Seite geht offline | Ich baue das Setup in einer neuen Region mithilfe der SQL-Dumps und Datei-Spiegelungen neu auf. | + +*Ich aktualisiere dieses Dokument, wenn ich die Hardware oder Backup-Routine aendere. Letzte Aktualisierung: April 2026.*