Nextcloud - (library.unsprawling.org)

Hosted by @corbyn in their Delta BC Office on a Datto NAS with 16TB of redundant hard drive space.
The purpose of this setup is as a bulk collaborative storage location with allowances of multi-users, and the ability to use other apps like the trello board Deck for project management purposes.
Nextcloud runs in a Docker image by linuxserver.io under Unraid which provides 8TB of redundancy. This is backed by a MariaDB Database Docker image also provided by linuxserver.io, and the DB is cached in RAM with Redis through it’s own Docker image (TODO: switch to Valkey which is true open source).

Backup Information:

  • Data: Backblaze
  • DB: TODO Info

Config File:

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => REDACTED,
  'passwordsalt' => REDACTED,
  'secret' => REDACTED,
  'maintenance_window_start' => 1,
  'trusted_domains' => 
  array (
    0 => '192.168.0.222:8085',
    1 => 'cloud.no-bs.ca',
    2 => 'library.unsprawling.org',
  ),
  'default_phone_region' => 'CA',
  'default_locale' => 'en_US',
  'default_language' => 'en',
  'dbtype' => 'mysql',
  'version' => '30.0.4.1',
  'overwrite.cli.url' => 'https://192.168.0.222:8085',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.0.222:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => REDACTED,
  'dbpassword' => REDACTED,
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauth' => 1,
  'mail_from_address' => REDACTED,
  'mail_domain' => REDACTED,
  'mail_smtphost' => REDACTED,
  'mail_smtpport' => '465',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpname' => REDACTED,
  'mail_smtppassword' => REDACTED,
  'app_install_overwrite' => 
  array (
    0 => 'bruteforcesettings',
    1 => 'epubreader',
    2 => 'files_clipboard',
    3 => 'files_fulltextsearch_tesseract',
    4 => 'google_synchronization',
    5 => 'news',
  ),
  'maintenance' => false,
  'loglevel' => 2,
  'theme' => '',
  'updater.release.channel' => 'stable',
  'filelocking.enabled' => 'true',
  'filesystem_check_changes' => 1,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '192.168.0.222',
    'port' => 6379,
    'timeout' => 0.0,
    'password' => '',
  ),
  'upgrade.disable-web' => true,
  'defaultapp' => '',
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' => 
  array (
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
);

Nextcloud Hub 9 (30.0) Trash Bin Missing

Apps → Disabled → “Deleted Files” was disabled for some reason, had to re-enable

2 Major Outages in January

  • The first was caused by one of the 8TB drives that had begun to fail, and replacement/rebuild took longer than expected, during this, we replaced the 120GB Cache SSD with a new 240GB SSD. Restore was successful, but due to poor backup process, had to restore from Dec 29th Backup.

  • 2nd incident was a couple weeks later, the new 240GB SSD failed, replaced it with original 120GB SSD again, this corrupted the Nextcloud Database, but actual files where fine. Had to again restore from the Dec 29th backup as backup system wasn’t properly in place again


Preventative Actions

  • We re-setup the tiredofit/db-backup docker to do regular daily database backups/dumps of the mariadb nextcloud DB, will commit to do quarterly-biannual test restores and setups of the nextcloud environment.
  • Using kopia/kopia docker which replaces Duplicati as it was found to be too unreliable and error prone. This backups the Nextcloud data directory every 3 days to Backblaze with snapshots.
1 Like