Is multi-tenancy literally this simple? Would doing the following allow one installation of mautic to work with multiple websites with no issues? (First party cookies delivered, reports, logs, etc, everything separate? – everything functioning just like separate installations of Mautic for each site?).
If so, I don’t understand all the issues / difficulties people talk about surrounding multiple containers managing multiple Mautic instances, etc, to try and do this? Or perhaps this is fine for one person running their own sites (which is what I’m looking to do), but not practical for agencies who need to keep things totally separate?
Using this approach, wouldn’t you still have all of the tenants’ data in the same tables? For example, wouldn’t the Contacts table have the contacts for every tenant? If so, I don’t think that’s a very good way (well at least not a scalable way) to do it…
I think a “true” multi-tenant application should give each tenant their own schema/tables in the database, and should limit the the number of universal tables.
I’m not an expert, just trying to research and implement … but my understanding is that if each site is using different Mautic databases (although using one Mautic install), all Mautic related information for each particular site (which would include contacts and everthing else?) would be maintained in those separate databases? In other words, the experience would be just like having separate Mautic installations for each site?
In my situation, I simply want to manage my own sites with one Mautic installation (for lower VPS requirements and costs), so I’m not concerned about keeping things truly separate, although I don’t see a problem in using this method (if indeed this method works as stated, hence the query of my post) in general for those who do want multi-tenancy and to manage all in one installation of Mautic … as it seems to me if you ever want to migrate one site to a separate server and Mautic install, you could just export the required Mautic databases and such and do that?
Just to clarify, I did not come up with the idea I linked to above. Someone referred to that in an older post and I’m just referring to it again now. Hopefully someone who has more experience will be able to join the discussion and let us know if it is indeed viable and why, perhaps, it’s not more discussed as it seems like a solution that would easily solve many mautic users desire to have one mautic install working properly for multiple websites (without the need for plugins and changing email headers and such) in order to save hosting resources.
Thanks for your comment, Joey. I was looking at your plugin which seems to seek to solve the same issue (from the standpoint of sending the emails), but this solution (if viable?) might be a way to not need a plugin, but maintain each site-specific database information separately, thus Mautic could function as it was intended (one site, and specific databases and configs only for that specific site), thus eliminating the complexities of sending emails (with proper headers for first party cookies, etc) and the need to deal with database information that shouldn’t be mixed together (maintaining site-specific contacts and data separately).
Doesn’t Mautic only have a few databases and config files (as pointed out in the above solution) that hold all the specific site / user data? If it came time to migrate, isn’t it simply a matter of gathering those few databases and config files and reverting them to the original, single-site conventions (if indeed a single site-related mautic instance was to be extracted from the pool and set on it’s own somewhere else)?
Since the solution in this proposal is a very quick and clear modification, it seems to me that, for someone more knowledgeable than me, it wouldn’t be too difficult to ensure (with future upgrades) that some new convention doesn’t impact this configuration and if it does, would probably just take a slight adjustment? If this is the case, what a benefit to the community if someone would make this clear?
I think each Mautic SAAS provider has it’s own way to manage this.
We have our own software that creates / updates / manages Mautics installed in separate LXD containers (like they would be installed on separate VPS)
You can do this manually up to 10-15 clients, but if you have over 50 it starts to be tricky, thatswhy you need a software.
This solution you provide might be okay, I have never tried it. All your Mautics will be forced to be in the same environment, and you have no chance to update just one client. You have to do all or nothing all the time.
This is similar to what I have done for our own sites (not a SaaS provider, just running our own sites). I used Proxmox, which easily allows for creating, configuring and managing LXC containers, each running Mautic, help desk software etc. It’s served our purposes nicely though I wouldn’t recommend it for anyone who doesn’t have some Linux skills.
Yep same here. Clear separation.
I don’t use proxmox due to its limitations, but if you don’t want to learn how lxc via command line works, it’s a very good alternative.
Hi Bob… I see Proxmox has a GUI. Could someone figure it out with Google and some good research?
I just tried Cyberpanel and although I love the features, (containerization, docker compatability, one click Mautic install, etc), but I kept running in to bugs (in regard to basic configurations with ssl certificates, etc) which becamse a show stopper … so I’m looking for a replacement panel that’s stable – preferably open source / free.
I can fanangle my way around with some linux commands and googling, but if it’s too deep, I’m definitely not that familiar with Linux already.
Also, with multiple instances of Mautic vs using one install, I assume the server resources require doubling for each instance? Or does it have more to do with how many contacts in each installation? I don’t mind running multiple instances with containerization, I’m just worried about the server resources required.
Hi Joey. For example, don’t three instances of Mautic installations require three installations of Ubuntu 22 (or whatever your’re running) and doesn’t that multiply your server requirements x 3 as opposed to one installation of Mautic in one instance of Ubuntu 22? Perhaps my knowledge on this is limited, but I’d love to be pointed in the right direction of how to implement it otherwise, because I’d love to run a few instances of Mautic for our non-profit and personal sites and am looking for the best way to streamline and do it. Thank you!
If you have a 4 Core, 8 GIG Server, and install 4 containers:
Haproxy to route traffic
Ubuntu 22.04 Mautic 1.
Ubuntu 22.04 Mautic 2.
Ubuntu 22.04 Mautic 3.
Then all of these will share the resources of the server. Normally you wouldn’t designate resources to each container separately.
If all your containers run heavy task simultaniously, then you see that in the resources. But normally you wouldn’t notice in case of personal and small project mautics.
Just one more note:
The +3 x Ubuntu 22.04 overhead is not significant, it’s not like they need 4x the resources.
Thanks. Yes, I realize about all processes on a server sharing server resources; I meant three separate installs of unbuntu and three separate installs of Mautic, vs one of each = more RAM and CPU’s needed … It would be fantastic if one day Mautic could operate like Matomo – able to have different databases for different websites, instead of needing separate installs on separate OS instances for more than one website. Hence my initial query about the solution in the first post… BUT, until that solution is confirmed as a good one, I’m definitely open to finding out the best way to do this… My small need thus far was able to get away with 1 core and 1gb (or was it 2, can’t remember now) of RAM.
Hi Joey. What are the limitiations you mentioned re: proxmox? And are there other GUI recomendations you’d have? PURE command line might be too big a step for me at this stage. Although occasional terminal work would be ok (with google and youtube nearby for advice).
You don’t have to have a separate machine (real or virtual) in order to support multiple mautic instances, as JoeyK stated.
Using HAProxy for this would be wicked overkill, and certainly isn’t the way I would do it. If you only have a handful of Mautic instances to host, you could just have a single (Ubuntu, Debian, whatever) VM and install Virtualmin/Webmin. If you wanted to use that server to support other VMs/containers, then sure, but if all you want to do is host some Mautic instances, there are better ways to do that, in my opinion.
Virtualmin/Webmin are open source management software used to manage Linux servers. It provides a web UI, and in the paid versions, even includes an automatic installer script to install Mautic in a few clicks. But, even without the paid version, it’s very simple to install a new instance.
One thing that it wouldn’t do, which HAProxy, or some other virtualization platform would, is things like limiting iops/memory/cpu to the individual mautic instances. You can limit the size of the database for each instance, and the amount of storage, however.