MIAB is very much stand-alone and self-contained. I think the short answer is “you don’t”
Of course, anything is possible with enough of your effort, but you’d be deviating from MIAB and on your own. MIAB overwrites lots of stuff during updates, so deviations from the standard install often get clobbered and can get be troublesome. @alento might know more about nextcloud and be able to assist.
Perhaps another approach would be to move your existing Nextcloud users onto a fresh MIAB. I think MIAB installs & uses only portion of nextcloud, so the practicality of this approach will depend on how much of nextcloud you use, and how customised it is.
FWIW I had a go at this, concern was that NextCloud in MIAB lags the current release. I ran two VMs, generic MIAB (background) on one and the latest NextCloud (Docker AIO) with Caddy proxy (foreground,accessible on the internet) on the 2nd . I used the NextCloud app “Snapmail” (connected back to MIAB using imap) as my mail client.
My issue was both Caddy and MIAB automatically generated LetsEncrypt certs so they needed seperate public IP addresses. On my setup MIAB would fail to renew certs because port forwading goes to Caddy. , I had to switch the port forwarding into MIAB, renew MIAB certs then put it back to Caddy. I run MIAB from home so only have 1 IP available.
So I figured had the best of both: MIAB had minimal exposure to internet (SMTP only), no changes to MIAB required, MFA on my email/NextCloud and the full NextCloud suite (latest Dockerised version).
The port forwarding was a pain so I have gone back to just MIAB standalone. I use NextCloud a lot more nowadays (very useful when travelling internationally)
I’ve been using miab for a few months now, migrated from a roll your own postfix / dovecot / z-push / nextcloud that I’ve been using for years.
I only really use the files function in nextcloud with group folders for our family, but it’s really useful.
I’ve just unlocked the nextcloud that’s embedded in miab and it’s working perfectly for me. I followed the instructions at RainLoop in Nextcloud (MIAB v0.26+ ONLY).
Old thread I know but it’s worth pointing out stock MIAB has a fully functional proxy (Nginx). All you have to do is set up a user-data/www/custom.yaml and MIAB will proxy anything you want.
(This means you only ever need MIAB to have port 80 and 443 as far as LetsEncrypt goes. It can proxy all the rest of the traffic, eliminating the need for any non-MIAB cert renewals.)
Works great for me running all kinds of things in Docker but letting MIAB handle DNS, domains, and certs. Just proxies whatever I want it to, to the individual Docker containers.
That is very interesting, potentially can solve all my external access issues and keep them under one domain. And the custom.yaml won’t be overwritten by MIAB updates.
Thank you very much for replying to an old thread
FWIW I am currently running the latest NextCloud (docker) AIO behind Cloudflare tunnel & cloudflare domain. So publicly accessible, Cloudflare is acting as the proxy. I have the MIAB NextCloud calendar shared into this Cloudflare NextCloud, works OK. I can also access MIAB in this Cloudflare Nextcloud by using Nextcloud Snappymail app. But Snappymail app is not being maintained and may be ending. Hmmm bit like where MIAB is heading I suspect
As Andrew correctly pointed out, almost everything you’re reading about here is unsupported. A lot of it is also tested BUT, don’t expect MIAB official to help out.
Maurice (above) describes how to unlock admin on stock MIAB Nextcloud so you can install apps. If all you want is a new webmail or other apps and it’s not critical that you be on the latest version, that would almost definitely be an easy route.
If that’s not enough, you already have the two servers on one Docker. You can get them to talk to each other directly instead of trying to sync two copies of calendar and email everywhere in a piece-meal style.
Kai alluded to this (above). Using the very same plugins and configuration stock MIAB uses, you could get it to talk to yours instead. But that’s probably not as reliable. I’d stick with the stock Nextcloud if that’s an option.
Btw you can proxy “pretty” domains if that’s part of the reason for the Cloudflare. I reverse proxy cloud. and mail. of the “real” domain names to MIAB, so folks recognize the domain name they’re entering.