August 11, 20223 yr Project: https://nextcloud.com/Original image: https://hub.docker.com/_/nextcloudCustom image used for this template: https://hub.docker.com/repository/docker/kilrah/nextcloud-ffmpeg What is Nextcloud?A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms. Why yet another?There are several Nextcloud templates on unraid already, but none integrate ffmpeg to allow for video thumbnail generation and usage of the video conversion apps available in Nextcloud's App Store.The existing template for the official Nextcloud image is confusing and does not include some basic entries e.g. for the web port.The official image seems to be quite a bit faster than some 3rd-party builds.I'm hoping to be able to provide some extra tips and tricks in this support thread.It now also supports VAAPI for Intel and AMD video transcoding in the memories app, and includes PDLIB for the "Face Recognition" app.Now patched for preview support of iOS 18 HEIC files. This template defaults to pulling my image that is built from the official "latest" image and additionally installs ffmpeg, no other change. Should you not care for that (ffmpeg adds about 450MB to the image) and just want an easy template it can also be used with the official image, just change "Repository" from "kilrah/nextcloud-ffmpeg" to "nextcloud". User/groupThis container by default uses Nexctloud's default user id of 33 as a choice because if you have to look up troubleshooting information the commands you'll find will be based on that assumption. If you plan to share existing data from your server without using the "external storage" NC app it may be useful to use Unraid's standard owner of nobody:users. If you wish to do so add --user 99:100to the Extra Parameters field in the template (enable Advanced display to see it). Basic installation:Change the Repository if neededChoose the port you wish to use for the web interface Choose your appdata directory should you wish something other than the default, this is where Nextcloud's code and configuration will liveChoose your user data directory if desired. If you expect to store lots of data in your instance you will probably want to create a dedicated unraid share and select it there. Click Apply. The container will be created and started. Note that on the first run it may take a couple of minutes before the web UI is available. First steps:On the first access Nextcloud will have you create an admin account and select a database type. By default it will choose a SQLite database which requires no further configuration but as mentioned on the page is not recommended especially if you are going to use desktop clients. I use MariaDB-Offical:When going to install it choose a database name, user and password, create the container, and in Nextcloud's interface enter the same details, choosing your server's IP for "Database Host" instead of "localhost". If you already have a compatible database container that you wish to reuse you can use your favorite tool like phpmyadmin or adminer to connect to it and add a new database. Configuration tips:To use the video thumbnail capabilities nextcloud needs to be told to do so by enabling the relevant preview providers in its config file (in appdata/config/config.php), if you have Unraid 6.10+ and Dynamix File Manager you can edit it directly from the Unraid GUI. The relevant documentation is here:https://docs.nextcloud.com/server/22/admin_manual/configuration_server/config_sample_php_parameters.html#previewsThe config.sample.php that is present in the same folder is well documented and also a good reference. You might want to define a larger than default preview_max_memory if needed, along with increasing the PHP memory limit with -e PHP_MEMORY_LIMIT=XX in the template's Extra parameters. I use 1G for both to be sure previews can be generated for huge images. My relevant config: 'enable_previews' => true, 'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\TXT', 1 => 'OC\\Preview\\MarkDown', 3 => 'OC\\Preview\\Image', 4 => 'OC\\Preview\\Photoshop', 5 => 'OC\\Preview\\TIFF', 6 => 'OC\\Preview\\SVG', 7 => 'OC\\Preview\\Font', 8 => 'OC\\Preview\\MP3', 9 => 'OC\\Preview\\Movie', 10 => 'OC\\Preview\\MKV', 11 => 'OC\\Preview\\MP4', 12 => 'OC\\Preview\\AVI', 13 => 'OC\\Preview\\HEIC', ), 'preview_max_memory' => 1024, 'preview_max_x' => NULL, 'preview_max_y' => NULL, 'preview_max_filesize_image' => 400, Companion container:Project: https://github.com/rcdailey/nextcloud-cronjobImage: https://hub.docker.com/r/rcdailey/nextcloud-cronjob The official Nextcloud image needs an external trigger for its scheduled task processing. The Nextcloud-cronjob container is provided for this purpose. Install it making sure to specify your Nextcloud container's name correctly if you changed it from the default. Note that the cronjob container needs to be started after the main NC container, use startup order or rename as required. Then make sure "Cron (Recommended)" is selected for the Background Jobs option in your nextcloud instance's Basic Settings. It can be used for other Nextcloud containers provided the settings are set appropriately in the Advanced section. For example with the LSIO container:Set NEXTCLOUD_EXEC_SHELL to shSet NEXTCLOUD_EXEC_USER to abcCreate a folder mapped to Scripts path and place a script e.g. lsio.sh in it, containing php -f /config/www/nextcloud/cron.php Updates:One confusing thing with the official Docker image is that Nextcloud will notify you when a new version is available and tell you to go to settings and use the "Open Updater" button, but this does nothing. For some reason they have not hidden it in the Docker environment, but disabled its functionality with new versions actually being provided through container updates. It usually takes a couple of days for a new container to be published after the availability of the Nextcloud update so we just have to live with the notification in the meantime. Running occ commands in the container:Use Unraid's terminal and run the command likedocker exec -u 33 Nextcloud-ffmpeg sh -c "php occ maintenance:mode --on" Of course replacing the container name if you used something else. Hardware transcoding support: Add an extra Device to the template, "/dev/dri" then run Memories' occ video configuration command. Of course you need the driver plugin for your Intel/AMD GPU plugin installed on Unraid. Support for Intel may be limited to 10th gen and older, don't have anything to validate. Edited May 26, 20251 yr by Kilrah
August 11, 20223 yr Author Performance tweaks Using cache as appdata mountpointIf you have an SSD cache and it is big enough to hold the appdata (up to about 2GB if you have the user data separate, depends on installed apps), it helps to set the Application data path to /mnt/cache/xxx instead of /mnt/user/xxx.The template defaults to user for compatibility.Since Unraid 6.12 the recommended solution is to use the Exclusive share feature. Enable it in global share settings, set your appdata share to be on pool only and make sure the share only exists on said pool. That will cause /mnt/user/appdata to be accessed directly with no performance penalty. Using Redis ValkeyUsing a cache database can improve browsing responsiveness pretty significantly.Redis is now dead with no more community versions provided, but Valkey is a compatible replacement.I use the SnuK template: https://forums.unraid.net/topic/186953-support-valkey/Install it, then add the following to your nextcloud config.php: 'memcache.distributed' => '\\OC\\Memcache\\Redis', 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => 'server_ip', 'port' => 6379, 'password' => '<yourpassword>', ), substituting IP as necessary. Password is optional, if desired the Valkey template needs to have a variable added:Desktop client settingsThe desktop client has per-account bandwidth limit settings that default to "limit automatically", which can be excruciatingly slow especially on large number of files. Set it to No Limit to avoid that. Edited October 5, 2025Oct 5 by Kilrah
August 14, 20223 yr Fresh install of the app After adding uername and clicking install Error Your data directory is readable by other users. Please change the permissions to 0770 so that the directory cannot be listed by other users.
August 14, 20223 yr Author Is that with a separate data share? What DB? I just tried setting a fresh copy both with and without a separate data share and sqlite and didn't get any error Edited August 14, 20223 yr by Kilrah
October 9, 20223 yr Author I would expect it to, give it a try and look at nextcloud-cronjob's log output, it should be pretty clear whether it's happy or not, then confirm on nextcloud's basic settings page.
October 12, 20223 yr Author On 10/8/2022 at 2:40 PM, Masterwishx said: Nextcloud-cronjob working with nextcloud from linuxserver ? I just tried it on a fresh LSIO install, and it does work albeit with some tweaking. I added the necessary option to the template and instructions to the first post. That said the built-in cron in the LSIO container should work just fine on its own... don't know what makes it break so often on updates. Was also a reminder of how ungodly slow it is
October 14, 20223 yr On 10/12/2022 at 7:52 PM, Kilrah said: I just tried it on a fresh LSIO install, and it does work albeit with some tweaking. I added the necessary option to the template and instructions to the first post. That said the built-in cron in the LSIO container should work just fine on its own... don't know what makes it break so often on updates. Thanks for your work, i will check it when will have more time ... for now, i just using the simple script in user scripts for update apps only 'docker exec -i nextcloud occ app:update --all' but for more cron stuff need more scripts or your container ...
October 25, 20223 yr Author Nextcloud 25 is now out, but given that as usual with major releases s bunch of apps are not compatible yet I'll keep the latest tag on 24. If you want to upgrade you can change repository in the template to kilrah/nextcloud-ffmpeg:25. For more version info see the 2nd post in the thread.
October 28, 20223 yr On 10/25/2022 at 10:55 AM, Kilrah said: Nextcloud 25 is now out, but given that as usual with major releases s bunch of apps are not compatible yet I'll keep the latest tag on 24. If you want to upgrade you can change repository in the template to kilrah/nextcloud-ffmpeg:25. For more version info see the 2nd post in the thread. Wouldn't it be best to keep it on the same version as the official Docker image? IIRC Nextcloud doesn't support downgrading, so a user wouldn't be able to switch from the official image to this version unless they specify the 25 tag.
October 28, 20223 yr Author I think there's no perfect solution like on most of the major upgrades... a conscious user should already not be on latest on the official one for that precise reason, it may be updated to a new version with breaking changes at anytime with no warning. I'd think favoring existing users of this container is more important, and I used not to have the specific version tags until last post so latest was all they had to choose from. I've added the version note to dockerhub. A few of the apps I use have been upgraded in the past couple of days so the transition period shouldn't be too long. One of my most important ones doesn't though... Edited October 28, 20223 yr by Kilrah
November 23, 20223 yr <initial issue fixed, new issue however.> EDIT 2: Second issue also fixed, it was my HTTPS everywhere add-on for firefox messing with nextcloud, all is running and working. Now I just need to get the reverse proxy working and should be good! Edited November 24, 20223 yr by kftX both issues fixed.
December 3, 20223 yr Author As a heads up, I'll flip latest to 25 when 25.0.2 is released in a few days
December 8, 20223 yr Not sure what to post in here. I am trying to get cron jobs setup for Nextcloud in Unraid. I thought I had the settings in but Nextcloud keeps saying jobs are not running and looking at the logs it doesn't appear things are working as well. I know you are going to want to see something, tell me what and how to get it to you and I can do that. One error that keeps popping up in the app logs is this Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [14] unable to open database file in /var/www/html/lib/private/DB/Connection.php:139 So - I got past that error and now I am getting the following, I am guessing there is a path variable that I am missing ------------------------------------------------------------- Executing Cron Tasks: Thu Dec 8 01:24:00 UTC 2022 ------------------------------------------------------------- > Nextcloud Container ID: 2057ca735f0d > Running Script: ./run-cron-php.sh Could not open input file: /var/www/html/cron.php > Done Edited December 8, 20223 yr by bluepoet
December 8, 20223 yr Author Please clarify your exact setup, which container(s), tag if any, what kind of database you're using etc...
December 8, 20223 yr I have tried all three versions of the next cloud - my container name is Nextcloud, for the database I finally installed is mariadb. The version of nexcloud I have currently is the official version by knext666's repository. This is also through unraid. I am no opposed as well to remove everything and start from scratch again. I think permissions are all off on things now as well. Edited December 8, 20223 yr by bluepoet
December 8, 20223 yr I got it working - I have to create a shared drive and then I installed everything to that drive and the magic started to happen
December 10, 20223 yr Hi, how would I go about fixing: > Running Script: ./run-cron-php.sh Cannot write into "config" directory! This can usually be fixed by giving the web server write access to the config directory. Thanks.
December 11, 20223 yr The new version supports object recognition, but requires Node.js. Is there a way to make this work? https://apps.nextcloud.com/apps/recognize https://nextcloud.com/blog/press_releases/nextcloud-hub-3-release-ai-photos/
December 11, 20223 yr Author The app comes with its own bundled nodejs and as far as I can see already works fine that way.
December 13, 20223 yr So i have another issue that came up, well two and not sure how to resolve them. I tried to follow the documents but with it in a docker - the commands just dont work. Issue 1: Have a ton of image files on my server and some movie files as well from like phone video recordings. Some pictures will show an thumbnail image, others do not and the video files never show any images. I upped my memory cache to 1G which at least allows me to open the files, before it wouldn't even do that. Any way to get the thumbnails to come up for the other files? Issue 2: Picture files are very slow to load up, any way to speed that up? Issue 3: It said there was an update, I updated and now I am getting a database is missing indexes and it says to run a command to fix it. Tried to run the command but it doesn't work, any suggestions on how to fix this. Any help would be appreciated. Running unraid 6.11.5, Ryzen 5, 5600 with Radeon Graphics, 8 GB ram which I am thinking of bumping that up. Also for the cron job, should it be run more then every 15 minutes, is there any negative to doing it every minute or 5 minutes per say? Edited December 13, 20223 yr by bluepoet
December 13, 20223 yr Author For video thumbnails you need to be using this container (kilrah/nextcloud-ffmpeg), you can put that in your template as repository instead of what you already have. That is the whole point of this container/thread. Then you need to enable video previews in nextcloud config, see first post. 6 hours ago, bluepoet said: Issue 2: Picture files are very slow to load up, any way to speed that up? If you're talking of generating the previews not really, if they're large images that's a lot of processing. There's a "preview generator" app in nextcloud apps that you can use to pre-generate them, might help. 6 hours ago, bluepoet said: Issue 3: It said there was an update, I updated and now I am getting a database is missing indexes and it says to run a command to fix it. Tried to run the command but it doesn't work, any suggestions on how to fix this. How to run commands in the container is mentioned at the end of the first post. 6 hours ago, bluepoet said: Also for the cron job, should it be run more then every 15 minutes, is there any negative to doing it every minute or 5 minutes per say? I have it at 5 minutes myself, should be fine. Edited December 13, 20223 yr by Kilrah
December 13, 20223 yr On 12/11/2022 at 11:16 PM, Kilrah said: The app comes with its own bundled nodejs and as far as I can see already works fine that way. That's strange. It can not be found on me? root@ae995bd20a60:/# node -v bash: node: command not found In the Nextcloud settings you can also set a path to the Node.JS. I just don't know where that should be?
December 13, 20223 yr Author 3 minutes ago, TuxWolfgang said: In the Nextcloud settings you can also set a path to the Node.JS. I just don't know where that should be? I installed the app and it just worked, this is what it set by default, the full path is needed:
December 13, 20223 yr I don't understand. The file seems to exist, but cannot be executed: root@ae995bd20a60:/# /var/www/html/custom_apps/recognize/bin/node -v bash: /var/www/html/custom_apps/recognize/bin/node: No such file or directory root@ae995bd20a60:/# cd /var/www/html/custom_apps/recognize/bin/ root@ae995bd20a60:/var/www/html/custom_apps/recognize/bin# dir node x64.tar.gz root@ae995bd20a60:/var/www/html/custom_apps/recognize/bin# ./node -v bash: ./node: No such file or directory root@ae995bd20a60:/var/www/html/custom_apps/recognize/bin# /node -v bash: /node: No such file or directory root@ae995bd20a60:/var/www/html/custom_apps/recognize/bin# node -v bash: node: command not found
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.