I'm relatively new to Docker, so please bear with me! I've been managing a VPS for several years, hosting multiple Nextcloud installations. My server runs on Debian, with everything set up, including users, domains via Let's Encrypt, DNS, and PHP-FPM. Each Nextcloud instance has its individual (sub)domain stored in its own user/domain directory, but they all share data directories located under /var. This setup has been working well and involves just swapping out the core files when updating, while separately backing up the data directories.
However, I noticed that each instance takes up around 850 MB for the core files alone, not including space for additional apps. I'm curious if using a Docker container could allow me to run multiple Nextcloud instances, each with its own domain, data directory, and config.php file. Has anyone successfully done this? If so, I'd love to hear how you managed it!
3 Answers
In short, no, it's not really practical to run multiple Nextcloud instances in one container. The storage layers in Docker are optimized, so they only take up disk space once per unique piece of data. Instead, consider creating separate containers for each instance and bind them to different ports!
Containers are not the same as VMs, so while technically you could run multiple Nextcloud instances from one container, it's really not advisable. It's much better to spin up separate containers for each installation. If you set up a reverse proxy like nginx, you can manage different subdomains and route traffic to each individual container without any issues.
Your question isn’t entirely clear. Why not just run each Nextcloud instance in its own container? That way, you keep things organized and manageable. Alternatively, if you're looking to save resources, you could set up Docker on different machines and share directories through an SMB share.
Related Questions
Fix Not Being Able To Add New Categories With Intuitive Category Checklist For Wordpress
Get Real User IP Without Installing Cloudflare Apache Module
How to Get Total Line Count In Visual Studio 2013 Without Addons
Install and Configure PhpMyAdmin on Centos 7
How To Setup PostfixAdmin With Dovecot and Postfix Virtual Mailbox
Dovecot Error Unknown database driver mysql