Installation of more than one nextcloud environment on the the same virtual server

Hi all,
I’m new on Linux and nextcloud and looking for a “How To” to configure my system for my needs.

I’m running a NC 13 environment for the domain “www.abc.com” the database and data files are organized in netxcloud/db and nextcloud/data.

In addition I like to set up data and db files for the domain “www.def.com” using the existing NC13 environment. Both domains are complete separated from each other. There ist no data migration, update or testing perspective for that.

My idea is, to modify the configuration to get folders like data_www.abc.com and data_www.def.com. the access of the right one data folder could be using different http-calls like nextcloud.abc.com / netxcloud.def.com to offer the right one data sources.

Thanks

Hi,

I think this should be possible. You need two nextcloud folders as well, because of the config.php where you would need to define specific:

  • dbtableprefix
  • trusted domains
  • datadirectory

and you need to setup the webserver to forward domain requests to the adaquate nextcloud directory. With an nginx example

server {
     listen 443 ssl http2;
     server_name 1st-cloud.domain.tld;
     root /var/www/1st-nextcloud/
     ...
     }

server {
     listen 443 ssl http2;
     server_name 2nd-cloud.domain.tld;
     root /var/www/2nd-nextcloud/
     ...
     }

The following instances could be used by both (only one needed):

  • web server
  • database
  • redis

(possible that I forgot something)