Threefold Guide: Nextcloud Redundant Deployment on Two 3node Servers

The guides can now be found here:


Note: It might also be possible to set two different subdomains and have each VM point to a single subdomain. In this case, the file can have the basic form, as shown on DuckDNS’s website (instead of using the if statement).

This way, if one server shuts down, you could reach the other server with the other subdomain, and still access the same Nextcloud instance. This might be simpler as you wouldn’t need to clear the DNS cache when the master goes offline. That being said, you might encounter issues with the Nextcloud synchronization.

There are many ways to do this. Let us know if you explore other alternatives.

The ideal situation would be having a single IP address linked to the subdomain, and that this IP address redirects to the most “online” server. This should be explored further.

The end goal of this project would be to create an flist with the redundant deployment. This would simplify the process a lot more.

An intermediary step would be to set a script (.sh) that would greatly facilitate the deployment.

Mik, awesome thread, I actually used it to setup a single Nextcloud server, personally think it’s the best tutorial out there. One things you may want to add is to change the memory limit from 128 to 512 in /etc/php/8.1/apache2/php.ini

Line 428:
; Maximum amount of memory a script may consume
memory_limit = 512M

/etc/init.d/apache2 restart

Nextcloud nags about it.

Glad to read this Robert!

I did check many tutorial on Nextcloud before writing this one so I was trying to make something relevant and efficient with the TFGrid.

I read that it should be 512 but perhaps for some installation it bugs at 128. I am not sure if this happens all the time though. I didn’t have this issue when deploying on my end (on the TFGrid).

I noticed before that (apache2?) defaults it at 128M, but the logs in Nextcloud show an error when it tries to write files about twice that size. It recommends 512M. Also makes the warning go away in your admin settings.

Ok thanks a lot.
I can’t test this in the coming days but I will try to have a look later.

Mik, I’m reading in the newsletter you’re considering setting up a manual for single Nextcloud instance. For months I’ve been trying to become a solution provider even with the help from one of your colleagues, but no one has let me know they’re capable of writting the interface into the dashboard.
I gave another presentation last weekend and cannot begin to explain how important this solution is for me, abd therefore for all of you. There’s literally dozens of people waiting for upcoming webinars in which we take them through this easy setup. It is really needed to have it become part of the playground menu. I’m open to any solution provider sharing for as long as I’m involved because of the initial idea plus the massive advertising.

Can anyone help?!

1 Like

Hi Robert,

The idea of doing the single instance guide comes from your reply above in this post where you say you already use the redundant guide for single deployment. Basically, I literally just removed texts of the redundant guide to make it into the single instance guide. There is nothing “new” in the guide. It is only much simpler.

See this PR:
See the guide itself:

I haven’t verified yet the single instance guide myself but should have the time in the coming days.

For your project on having a one-click Nextcloud deployment on the TFGrid, I think, you could do the following:

  • Make a Dockerfile out of the Nextcloud single instance guide
  • Make a docker image out of the Dockerfile
  • Use to turn the docker image into an flist
  • From there, you could easily market this with the accompanying support you could provide.The flist could also be proposed on the TF Playground.

For the solution provider aspect, the TFGrid 3.12 version will have features that should simplify the whole solution provider process and make it all much more decentralized. More information on this should come out soon.

Let me know if anything here isn’t clear.

1 Like