Nextcloud in new virtualhost

NethServer Version: 7.3.1611
Module: nextcloud


i installed the virtualhost module and created a vhost ‘’. Now I want to install nextcloud within this vhost. When I install nethserver-nextcloud it´s installed in /var/www/html/nextcloud. Can I simply move the whole folder to “/var/lib/nethserver/vhost/nextcloud” or do I have to install nextcloud manually (not via nethserver-nextcloud)?


Hi @schweidj
if you install nethserver-nextcloud and create the virtualhost,
you can create a symlink to /var/lib/nethserver/vhost/nextcloud

ln -s /var/www/html/nextcloud/ /var/lib/nethserver/vhost/nextcloud/nextcloud

and add the new domain among those accepted by nextcloud

config setprop nextcloud TrustedDomains
signal-event nethserver-nextcloud-update

if you want the root of nextcloud in it can create a file /var/lib/nethserver/vhost/nextcloud/index.php containing::

   header ("location:");

Hi @enzoturri

thank you very much.


hi there,

is this solution still valid in nethserver 7.7 (fresh installation, no upgrade)?
The nethserver-nextcloud folder seems to be in /var/lib/nextcloud here
and there is no folder like /var/lib/nethserver/vhost also.


No need to follow this procedure. You can follow the instructions from the docs:

Please note that after the configuration of a custom virtual host, Nextcloud will no longer be accessibile from the default URL https://your_nethserver_ip/nextcloud .

If the machine is using Let’s Encrypt, remember to add the virtual host domain name to list of valid certificate domains.

config setprop nextcloud VirtualHost <VHOST>.<DOMAIN_NAME>
config setprop nextcloud TrustedDomains <VHOST>.<DOMAIN_NAME>
signal-event nethserver-nextcloud-update