How to upgrade an existing NC Instance with redis?

Hey everyone,

Can I upgrade an existing nc docker instance with redis by just adding a redis container to the docker compose and adding the respective environment variable into the nc docker-compose section?

I am running a NC instance for myself and my family and after some upgrades from originally nextcloud 15 to 27 it isn’t as snappy as it once was when it comes to the webui.
I tried several different things already, but before migrating to a new, fresh server i wanted to see if redis could already improve my situation.

I am running nc as docker container and am using mariadb as backend.
I am aware, that i can simply add redis as container, and that there is an environment variable in the nextcloud container. However, i only saw this being setup during the initial setup of nextcloud. That’s why i am a little afraid to break my instance (No worries, I have backups, but due to slow internet conenction it would probably take a few days to upload it to the server…).

I am thankful for any advice!

Best Botanist-Gr7een

Yes, for Redis this is fine.

Since you’re using Docker you may want to explore doing what I do… I have my production NC stack defined in one compose file. Then I have a staging NC stack in another compose file. They’re entirely independent other than running on the same physical host. I can the test upgrades and perfect configuration adjustments on the staging stack. I only push changes to the production stack that I’ve tested. Heads off a lot of issues and let’s me troubleshoot without pressure.

Fortunately Docker should make the migration to a new host fairly straightforward - when/if you opt for that - just copy over the contents of your persistent volumes (via your favorite method outside of Nextcloud) and your compose file. Swing over IPs to new bist (or update DNS, depending). Done. I’ve done it multiple times.

Thanks for the reply, then I’ll try to just add the redis environment variable and see what happens :slight_smile:

Thanks also for the idea with the staging area!
As my internet is quite slow and I am therefore hosting on a VPS with limited storage for now that’s not easily doable for me.
But maybe things will change in the future, then I’ll definitely overthink my current workflows!

1 Like