{"id":4515,"date":"2026-02-05T16:08:27","date_gmt":"2026-02-05T13:08:27","guid":{"rendered":"https:\/\/www.dchost.com\/blog\/secure-vps-hosting-for-nextcloud-and-owncloud-storage-encryption-and-backups\/"},"modified":"2026-02-05T16:08:27","modified_gmt":"2026-02-05T13:08:27","slug":"secure-vps-hosting-for-nextcloud-and-owncloud-storage-encryption-and-backups","status":"publish","type":"post","link":"https:\/\/www.dchost.com\/blog\/en\/secure-vps-hosting-for-nextcloud-and-owncloud-storage-encryption-and-backups\/","title":{"rendered":"Secure VPS Hosting for Nextcloud and ownCloud: Storage, Encryption and Backups"},"content":{"rendered":"<div class=\"dchost-blog-content-wrapper\"><div id=\"toc_container\" class=\"toc_transparent no_bullets\"><p class=\"toc_title\">\u0130&ccedil;indekiler<\/p><ul class=\"toc_list\"><li><a href=\"#Why_Nextcloud_and_ownCloud_Belong_on_a_Secure_VPS\"><span class=\"toc_number toc_depth_1\">1<\/span> Why Nextcloud and ownCloud Belong on a Secure VPS<\/a><\/li><li><a href=\"#Sizing_and_Designing_the_VPS_for_a_Private_Cloud\"><span class=\"toc_number toc_depth_1\">2<\/span> Sizing and Designing the VPS for a Private Cloud<\/a><ul><li><a href=\"#Baseline_VPS_resources_for_Nextcloud_and_ownCloud\"><span class=\"toc_number toc_depth_2\">2.1<\/span> Baseline VPS resources for Nextcloud and ownCloud<\/a><\/li><li><a href=\"#SSD_vs_NVMe_and_why_it_matters_for_sync_performance\"><span class=\"toc_number toc_depth_2\">2.2<\/span> SSD vs NVMe and why it matters for sync performance<\/a><\/li><li><a href=\"#OS_filesystem_and_control_panel_choices\"><span class=\"toc_number toc_depth_2\">2.3<\/span> OS, filesystem and control panel choices<\/a><\/li><\/ul><\/li><li><a href=\"#Storage_Architecture_for_Nextcloud_and_ownCloud\"><span class=\"toc_number toc_depth_1\">3<\/span> Storage Architecture for Nextcloud and ownCloud<\/a><ul><li><a href=\"#Logical_layout_OS_app_database_and_data_directory\"><span class=\"toc_number toc_depth_2\">3.1<\/span> Logical layout: OS, app, database and data directory<\/a><\/li><li><a href=\"#RAID_redundancy_and_when_it_belongs_inside_the_VPS\"><span class=\"toc_number toc_depth_2\">3.2<\/span> RAID, redundancy and when it belongs inside the VPS<\/a><\/li><li><a href=\"#Using_object_storage_as_external_storage\"><span class=\"toc_number toc_depth_2\">3.3<\/span> Using object storage as external storage<\/a><\/li><li><a href=\"#Three_common_storage_patterns\"><span class=\"toc_number toc_depth_2\">3.4<\/span> Three common storage patterns<\/a><ul><li><a href=\"#1_Small_team_single_VPS\"><span class=\"toc_number toc_depth_3\">3.4.1<\/span> 1. Small team, single VPS<\/a><\/li><li><a href=\"#2_Growing_company_larger_single_server\"><span class=\"toc_number toc_depth_3\">3.4.2<\/span> 2. Growing company, larger single server<\/a><\/li><li><a href=\"#3_Dedicated_or_colocated_storage_server\"><span class=\"toc_number toc_depth_3\">3.4.3<\/span> 3. Dedicated or colocated storage server<\/a><\/li><\/ul><\/li><\/ul><\/li><li><a href=\"#Encryption_Architecture_In_Transit_At_Rest_and_In_App\"><span class=\"toc_number toc_depth_1\">4<\/span> Encryption Architecture: In Transit, At Rest and In App<\/a><ul><li><a href=\"#Transport_encryption_HTTPS_done_properly\"><span class=\"toc_number toc_depth_2\">4.1<\/span> Transport encryption: HTTPS done properly<\/a><\/li><li><a href=\"#Disk_and_filesystem_encryption_at_rest\"><span class=\"toc_number toc_depth_2\">4.2<\/span> Disk and filesystem encryption at rest<\/a><\/li><li><a href=\"#Nextcloud_and_owncloud_server_side_encryption\"><span class=\"toc_number toc_depth_2\">4.3<\/span> Nextcloud and owncloud server side encryption<\/a><\/li><li><a href=\"#Client_side_encryption_and_threat_models\"><span class=\"toc_number toc_depth_2\">4.4<\/span> Client side encryption and threat models<\/a><\/li><li><a href=\"#Key_management_and_backups_of_keys\"><span class=\"toc_number toc_depth_2\">4.5<\/span> Key management and backups of keys<\/a><\/li><\/ul><\/li><li><a href=\"#Backup_and_Disaster_Recovery_Architecture_for_Nextcloud_and_ownCloud\"><span class=\"toc_number toc_depth_1\">5<\/span> Backup and Disaster Recovery Architecture for Nextcloud and ownCloud<\/a><ul><li><a href=\"#3_2_1_as_a_baseline_strategy\"><span class=\"toc_number toc_depth_2\">5.1<\/span> 3 2 1 as a baseline strategy<\/a><\/li><li><a href=\"#What_exactly_to_back_up\"><span class=\"toc_number toc_depth_2\">5.2<\/span> What exactly to back up<\/a><\/li><li><a href=\"#Backup_methods_file_level_snapshots_and_database_aware_tools\"><span class=\"toc_number toc_depth_2\">5.3<\/span> Backup methods: file level, snapshots and database aware tools<\/a><\/li><li><a href=\"#Offsite_backups_to_S3_compatible_storage\"><span class=\"toc_number toc_depth_2\">5.4<\/span> Offsite backups to S3 compatible storage<\/a><\/li><li><a href=\"#Ransomware_resistant_backups\"><span class=\"toc_number toc_depth_2\">5.5<\/span> Ransomware resistant backups<\/a><\/li><li><a href=\"#Testing_restores_and_writing_a_simple_DR_plan\"><span class=\"toc_number toc_depth_2\">5.6<\/span> Testing restores and writing a simple DR plan<\/a><\/li><\/ul><\/li><li><a href=\"#Security_Hardening_for_a_Nextcloud_or_ownCloud_VPS\"><span class=\"toc_number toc_depth_1\">6<\/span> Security Hardening for a Nextcloud or ownCloud VPS<\/a><ul><li><a href=\"#Base_VPS_hardening\"><span class=\"toc_number toc_depth_2\">6.1<\/span> Base VPS hardening<\/a><\/li><li><a href=\"#Web_server_and_PHP_security_for_Nextcloud\"><span class=\"toc_number toc_depth_2\">6.2<\/span> Web server and PHP security for Nextcloud<\/a><\/li><li><a href=\"#Application_level_security\"><span class=\"toc_number toc_depth_2\">6.3<\/span> Application level security<\/a><\/li><\/ul><\/li><li><a href=\"#Three_Example_Architectures_You_Can_Borrow\"><span class=\"toc_number toc_depth_1\">7<\/span> Three Example Architectures You Can Borrow<\/a><ul><li><a href=\"#1_Family_and_micro_team_cloud_up_to_10_users\"><span class=\"toc_number toc_depth_2\">7.1<\/span> 1. Family and micro team cloud (up to 10 users)<\/a><\/li><li><a href=\"#2_Small_business_or_agency_2080_active_users\"><span class=\"toc_number toc_depth_2\">7.2<\/span> 2. Small business or agency (20\u201380 active users)<\/a><\/li><li><a href=\"#3_Compliance_conscious_environment_legal_medical_finance\"><span class=\"toc_number toc_depth_2\">7.3<\/span> 3. Compliance conscious environment (legal, medical, finance)<\/a><\/li><\/ul><\/li><li><a href=\"#Putting_It_All_Together_And_Next_Steps_on_dchostcom\"><span class=\"toc_number toc_depth_1\">8<\/span> Putting It All Together (And Next Steps on dchost.com)<\/a><\/li><\/ul><\/div>\n<h2><span id=\"Why_Nextcloud_and_ownCloud_Belong_on_a_Secure_VPS\">Why Nextcloud and ownCloud Belong on a Secure <a href=\"https:\/\/www.dchost.com\/vps\">VPS<\/a><\/span><\/h2>\n<p>Nextcloud and ownCloud are powerful tools when you want Dropbox or Google Drive style file sharing, but with full control over where your data lives. As soon as you start storing contracts, internal documents, client files or personal photos, the question becomes very simple: where do you host all of this safely, without turning your life into a full time sysadmin job?<\/p>\n<p>At dchost.com we see three common patterns. Some teams start on shared hosting and quickly hit limits on file size, performance and security isolation. Others overcorrect and jump straight to complex multi server clusters they do not really need. A well sized, well designed VPS sits in the sweet spot: dedicated resources, strong isolation from other users, and enough flexibility to build a serious storage, encryption and backup architecture around your Nextcloud or ownCloud instance.<\/p>\n<p>In this article we will walk through how to design that architecture step by step. We will focus on three pillars that actually decide how safe your private cloud is: storage layout on the VPS, encryption end to end, and a backup and disaster recovery plan that survives mistakes, hardware issues and even ransomware. The goal is a setup you can explain to management or clients in clear language and that you can run confidently on dchost.com VPS, dedicated or colocation infrastructure.<\/p>\n<h2><span id=\"Sizing_and_Designing_the_VPS_for_a_Private_Cloud\">Sizing and Designing the VPS for a Private Cloud<\/span><\/h2>\n<p>Before talking about disks and encryption, you need a realistic VPS baseline. Both Nextcloud and ownCloud are PHP applications with a web server, a database (usually MariaDB or PostgreSQL) and a storage backend. They scale more like a CMS plus heavy file I\/O than like a tiny blog.<\/p>\n<h3><span id=\"Baseline_VPS_resources_for_Nextcloud_and_ownCloud\">Baseline VPS resources for Nextcloud and ownCloud<\/span><\/h3>\n<p>For small teams and families (up to 20\u201330 active users), we generally recommend:<\/p>\n<ul>\n<li><strong>vCPU:<\/strong> 2\u20134 dedicated vCPUs (4 is noticeably smoother for larger previews, full text search, antivirus apps and Collabora\/OnlyOffice integration)<\/li>\n<li><strong>RAM:<\/strong> 4\u20138 GB (4 GB minimum, 8 GB gives headroom for PHP workers, database cache and previews)<\/li>\n<li><strong>Disk:<\/strong> 150\u2013500 GB for a starter deployment, on SSD or NVMe<\/li>\n<li><strong>Bandwidth:<\/strong> Enough monthly traffic to cover sync, mobile use and external shares; this grows fast once people start using WebDAV heavily<\/li>\n<\/ul>\n<p>For larger teams (50\u2013200+ active users), planning vCPU, RAM and IOPS becomes critical. Our article on <a href='https:\/\/www.dchost.com\/blog\/en\/woocommerce-kapasite-planlama-rehberi-vcpu-ram-iops-nasil-hesaplanir\/'>capacity planning for vCPU, RAM and IOPS<\/a> is written for WooCommerce, but the logic is very similar for storage heavy Nextcloud setups.<\/p>\n<h3><span id=\"SSD_vs_NVMe_and_why_it_matters_for_sync_performance\">SSD vs NVMe and why it matters for sync performance<\/span><\/h3>\n<p>File sync platforms are I\/O heavy: every upload, download, preview, index job and antivirus scan hits your disk. Rotational HDDs quickly become a bottleneck. SSD is the minimum; NVMe often pays back its price in reduced latency and much snappier sync.<\/p>\n<p>If you want a deeper comparison, our guide on <a href='https:\/\/www.dchost.com\/blog\/en\/nvme-ssd-sata-ssd-ve-hdd-karsilastirmasi-web-hosting-yedek-ve-arsiv-icin-dogru-disk-secimi\/'>NVMe SSD vs SATA SSD vs HDD for hosting and backups<\/a> explains how throughput and IOPS translate into real world performance on a VPS or <a href=\"https:\/\/www.dchost.com\/dedicated-server\">dedicated server<\/a>.<\/p>\n<h3><span id=\"OS_filesystem_and_control_panel_choices\">OS, filesystem and control panel choices<\/span><\/h3>\n<ul>\n<li><strong>OS:<\/strong> Debian and Ubuntu are the most popular for Nextcloud and ownCloud. AlmaLinux or Rocky Linux are also fine if you prefer RHEL style systems.<\/li>\n<li><strong>Filesystem:<\/strong> ext4 and XFS are stable choices on classic VPS storage. ZFS is attractive when you want snapshots, checksums and built in compression, especially on dedicated or colocation servers.<\/li>\n<li><strong>Control panel vs plain SSH:<\/strong> You can run Nextcloud on cPanel or a similar panel, but serious deployments benefit from a clean Nginx or Apache configuration directly on the VPS. Our guide on <a href='https:\/\/www.dchost.com\/blog\/en\/kontrol-paneli-olmadan-vps-yonetimi-sadece-ssh-ile-web-sitesi-yayina-alma-rehberi\/'>running a VPS without a control panel over SSH only<\/a> walks through that approach.<\/li>\n<\/ul>\n<h2><span id=\"Storage_Architecture_for_Nextcloud_and_ownCloud\">Storage Architecture for Nextcloud and ownCloud<\/span><\/h2>\n<p>Once you have a VPS, the real design work starts on the storage side. The goal is to separate concerns: operating system, database and application code on one side; user data on another; and offsite backups in a third, isolated place.<\/p>\n<h3><span id=\"Logical_layout_OS_app_database_and_data_directory\">Logical layout: OS, app, database and data directory<\/span><\/h3>\n<p>A clean, robust layout on a single VPS looks like this:<\/p>\n<ul>\n<li><strong>OS and base system:<\/strong> Root filesystem (ext4 or XFS), 20\u201340 GB<\/li>\n<li><strong>Database:<\/strong> Data directory on fast disk, often under \/var\/lib\/mysql or \/var\/lib\/postgresql; keep enough IOPS for concurrent syncs and search<\/li>\n<li><strong>Nextcloud\/ownCloud app code:<\/strong> Under \/var\/www or a similar path, managed with your package manager or git<\/li>\n<li><strong>Data directory:<\/strong> A separate mount point such as \/cloud-data, ideally on its own virtual disk or partition<\/li>\n<\/ul>\n<p>Separating the data directory into its own mount makes it easier to move to a larger disk later and to mount it with stricter options (noexec, nodev, etc.). It also allows you to take filesystem level snapshots of data without freezing the entire OS.<\/p>\n<h3><span id=\"RAID_redundancy_and_when_it_belongs_inside_the_VPS\">RAID, redundancy and when it belongs inside the VPS<\/span><\/h3>\n<p>On a VPS, the provider usually handles physical redundancy at the hypervisor or storage layer. Inside the virtual machine you typically do <strong>not<\/strong> need software RAID for a single disk device. Where RAID or ZFS mirrors become useful is on dedicated servers or colocation, where you control multiple physical drives.<\/p>\n<p>If you move your Nextcloud or ownCloud to a dedicated server in our data centers, we often recommend:<\/p>\n<ul>\n<li>RAID 1 or RAID 10 of SSD or NVMe for the main data set<\/li>\n<li>Separate, slower HDD pool for local backup snapshots (with offsite copies on top)<\/li>\n<li>ZFS or mdraid depending on operational familiarity and tooling<\/li>\n<\/ul>\n<h3><span id=\"Using_object_storage_as_external_storage\">Using object storage as external storage<\/span><\/h3>\n<p>Nextcloud and ownCloud can attach external storage backends such as S3 compatible object storage. This is extremely useful when:<\/p>\n<ul>\n<li>You want to keep your VPS small and push large archives or media libraries into cheaper object storage<\/li>\n<li>You need geo redundant copies of certain shared folders<\/li>\n<li>You want versioning and immutable object locking at the storage level<\/li>\n<\/ul>\n<p>On dchost.com infrastructure you can run your own S3 compatible stack (for example MinIO) on a separate VPS or server and connect it via the External Storage app. Our article on <a href='https:\/\/www.dchost.com\/blog\/en\/vps-uzerinde-minio-ile-s3%e2%80%91uyumlu-depolama-nasil-uretim%e2%80%91hazir-kurulur-erasure-coding-tls-ve-policyleri-tatli-tatli-anlatiyorum\/'>production ready MinIO on a VPS<\/a> shows how to secure such a service with TLS, erasure coding and bucket policies.<\/p>\n<p>For most teams we recommend this hybrid pattern: use fast block storage (SSD or NVMe) for the primary Nextcloud data directory and database, and add object storage only for large, rarely changed archives or team shares.<\/p>\n<h3><span id=\"Three_common_storage_patterns\">Three common storage patterns<\/span><\/h3>\n<h4><span id=\"1_Small_team_single_VPS\">1. Small team, single VPS<\/span><\/h4>\n<ul>\n<li>One SSD or NVMe disk, partitioned into root filesystem and \/cloud-data<\/li>\n<li>Database on the root filesystem, with tuned InnoDB buffers<\/li>\n<li>Regular filesystem snapshots (LVM or ZFS) plus offsite backups<\/li>\n<\/ul>\n<h4><span id=\"2_Growing_company_larger_single_server\">2. Growing company, larger single server<\/span><\/h4>\n<ul>\n<li>Separate virtual disks for OS, database and data directory<\/li>\n<li>Data disk on larger, high IOPS SSD or NVMe<\/li>\n<li>Optional object storage backend for media and long term archives<\/li>\n<li>More aggressive snapshot and backup schedule with longer retention<\/li>\n<\/ul>\n<h4><span id=\"3_Dedicated_or_colocated_storage_server\">3. Dedicated or colocated storage server<\/span><\/h4>\n<ul>\n<li>Multiple physical SSD or NVMe drives in RAID 10 or ZFS mirror<\/li>\n<li>Separate HDDs or remote object storage for backup copies<\/li>\n<li>Database either co located or on a separate server, replicated<\/li>\n<\/ul>\n<p>This third pattern is where dchost.com dedicated and colocation services shine: you get direct control over disks, controllers and RAID layout, while our team manages power, cooling, connectivity and data center level redundancy.<\/p>\n<h2><span id=\"Encryption_Architecture_In_Transit_At_Rest_and_In_App\">Encryption Architecture: In Transit, At Rest and In App<\/span><\/h2>\n<p>With storage in place, the next layer is encryption. For a private cloud, you want a clear answer to three questions: is traffic encrypted in transit, is the disk encrypted at rest, and do I need server side or client side encryption inside Nextcloud or ownCloud?<\/p>\n<h3><span id=\"Transport_encryption_HTTPS_done_properly\">Transport encryption: HTTPS done properly<\/span><\/h3>\n<p>Every Nextcloud or ownCloud deployment must be behind HTTPS, without exception. On a VPS this usually means:<\/p>\n<ul>\n<li>Nginx or Apache terminating TLS on ports 80 and 443<\/li>\n<li>Automatic certificates via Let\u2019s Encrypt using HTTP 01 or DNS 01 challenges<\/li>\n<li>Modern TLS configuration (TLS 1.2 and 1.3, with strong ciphers)<\/li>\n<li>HSTS enabled once you are confident there is no mixed content<\/li>\n<\/ul>\n<p>If you want a deeper dive into protocol details, you can refer to our guides on <a href='https:\/\/www.dchost.com\/blog\/en\/ssl-tls-protokol-guncellemeleri-modern-https-icin-net-yol-haritasi\/'>modern SSL and TLS protocol updates<\/a> and on <a href='https:\/\/www.dchost.com\/blog\/en\/ssl-sertifika-hatalari-rehberi-mixed-content-not-secure-ve-tarayici-uyarilarini-hosting-tarafinda-cozmek\/'>fixing common SSL certificate errors<\/a>. The same best practices apply to a Nextcloud or ownCloud instance on a VPS.<\/p>\n<h3><span id=\"Disk_and_filesystem_encryption_at_rest\">Disk and filesystem encryption at rest<\/span><\/h3>\n<p>Encrypting data at rest protects you against someone physically accessing the storage device or an offline copy of the virtual disk. You have a few options:<\/p>\n<ul>\n<li><strong>Full disk encryption with LUKS:<\/strong> Encrypts the entire root volume. Strongest against physical theft, but requires a passphrase on boot, which complicates unattended reboots.<\/li>\n<li><strong>Separate encrypted data volume:<\/strong> Only the partition or virtual disk mounted as \/cloud-data is encrypted. The OS can boot unattended, but you must unlock the data volume before services start.<\/li>\n<li><strong>ZFS native encryption:<\/strong> If you deploy on ZFS (often on dedicated or colocation servers), you can encrypt datasets individually and still use ZFS snapshots, compression and replication.<\/li>\n<\/ul>\n<p>On VPS platforms where reboots should be automatic, a common compromise is to encrypt only the data disk. The OS and database remain on unencrypted volumes, while the user file store is protected. You then put strict firewall and SSH controls on the VPS, so that accessing Nextcloud requires network access, not just grabbing a disk image.<\/p>\n<h3><span id=\"Nextcloud_and_owncloud_server_side_encryption\">Nextcloud and own<a href=\"https:\/\/www.dchost.com\/cloud-server\">cloud server<\/a> side encryption<\/span><\/h3>\n<p>Both platforms offer their own server side encryption modules. Their main role is protecting data when you use external storage backends that the provider could access. Some key points:<\/p>\n<ul>\n<li>Server side encryption does <strong>not<\/strong> hide file metadata such as file names, sizes and folder structure.<\/li>\n<li>It can complicate deduplication and certain storage side optimisations.<\/li>\n<li>Key management becomes critical; losing the keys means losing the data.<\/li>\n<\/ul>\n<p>For deployments where you fully control both the VPS and the storage server (for example a dchost.com VPS running MinIO as your external storage), filesystem or disk encryption plus TLS is usually simpler and safer operationally. Reserve server side encryption for cases where you must treat the storage backend as untrusted or semi trusted.<\/p>\n<h3><span id=\"Client_side_encryption_and_threat_models\">Client side encryption and threat models<\/span><\/h3>\n<p>Some teams want maximum privacy even from their own server administrators. In that case, client side encryption (for example using the Nextcloud end to end encryption app or external tools like Cryptomator) ensures that files are encrypted before they ever reach the VPS.<\/p>\n<p>The trade off is that server side features like full text search, antivirus scanning or online editing become limited or impossible on those encrypted folders. A realistic compromise is:<\/p>\n<ul>\n<li>Use standard storage (with disk encryption) for collaborative team workspaces.<\/li>\n<li>Use client side encryption for highly sensitive personal vaults, legal folders or HR archives.<\/li>\n<\/ul>\n<h3><span id=\"Key_management_and_backups_of_keys\">Key management and backups of keys<\/span><\/h3>\n<p>Whatever encryption layers you enable, remember that <strong>keys are now part of your backup story<\/strong>. Losing keys can be worse than losing data, because it turns your careful backup history into unreadable noise.<\/p>\n<ul>\n<li>Store LUKS passphrases and key material in a secure password manager plus an offline, printed or hardware backed emergency copy.<\/li>\n<li>Back up Nextcloud or ownCloud encryption keys and configuration files along with the database and data directory.<\/li>\n<li>Test restoring an encrypted backup in a lab VPS before you trust the design.<\/li>\n<\/ul>\n<h2><span id=\"Backup_and_Disaster_Recovery_Architecture_for_Nextcloud_and_ownCloud\">Backup and Disaster Recovery Architecture for Nextcloud and ownCloud<\/span><\/h2>\n<p>A Nextcloud or ownCloud instance with no backup strategy is simply a more complex USB stick. To make it a reliable storage system, you need a clear, documented backup and disaster recovery plan that another person on your team can follow on a stressful day.<\/p>\n<h3><span id=\"3_2_1_as_a_baseline_strategy\">3 2 1 as a baseline strategy<\/span><\/h3>\n<p>We recommend the classic 3 2 1 pattern:<\/p>\n<ul>\n<li><strong>3 copies<\/strong> of your data (production plus two backups)<\/li>\n<li><strong>2 different media or storage types<\/strong> (for example VPS disk and remote object storage)<\/li>\n<li><strong>1 copy offsite<\/strong> (in a different data center or provider)<\/li>\n<\/ul>\n<p>Our dedicated article on <a href='https:\/\/www.dchost.com\/blog\/en\/3-2-1-yedekleme-stratejisi-neden-ise-yariyor-cpanel-plesk-ve-vpste-otomatik-yedekleri-nasil-kurarsin\/'>why the 3 2 1 backup strategy works and how to automate backups on a VPS<\/a> walks through concrete retention policies and scheduling approaches you can reuse for Nextcloud data.<\/p>\n<h3><span id=\"What_exactly_to_back_up\">What exactly to back up<\/span><\/h3>\n<p>A consistent Nextcloud or ownCloud backup must include:<\/p>\n<ul>\n<li><strong>Application code:<\/strong> Usually reproducible from packages or git, but backing up the config file is crucial.<\/li>\n<li><strong>Config:<\/strong> config.php and any additional app specific configuration, cron setups and systemd unit overrides.<\/li>\n<li><strong>Database:<\/strong> MariaDB or PostgreSQL schema and data, including apps, shares, users and access control lists.<\/li>\n<li><strong>Data directory:<\/strong> The entire \/cloud-data tree (or whatever your data dir is), including hidden files.<\/li>\n<li><strong>Encryption keys:<\/strong> Any LUKS headers, Nextcloud or ownCloud key storage, or external key files.<\/li>\n<\/ul>\n<p>The golden rule is that you should be able to build a brand new VPS at dchost.com, install the OS and base packages, restore those backups and end up with a functioning instance without manual fixes inside the database.<\/p>\n<h3><span id=\"Backup_methods_file_level_snapshots_and_database_aware_tools\">Backup methods: file level, snapshots and database aware tools<\/span><\/h3>\n<p>On a single VPS, you will usually mix two techniques:<\/p>\n<ul>\n<li><strong>Filesystem or LVM snapshots:<\/strong> You take a snapshot of the data and database volumes, then back up from that snapshot. This minimises lock time and gives you a crash consistent view of the data.<\/li>\n<li><strong>Logical database backups:<\/strong> mysqldump, Percona XtraBackup or pg_dump, ideally run while the filesystem snapshot is active or in a short maintenance window.<\/li>\n<\/ul>\n<p>Our deep dive on <a href='https:\/\/www.dchost.com\/blog\/en\/uygulama%e2%80%91tutarli-yedekler-nasil-alinir-lvm-snapshot-ve-fsfreeze-ile-mysql-postgresqli-usutmeden-dondurmak\/'>application consistent hot backups with LVM snapshots for MySQL and PostgreSQL<\/a> shows exactly how to combine fsfreeze, LVM snapshots and database tools to get safe backups with minimal downtime.<\/p>\n<h3><span id=\"Offsite_backups_to_S3_compatible_storage\">Offsite backups to S3 compatible storage<\/span><\/h3>\n<p>Once you have local snapshots or backup archives on the VPS, you need to ship them offsite. Tools like restic or Borg combined with rclone or their own S3 backends make this straightforward and efficient.<\/p>\n<p>We covered this pattern step by step in our guide on <a href='https:\/\/www.dchost.com\/blog\/en\/restic-ve-borg-ile-s3-uyumlu-uzak-yedekleme-surumleme-sifreleme-ve-saklama-ne-zaman\/'>offsite backups with restic or Borg to S3 compatible storage<\/a>. The same techniques work perfectly for Nextcloud and ownCloud. You get:<\/p>\n<ul>\n<li>Client side encryption of backup archives<\/li>\n<li>Deduplication across multiple backup runs<\/li>\n<li>Configurable retention (for example 7 daily, 4 weekly, 6 monthly)<\/li>\n<\/ul>\n<h3><span id=\"Ransomware_resistant_backups\">Ransomware resistant backups<\/span><\/h3>\n<p>Nextcloud and ownCloud are attractive targets for ransomware: attackers know they hold valuable files. That is why at dchost.com we strongly recommend at least one layer of <strong>immutable<\/strong> backup storage.<\/p>\n<p>If your offsite backup target is an S3 compatible service that supports object locking, you can enable write once, read many semantics and time based retention. That means even if an attacker compromises the VPS and the backup credentials, they cannot delete or alter past backup objects until their retention window expires. Our article on <a href='https:\/\/www.dchost.com\/blog\/en\/s3-object-lock-ile-fidye-yazilima-karsi-kale-gibi-yedek-versioning-mfa-delete-ve-geri-donus-testlerini-samimi-samimi-konusalim\/'>ransomware proof backups with S3 Object Lock<\/a> explains how to configure versioning, Object Lock and MFA delete in practice.<\/p>\n<h3><span id=\"Testing_restores_and_writing_a_simple_DR_plan\">Testing restores and writing a simple DR plan<\/span><\/h3>\n<p>The only backup that matters is the one you can restore under pressure. For a serious Nextcloud or ownCloud setup we suggest:<\/p>\n<ul>\n<li>Quarterly test restore into a separate test VPS using production like data sizes.<\/li>\n<li>A short, written runbook: where backups live, how to get credentials, in what order to restore database vs data directory.<\/li>\n<li>Documented RPO (how many hours of data you can afford to lose) and RTO (how long a full restore can take).<\/li>\n<\/ul>\n<h2><span id=\"Security_Hardening_for_a_Nextcloud_or_ownCloud_VPS\">Security Hardening for a Nextcloud or ownCloud VPS<\/span><\/h2>\n<p>Even perfect storage and backup design will not help if the VPS is wide open. Thankfully, a handful of proven hardening steps dramatically reduce the risk profile of a Nextcloud or ownCloud deployment.<\/p>\n<h3><span id=\"Base_VPS_hardening\">Base VPS hardening<\/span><\/h3>\n<p>We recommend going through a full hardening checklist on day one. That includes:<\/p>\n<ul>\n<li>Disabling direct root SSH logins and using key based authentication only<\/li>\n<li>Restricting SSH to specific IPs where possible<\/li>\n<li>Enabling a firewall (ufw, firewalld or nftables) to allow only SSH and HTTPS<\/li>\n<li>Installing Fail2ban to block brute force attempts on SSH and the web login page<\/li>\n<li>Keeping the OS and PHP packages regularly updated<\/li>\n<\/ul>\n<p>Our detailed <a href='https:\/\/www.dchost.com\/blog\/en\/vps-guvenlik-sertlestirme-kontrol-listesi-sshd_config-fail2ban-ve-root-erisimini-kapatmak\/'>VPS security hardening checklist<\/a> walks through these settings on a typical Linux VPS. For Nextcloud and ownCloud, you simply add the application specific pieces on top.<\/p>\n<h3><span id=\"Web_server_and_PHP_security_for_Nextcloud\">Web server and PHP security for Nextcloud<\/span><\/h3>\n<ul>\n<li>Use separate vhosts or server blocks for Nextcloud, with a dedicated system user owning the files.<\/li>\n<li>Limit PHP extensions to what Nextcloud or ownCloud actually require.<\/li>\n<li>Set appropriate PHP limits (memory_limit, upload_max_filesize, post_max_size) based on the largest file size you expect, as described in our guide on <a href='https:\/\/www.dchost.com\/blog\/en\/php-ayarlarini-dogru-yapmak-memory_limit-max_execution_time-ve-upload_max_filesize-kac-olmali\/'>choosing the right PHP limits<\/a>.<\/li>\n<li>Enforce security headers such as CSP, X Frame Options and Referrer Policy; our <a href='https:\/\/www.dchost.com\/blog\/en\/http-guvenlik-basliklari-rehberi-hsts-csp-ve-digerlerini-ne-zaman-nasil-uygulamalisin\/'>HTTP security headers guide<\/a> provides ready to adapt examples.<\/li>\n<\/ul>\n<h3><span id=\"Application_level_security\">Application level security<\/span><\/h3>\n<ul>\n<li>Enable two factor authentication for all admin and power user accounts.<\/li>\n<li>Use strong password policies and, where possible, integrate with LDAP or SSO.<\/li>\n<li>Review installed apps regularly; remove anything not in active use.<\/li>\n<li>Keep Nextcloud or ownCloud itself updated to the latest stable branch.<\/li>\n<li>Configure logging and alerting for suspicious logins or share changes.<\/li>\n<\/ul>\n<h2><span id=\"Three_Example_Architectures_You_Can_Borrow\">Three Example Architectures You Can Borrow<\/span><\/h2>\n<p>To make all of this more concrete, here are three reference designs we commonly use on dchost.com infrastructure. You can treat them as starting points and adjust sizes as your usage grows.<\/p>\n<h3><span id=\"1_Family_and_micro_team_cloud_up_to_10_users\">1. Family and micro team cloud (up to 10 users)<\/span><\/h3>\n<ul>\n<li><strong>VPS:<\/strong> 2 vCPU, 4 GB RAM, 200 GB SSD<\/li>\n<li><strong>OS:<\/strong> Debian or Ubuntu with ext4, single disk<\/li>\n<li><strong>Storage layout:<\/strong> Root filesystem plus separate \/cloud-data directory on the same disk<\/li>\n<li><strong>Encryption:<\/strong> HTTPS with Let\u2019s Encrypt, optional LUKS encryption for \/cloud-data<\/li>\n<li><strong>Backups:<\/strong> Daily restic backups of database dump and data directory to remote S3 compatible storage, 7 day retention<\/li>\n<li><strong>Security:<\/strong> SSH locked to keys, Fail2ban, automatic security updates<\/li>\n<\/ul>\n<p>This setup is simple, affordable and already far more robust than consumer cloud accounts when combined with good backup hygiene.<\/p>\n<h3><span id=\"2_Small_business_or_agency_2080_active_users\">2. Small business or agency (20\u201380 active users)<\/span><\/h3>\n<ul>\n<li><strong>VPS:<\/strong> 4 vCPU, 8 GB RAM, 500 GB NVMe (or more, depending on data size)<\/li>\n<li><strong>Storage layout:<\/strong> Separate virtual disks for OS (40\u201360 GB) and data (rest of capacity)<\/li>\n<li><strong>Encryption:<\/strong> LUKS encrypted data disk, full HTTPS with HSTS, optional server side encryption when using external storage providers<\/li>\n<li><strong>Backups:<\/strong> Local LVM snapshots every 4 hours, replicated nightly via restic to offsite S3 compatible storage with object locking<\/li>\n<li><strong>RPO\/RTO:<\/strong> RPO 4 hours (snapshot interval), RTO a few hours to rebuild on a new VPS<\/li>\n<li><strong>Security:<\/strong> Full VPS hardening, 2FA mandatory for admins, regular update windows<\/li>\n<\/ul>\n<p>Many agencies that already manage multiple client websites on our VPS platforms plug this design alongside their existing stacks, reusing the same monitoring and backup infrastructure. Our guides on <a href='https:\/\/www.dchost.com\/blog\/en\/ajanslar-icin-musteri-sitelerini-izleme-mimarisi-uptime-ssl-ve-domain-alarm-sistemi\/'>monitoring client websites at scale<\/a> and <a href='https:\/\/www.dchost.com\/blog\/en\/hosting-firmasi-degistirirken-dns-ve-domain-tasima-kontrol-listesi\/'>DNS and domain migration<\/a> are often part of that broader picture.<\/p>\n<h3><span id=\"3_Compliance_conscious_environment_legal_medical_finance\">3. Compliance conscious environment (legal, medical, finance)<\/span><\/h3>\n<ul>\n<li><strong>Infrastructure:<\/strong> Dedicated server or colocated hardware in a chosen dchost.com data center, with RAID 10 NVMe for primary storage<\/li>\n<li><strong>Storage layout:<\/strong> ZFS or mdraid for data disks, separate filesystem for \/cloud-data, frequent snapshots<\/li>\n<li><strong>Encryption:<\/strong> Full disk encryption on data pool, strict TLS configuration, optional client side encryption for selected folders<\/li>\n<li><strong>Backups:<\/strong> Local ZFS snapshots, replicated to an offsite backup VPS and to S3 compatible storage with object locking and long retention<\/li>\n<li><strong>Governance:<\/strong> Documented DR plan, regular restore drills, specific retention periods aligned with legal requirements<\/li>\n<\/ul>\n<p>This is the kind of architecture where our experience with <a href='https:\/\/www.dchost.com\/blog\/en\/kvkk-ve-gdpr-uyumlu-hosting-secimi-turkiye-avrupa-ve-abd-veri-merkezleri-arasinda-veri-yerellestirme-stratejisi\/'>KVKK and GDPR compliant hosting across regions<\/a> and with <a href='https:\/\/www.dchost.com\/blog\/en\/felaket-kurtarma-plani-nasil-yazilir-rto-rpoyu-kafada-netlestirip-yedek-testleri-ve-runbooklari-gercekten-calisir-hale-getirmek\/'>writing practical disaster recovery plans<\/a> becomes directly useful.<\/p>\n<h2><span id=\"Putting_It_All_Together_And_Next_Steps_on_dchostcom\">Putting It All Together (And Next Steps on dchost.com)<\/span><\/h2>\n<p>If you step back for a moment, a secure Nextcloud or ownCloud deployment on a VPS is not magic. It is the combination of a few well understood building blocks: fast and reliable storage layout, encryption at the right layers, disciplined backups with offsite copies, and solid VPS hardening with monitoring. The difference between a fragile setup and a resilient one is usually in the details you decide to document and automate.<\/p>\n<p>At dchost.com we design and run VPS, dedicated and colocation environments with exactly these concerns in mind. Whether you are just starting with a single SSD based VPS or planning a multi server private cloud with separate storage and backup tiers, the same principles apply. Define your RPO and RTO, choose a storage architecture that can grow, apply transport and at rest encryption sensibly, and treat your backups as a first class part of the system rather than an afterthought.<\/p>\n<p>If you are unsure how many vCPUs, how much RAM or which disk type you really need for your Nextcloud or ownCloud instance, or if you want a second pair of eyes on your encryption and backup plan, our team can help you design a concrete architecture on top of our VPS, dedicated or colocation platforms. Build your private cloud on infrastructure you control, with a storage, encryption and backup strategy that lets you sleep at night instead of worrying about the next disk failure or ransomware headline.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>\u0130&ccedil;indekiler1 Why Nextcloud and ownCloud Belong on a Secure VPS2 Sizing and Designing the VPS for a Private Cloud2.1 Baseline VPS resources for Nextcloud and ownCloud2.2 SSD vs NVMe and why it matters for sync performance2.3 OS, filesystem and control panel choices3 Storage Architecture for Nextcloud and ownCloud3.1 Logical layout: OS, app, database and data [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4516,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-4515","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-teknoloji"],"_links":{"self":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts\/4515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/comments?post=4515"}],"version-history":[{"count":0,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts\/4515\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/media\/4516"}],"wp:attachment":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/media?parent=4515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/categories?post=4515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/tags?post=4515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}