Managing multiple Nextcloud multiple sites

hi
i need help and understanding please

i’d 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’ve been looking for that answer - but I wouldn’t 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

cheers

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: “go ask Alice, i think she’ll know”
but let’s 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’ll 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 domain.com
ContainerB to domain.info

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

You’d have to experiment with this trusted domain option ^^ to understand what will and will not work as you’d 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’ll have a better idea of how to proceed. :heart:

2 Likes

yes thanks, i’v mentioned this topic in my first post, up here
i’ve actually commented this issue on github
i’m asking if this has moved forward since 2018

lovely advices you’re mentioning here, but i’m not an advanced user -as you may guess- that’s why i’m asking for return of experience from other users, or links towards tutorials or ‘how-tos’
so far i’d know where to add trusted domains in conf file, but i have no clue of how to use docker in the context you’ve 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.
Profit.

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

Good luck.

Hello,

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

Thanks.

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’s 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’s what i’m doing now: one domain = one nextcloud
i’m searching info about: one nextcloud = multiple domains (5, 10, 22 …)

Hello,

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.

Thanks.

1 Like

this would be a good start for me
thanks!

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

1 Like

:wink:

well, if something like this depends on the functionality of the web panel, maybe you shouldn’t 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’t 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:

Hello,

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

Thanks.

Sorry, but it always triggers me when someone uses the term “industry 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/multiple-instances.md 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?

Hello,

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’s 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’s sub domains.

But these feature list and UI varies panel to panel, so can’t 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’s 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 !!

Thanks.

1 Like

that’s rock!
i’m 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 => 'my.domain1.net',
    2 => '123.777.888.99',