User Tools

Site Tools


nextcloud_information

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
nextcloud_information [2025/02/02 20:37] mikenextcloud_information [2025/12/08 09:36] (current) mike
Line 2: Line 2:
 ---- ----
 ~~NOTOC~~ ~~NOTOC~~
-=== A high level example of interfacing with Nextcloud (docker container) === 
-  ##Open terminal in container 
-  docker exec -it nextcloud bash 
-   
-  ##Turn on maintenance mode 
-  sudo -u abc php7 /config/www/nextcloud/occ maintenance:mode --on 
-   
-  ##Backup current nextcloud install 
-  mv /config/www/nextcloud /config/www/nextcloud-backup 
-   
-  ##Grab newest nextcloud release and unpack it 
-  wget https://download.nextcloud.com/server/releases/latest.tar.bz2 
-  tar -xvf latest.tar.bz2 -C /config/www 
-   
-  ##Copy across old config.php from backup 
-  cp /config/www/nextcloud-backup/config/config.php /config/www/nextcloud/config/config.php 
-   
-  ##Now Restart docker container 
-  exit 
-  docker restart nextcloud 
-   
-  ##Open terminal in container 
-  docker exec -it nextcloud bash 
-   
-  ##Perform upgrade 
-  sudo -u abc php7 /config/www/nextcloud/occ upgrade 
-   
-  ##Turn off maintenance mode 
-  sudo -u abc php7 /config/www/nextcloud/occ maintenance:mode --off 
-   
-  ## Now Restart docker container 
-  exit 
-  docker restart nextcloud 
- 
-=== Upgrading Nextcloud running in a docker container: === 
-Login to the console of the docker host and execute: 
-  docker exec -it <docker name> updater.phar 
      
 === Disable IPv6 in Nextcloud === === Disable IPv6 in Nextcloud ===
 Edit the file /config/nginx/site-confs/default.conf and comment out the IPv6 listeners. Edit the file /config/nginx/site-confs/default.conf and comment out the IPv6 listeners.
  
-=== Suggested additions to Nextcloud config (/config/www/nextcloud/config/config.php) ===+=== Additions to Nextcloud config (/config/www/nextcloud/config/config.php) === 
 +(Note: make sure to update the xxx.xxx.xxx.xxx in the code below to the IP of the proxy)
  
   'trusted_proxies' =>   'trusted_proxies' =>
   array (   array (
     0 => 'xxx.xxx.xxx.xxx',     0 => 'xxx.xxx.xxx.xxx',
 +  ),
 +  'forwarded_for_headers' =>
 +  array (
 +    0 => 'X-Forwarded-For',
 +    1 => 'X-Real-IP',
   ),   ),
   'enable_previews' => true,   'enable_previews' => true,
Line 63: Line 32:
     9 => 'OC\\Preview\\XBitmap',     9 => 'OC\\Preview\\XBitmap',
     10 => 'OC\\Preview\\Movie',     10 => 'OC\\Preview\\Movie',
 +  ),
   'maintenance_window_start' => 1,   'maintenance_window_start' => 1,
   'default_phone_region' => 'US',   'default_phone_region' => 'US',
   'skeletondirectory' => '',   'skeletondirectory' => '',
 +
 +=== Updates to /config/nginx/site-confs/default.conf ===
 +  * Change set_real_ip_from from 172.16.0.0/12; to Proxy IP;
 +  * Ensure real_ip_header = X-Forwarded-For
  
 === Updates to Nextcloud installs to handle large files === === Updates to Nextcloud installs to handle large files ===
Line 71: Line 45:
   * Update /config/nginx/site-confs/default.conf – make sure ‘client_max_body_size’ equals 16G.   * Update /config/nginx/site-confs/default.conf – make sure ‘client_max_body_size’ equals 16G.
  
-Stop fucking pissing me off. +Bounce nextcloud (docker restart nextcloud-app) after any/all config edits.
-----+
  
-/config/www/nextcloud/config/config.php+=== Bulk actions in Nextcloud === 
 +In this example, we are deleting multiple users.
  
-Add:+Create a text file listing the accounts to be deleted, one per line.
  
-  'trusted_proxies' => +Execute the following commandreferencing the just-created file: 
-  array ( +  for i in $(cat users_to_del.txt); do occ user:delete $i; done
-    0 => '192.168.1.226', +
-  ), +
-  'forwarded_for_headers' => +
-  array ( +
-    0 => 'X-Forwarded-For', +
-    1 => 'X-Real-IP', +
-  ), +
-  'enabledPreviewProviders' => +
-  array ( +
-    0 => 'OC\\Preview\\BMP', +
-    1 => 'OC\\Preview\\GIF', +
-    2 => 'OC\\Preview\\JPEG', +
-    3 => 'OC\\Preview\\Krita', +
-    4 => 'OC\\Preview\\MarkDown', +
-    5 => 'OC\\Preview\\MP3', +
-    6 => 'OC\\Preview\\OpenDocument', +
-    7 => 'OC\\Preview\\PNG', +
-    8 => 'OC\\Preview\\TXT', +
-    9 => 'OC\\Preview\\XBitmap', +
-    10 => 'OC\\Preview\\Movie', +
-  )+
-  'maintenance_window_start' => 1, +
-  'default_phone_region' => 'US', +
-  'skeletondirectory' => '',+
  
-=====+=== Background image location ==
 +Background images are stored in the **appdata/www/nextcloud/apps/theming/img/background** directory.
  
-/config/nginx/site-confs/default.conf+----
  
-Change set_real_ip_from from 172.16.0.0/12 to 192.168.1.226/32 +==== Older information that may no longer be relevant but is kept for historical value ====
-Ensure real_ip_header X-Forwarded-For+
  
-=====+=== A high level example of interfacing with Nextcloud (docker container) ==
 +  ##Open terminal in container 
 +  docker exec -it nextcloud bash 
 +   
 +  ##Turn on maintenance mode 
 +  sudo -u abc php7 /config/www/nextcloud/occ maintenance:mode --on 
 +   
 +  ##Backup current nextcloud install 
 +  mv /config/www/nextcloud /config/www/nextcloud-backup 
 +   
 +  ##Grab newest nextcloud release and unpack it 
 +  wget https://download.nextcloud.com/server/releases/latest.tar.bz2 
 +  tar -xvf latest.tar.bz2 -C /config/www 
 +   
 +  ##Copy across old config.php from backup 
 +  cp /config/www/nextcloud-backup/config/config.php /config/www/nextcloud/config/config.php 
 +   
 +  ##Now Restart docker container 
 +  exit 
 +  docker restart nextcloud 
 +   
 +  ##Open terminal in container 
 +  docker exec -it nextcloud bash 
 +   
 +  ##Perform upgrade 
 +  sudo -u abc php7 /config/www/nextcloud/occ upgrade 
 +   
 +  ##Turn off maintenance mode 
 +  sudo -u abc php7 /config/www/nextcloud/occ maintenance:mode --off 
 +   
 +  ## Now Restart docker container 
 +  exit 
 +  docker restart nextcloud
  
-Bounce nextcloud (docker restart nextcloud-app) afterwards+=== Upgrading Nextcloud running in a docker container: === 
 +Login to the console of the docker host and execute: 
 +  docker exec -it <docker name> updater.phar
  
nextcloud_information.1738557440.txt.gz · Last modified: by mike

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki