Journey to install Nextcloud on an Ubuntu Server 20.04 LTS instance.
Installed by checking nexcloud on Ubuntu installation wizard. Can be installed later with snap.
Use case : ports 80 and 443 are directed to my raspberry pi (with local IP 192.168.1.100), and domain name cloud.me.ovh must be redirected to my nexcloud server on IP 192.168.1.110
Configure proxy setting on pi (more info on private httpd repo):
<VirtualHost *:80>
ServerName cloud.me.ovh
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://192.168.1.110/
ProxyPassReverse / http://192.168.1.110/
</VirtualHost>
Add a file proxy.config.php
in folder /var/snap/nextcloud/current/nextcloud/config with following content :
<?php
$CONFIG = [
'trusted_proxies' => ['192.168.1.100'],
];
Add a file trust_domain.config.php
in folder /var/snap/nextcloud/current/nextcloud/config with following content :
<?php
$CONFIG = [
'trusted_domains' =>
[
'cloud.me.ovh',
'192.168.1.110',
],
];
No need to restart system, config is taken into account at web page reload.
Follow official instructions on Nextcloud doc
To enable mod_headers on HTTPD : a2enmod headers
sudo nextcloud.enable-https lets-encrypt
As an admin, go to Overview in the Administration panel from Settings. Nexctloud will scan your instance and give you instructions.
Talk can fail for some users behind annoying firewalls or symmetric NAT.
That can be fixed by using a TURN server.
Follow these instructions Nextcloud sync documentation.
Warning : if you use an apache proxy, use overwriteprotocol instruction to force https
in redirections.
In Ubuntu snap, you can invoke nextcloud CLI with nextcloud.occ
command.
Full documentation about OCC on official doc
First put your files in user space :
sudo cp -a Music /var/snap/nextcloud/common/nextcloud/data/jovian/files/
Then fix ownership of new folder :
sudo chown -R root:root Music
Refresh Nextcloud cache :
sudo nextcloud.occ files:scan --path="/jovian/files/Music"
Install via CLI with :
sudo -u www-data php -d memory_limit=512M nextcloud.occ app:install richdocumentscode
Official Nextcloud guide to migrate from one server to another
sudo systemctl stop 'snap.nextcloud.*'
common
and current
in /var/snap/nextcloud
to SSH user on targetsudo systemctl start 'snap.nextcloud.*'
Disable HTTPS with nextcloud.disable-https
Configure HTTPS on reverse-proxy.
Apps are not working (example from my own migration : Contacts and Tasks not working because of javascript file not found.
I had some errors after rsync
about those files. That might be related.
cat /proc/mdstat
smartctl --scan
sudo smartctl -a /dev/sdc
If one the tested disk is failing, write down its serial number and continue with the replacement procedure.
cat /proc/mdstat
mdadm --manage /dev/md0 --fail /dev/sdy1
cat /proc/mdstat
mdadm --manage /dev/md0 --remove /dev/sdy1
cat /proc/mdstat
cat /proc/mdstat
fdisk -l
-> spot the device with no partition /dev/sdz
sfdisk -d /dev/sdx | sfdisk /dev/sdz
sgdisk -R /dev/sdz /dev/sdx
then sgdisk -G /dev/sdz
fdisk -l
-> check that /dev/sdz
is partitionedmdadm --manage /dev/md0 --add /dev/sdz1
cat /proc/mdstat