geek-cookbook icon indicating copy to clipboard operation
geek-cookbook copied to clipboard

[bug report] Nextcloud cron and redis not configured correctly

Open dodrian opened this issue 2 years ago • 2 comments

🤪 Sanity check

  • [X] I have searched and confirmed no existing open/closed issues exist for this bug

1️⃣ Description

Nextcloud recipe does not describe how to correctly setup redis and cron.

2️⃣ Expected Behaviour

Nextcloud should launch with Cron and Redis configured

3️⃣ Actual Behaviour

Redis must be configured by manually editing config.php (and I believe the instructions are incorrect as they just set connection details and do not set Redis as the cache provider)

Cron must be enabled in nextcloud settings (this is not in the recipe), and default cron script does not work.

4️⃣ Steps to Reproduce

Follow recipe instructions to setup Nextcloud

5️⃣ Possible solutions

In the nextcloud.env file add this line to enable redis by default: REDIS_HOST=redis

To fix Cron:

  1. Cron service should have the same volumes mounted as nextcloud (it definitely needs the html and config volumes - I assume it needs the others too, as custom_apps can set their own scheduled jobs).
  2. Add the instruction to the recipe to change the "background jobs" config to cron at: https:///settings/admin#backgroundjobs

6️⃣ Relevant Information

Running nextcloud:24 docker image.

💬 Your Discord username

No response

💍 Engagement

  • [X] Test the changes after a preview deploy and provide feedback
  • [ ] Solicit community input in Discord
  • [ ] Submit a PR for a fix myself 🏆

✅ Code of Conduct

  • [X] I agree to follow this Geek Cookbook's Code of Conduct

dodrian avatar Jul 21 '22 19:07 dodrian

Also in nextcloud.env you should add OVERWRITEPROTOCOL=https - because nextcloud is getting unencrypted http connections behind traefik this ensures it returns any links with https, and also enables the nextcloud mobile app to work.

dodrian avatar Jul 27 '22 02:07 dodrian

Hey @dodrian , thanks for this. I'll take a stab at this shortly! :)

funkypenguin avatar Aug 11 '22 02:08 funkypenguin

Interesting, in version 24, it looks as if cron is enabled by default - I didn't have to do anything to make this work... Settings - Nextcloud 2022-08-24 14-28-23

funkypenguin avatar Aug 24 '22 02:08 funkypenguin

Hi @dodrian , this should now be fixed. Please would you review https://geek-cookbook.funkypenguin.co.nz/recipes/nextcloud/, and confirm whether I've missed anything? :)

funkypenguin avatar Aug 24 '22 11:08 funkypenguin

Closing as completed :)

funkypenguin avatar Aug 26 '22 02:08 funkypenguin