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"