# Nexctloud Journey to install Nextcloud on an Ubuntu Server 20.04 LTS instance. ## Install Installed by checking _nexcloud_ on Ubuntu installation wizard. Can be installed later with **snap**. ## Configure proxy _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): ```apache ServerName cloud.me.ovh ProxyPreserveHost On ProxyRequests Off ProxyPass / http://192.168.1.110/ ProxyPassReverse / http://192.168.1.110/ ``` Add a file `proxy.config.php` in folder _/var/snap/nextcloud/current/nextcloud/config_ with following content : ```php ['192.168.1.100'], ]; ``` ## Trust domain Add a file `trust_domain.config.php` in folder _/var/snap/nextcloud/current/nextcloud/config_ with following content : ```php [ 'cloud.me.ovh', '192.168.1.110', ], ]; ``` No need to restart system, config is taken into account at web page reload. ## Enforce security ### On proxy Follow [official instructions on Nextcloud doc](https://docs.nextcloud.com/server/latest/admin_manual/installation/harden_server.html) To enable *mod_headers* on HTTPD : `a2enmod headers` ### On snap installation `sudo nextcloud.enable-https lets-encrypt` ## Other fixes As an admin, go to _Overview_ in the _Administration_ panel from _Settings_. Nexctloud will scan your instance and give you instructions. ## TURN Talk Talk can fail for some users behind annoying firewalls or symmetric NAT. That can be fixed by using a [TURN server](https://nextcloud-talk.readthedocs.io/en/latest/TURN/). ## Synchronisation on Android Follow these instructions [Nextcloud sync documentation](https://docs.nextcloud.com/server/20/user_manual/en/pim/sync_android.html). Warning : if you use an apache proxy, use [overwriteprotocol](https://docs.nextcloud.com/server/12/admin_manual/configuration_server/config_sample_php_parameters.html#proxy-configurations) instruction to force `https` in redirections. ## Use OCC In Ubuntu snap, you can invoke nextcloud CLI with `nextcloud.occ` command. [Full documentation about OCC on official doc](https://docs.nextcloud.com/server/20/admin_manual/configuration_server/occ_command.html) ### Migrate data by CLI First put your files in user space : ```sh sudo cp -a Music /var/snap/nextcloud/common/nextcloud/data/jovian/files/ ``` Then fix ownership of new folder : ```sh sudo chown -R root:root Music ``` Refresh Nextcloud cache : ``` sudo nextcloud.occ files:scan --path="/jovian/files/Music" ```