Managing multiple Nextcloud multiple sites

i need help and understanding please

i鈥檇 like to know if it would be possible to install NC on one server (actually with HESTIA PANEL) and make a separate usage between several domains, with distinct databases and users?

thanks a lot if you can give me an opinion on this, i鈥檝e been looking for that answer - but I wouldn鈥檛 be able to set it all up myself though - as i read markc did it: Single codebase for multiple vhosts 路 Issue #7802 路 nextcloud/server 路 GitHub
is it still at work? multiple separate instances for one source dir by phlb 路 Pull Request #16424 路 owncloud/core 路 GitHub


This is a question for Hestia. Try asking them. Nextcloud is a lamp stack, so ask them if this is do-able.

funny, they said the same thing: 鈥済o ask Alice, i think she鈥檒l know鈥
but let鈥檚 say there is no panel, just a plane ubuntu
how to do?

You are using a hosted panel, yes?

That is outside our normal field of support, no different from something like Cpanel. It is designed as a management tool, so you would consult their documentation for how to set this up in order to manage the database, PHP, etc.

This is why you would be asking them. If you have some sort of linkable dialogue with them, could you post it here?

It is also difficult to help you here since we have barely any posts in relation to hestia. Any further information appreciated.

thanks @just
i want to do it on another server i have, no panel
how to?

Read your links and this is a super advanced and totally unsupported setup. You鈥檒l want to ask for more info at Single codebase for multiple vhosts - #8 by markc

@punkyard Not to confuse you, but the method I know of for managing multiple Nextclouds is to use VM or Docker containers. Each would be separate for sanity and easy management.

One Server with docker or similar
ContainerA to
ContainerB to

You could also play with adding multiple trusted domains to one server. for same server

You鈥檇 have to experiment with this trusted domain option ^^ to understand what will and will not work as you鈥檇 hope. It is very simple to setup.

If unsure, try starting by adding additional trusted domains or spinning up a secondary instance on the same server with containers. Then you鈥檒l have a better idea of how to proceed. :heart:


yes thanks, i鈥檝 mentioned this topic in my first post, up here
i鈥檝e actually commented this issue on github
i鈥檓 asking if this has moved forward since 2018

lovely advices you鈥檙e mentioning here, but i鈥檓 not an advanced user -as you may guess- that鈥檚 why i鈥檓 asking for return of experience from other users, or links towards tutorials or 鈥榟ow-tos鈥
so far i鈥檇 know where to add trusted domains in conf file, but i have no clue of how to use docker in the context you鈥檝e just mentioned :sweat_smile:
thanks a lot @just

This is the discussion on the forum, not github.
I was confused because of what you linked. Forgot all of that if you want a working Nextcloud setup.

Learn how to install Docker on Ubuntu.
Install Nextcloud in Docker.
Install a second Nextcloud in Docker.
Configure them as you see fit.

This will get you where you want go, because you are saying you must be running two Nextclouds on the same server.

Good luck.


I am not an expert on this subject but it should be a simple task with web based control panels.

NextCloud Documentations says it does support script based web installer 鈫 Installation on Linux 鈥 Nextcloud latest Administration Manual latest documentation

So in your Control Panel,

  1. Create / Add the multiple domains (so they will have their separate public directories)
  2. Create New Database for each domain along with DB user and attach those respective users to their corresponding database
  3. Use your file manager to upload that setup-nextcloud.php as mentioned by the link avobe into the public directories of those respective domains

Now you can visit your respective domain.tld/setup-nextcloud.php via browser and follow the setup wizard for each domain

All these nextclouds are going to run as standalone individual instances per domain !!


I use Linux containers on Ubuntu instead of Docker, and manages it all with LXD Mosaic. However if you wanna do something smart and has a dedicated host to use as the management server, use Proxmox for powerfull and feature rich management of multiple Linux Containers with Nextcloud instances. Using LXC instead of docker, you limit the overhead of resource consumption, unless ofcourse using the containers for VM鈥檚 instead of LXC native images.

LXD Mosaic has the benefit that it can manage LXD and LXC across an infinite amount of hosts, using the LXD API on each host, so you can migrate, move, copy, exspand with more nodes and automate all your manage tasks, from one web interface.
Monitoring resource consumptions, automating snapshotting aswell as automated backup and restore tests, and much more.

thanks NaXaL
that鈥檚 what i鈥檓 doing now: one domain = one nextcloud
i鈥檓 searching info about: one nextcloud = multiple domains (5, 10, 22 鈥)


Not sure about how to do it with your specific web hosting control panel, but in some industry leading standard web panels like cPanel or DirectAdmin, you can simply create unlimited (provided your hosting plan allows that) sub domains as alias and point them to a single public directory (in this case, your nextcloud subdmain).

Now if you edit the NextCloud config file to add all these domains as trusted domain, they all will work with that single NextCloud installation.


1 Like

this would be a good start for me

it wouldn鈥檛 separate datas and databases for each domain
but until i find out how to do so, you鈥檙e suggestion will be every useful to me :+1:

1 Like


well, if something like this depends on the functionality of the web panel, maybe you shouldn鈥檛 use one then. Regardless if you call it industy leading or not. :wink: With a standard Apache installation I can add as many ServerAliases I want.

But this does not help the OP. Sure if he is adding more domain names, he can connect to his Nextcloud using x different domain names. But they will always connect to the exact same Nextcloud instance. If he wants a separation of the instances by domain name, he needs to setup multiple instances, as you already have explained.

Whether he can do that depends primarily on the hosting plan he uses (number of databases, number of domain names included in the plan) and less on whether his provider uses an industy leading webpanel or not. And if he has installed Hestia himself on a VPS he won鈥檛 have such limitations. I guess with every web panel, industry leading or not, you should at least be able to create additional databases and additional web roots / virtual hosts. Otherwise there would be no point in using such a panel :wink:


Is Windows an industry leading OS?

Depends on which aspect I am comparing it. I may argue about security, customizability, functionality but when it comes to market share, numbers speak for themself. cPanel or DirectAdmin is having overwhelming market share on shared web hosting space.

Secondly, start of this topic is about Web Control Panel based installation and working of the same, so it鈥檚 off topic to discuss about whether to use it or not.

I agree with you.

If I am to use NextCloud in a VPS, there is no point for me to install a panel and then install NextCloud on top of that

But it鈥檚 not me who is doing it. OP may have his/her own reasons and that is exactly what Open Source software helps to archive. Need based usage as per individual requirements !!

NextCloud officially supports installation in a Panel based setup, so if some one wishes to take that route, fine enough. Personally, no point of me trying to portray my way is the right way mentality.


Sorry, but it always triggers me when someone uses the term 鈥渋ndustry leading鈥 :wink:

But my actual point was that OP has to understnad the concept of how Nextcloud works and how seperate domains can be used with Nextcloud, which you already explained correctly.

One Nextcloud instance can be accessed with multiple domain names. But then every user can use any of the domains to log in. Which means no seperation by domain. If he wants seperation, he has to setup multiple Nextcloud instance with seperate databases. And this has nothing to do with the webpanel he uses, because all webpanels can manage multiple virtual hosts and databases. This is absolutely the most basic function of any web hosting panel. However, most hosting plans do have limitations on how many virtual hosts and how many databases are included.

Since this whole thread is about multiple Nextcloud instances, I thought I chime in and tell that AIO can also get installed like this: see all-in-one/ at main 路 nextcloud/all-in-one 路 GitHub

1 Like

by the way, where shall i create these aliases? create their DNS entries (in cloudflare for instance)? add them to the domain in my panel?
then add these domains/aliases in trusted domains in config.php?


I am sorry, but I have no idea about your mentioned Web Hosting Control Panel.

In general Panels are used for Shared hosting, here, you are supposed to point your domain name via NS (Name Server) entries towards this hosting server. Generally, your hosting service provider will provide you the correct NS records for your plan.

Once that is completed and updated, you can add the domain in the control panel. Different Control panel will have different UI and layout, but in cPanel and DirectAdmin, it looks like this,

Here, for example, in cPanel, you can add the domain as just an alias. So that no file system and such are created, just the domain is added to the panel (server) and DNS is managed. Domain will be pointed to another (as selected by you) domain or sub domain hosted under your user account.

Similar with DirectAdmin too鈥

Further, once the domain is added to the cPanel or DirectAdmin with it鈥檚 NS records pointing towards this server, these panels can manage the DNS of the said domain. Like for example,

You can now add CNAME / A and other DNS entries for that domain or it鈥檚 sub domains.

But these feature list and UI varies panel to panel, so can鈥檛 help you with that specific panel, I have never used that.

That is something different, incase of cloud flare, you are not pointing to your domain NS records directly towards your hosting company server. If you are coming via CloudFlare, then it becomes your domain鈥檚 DNS manager !!

Just using File Manager (in case of Panel based shared hosting) or using nano or vi command in Linux VPS you can open that file and make the necessary changes !!


1 Like

that鈥檚 rock!
i鈥檓 not there yet, but wanna ask you @NaXal
if i want to use a domains.config.php file, what to do in config.php then?
shall i delete completely the trusted domains array? or keep the localhost and IP there?

'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '',
    2 => '123.777.888.99',