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
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.