Nextcloud Walkthrough

AndrewUK1990

Cadet
Joined
Jul 1, 2023
Messages
1
Hi all, relatively new to Truenas Scale and very much a noob when it comes to familiarity with Linux (it's been over a decade since I last used it).

I've recently setup a nextcloud server which I can access over LAN on a browser but it doesn't work properly via the Android mobile app as it might upload a few files then say it can't connect even when the WiFi signal is good. My main aim is to replace the Google photos app with nextcloud and use it to store and sync all mine and my wife's photos. I can't seem to enable cronjobs on the app either as it brings up an error and also not sure how to make it a secure connection and be accessible via the internet.

I've searched various forum posts and videos but can't seem to find anywhere with a clear beginner friendly step by step guide on how to go about this as anything useful I do find tends to assume you already have a good grasp of using Linux and Truenas beyond the GUI which unfortunately I don't as yet.

Any help would be greatly appreciated, thanks!
 

Sepol

Dabbler
Joined
Apr 15, 2022
Messages
12
You don't need any knowledge of Linux to make this work. Truecharts versions of apps is my choice. You need a domain, I myself went with Cloudflare also because I need their CNAMES records for this to work. You also need to set Certificates inside Truenas.
On Truecharts youtube channel you can learn how to set Let's Encrypt TLS free Certificates on TrueNAS.
This is as beginner friendly as you will get. Now you need to do your homework, ;) I have tried others methods to put Nextcloud to work and this was what worked for me.
 

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
I've documented and discussed my recent experiences setting up nextcloud in TrueNAS scale on a thread just the other day!

TLDR; the official app doesn't come with Redis memcache, which is used to speed up transactional file locking. The truecharts version no longer lets you edit the config.php, which is a non-starter if you want a reverse proxy other than one built-in to TrueNAS and using ingress.

So - since then, I've set up nextcloud in an arch linux VM (arch) running in TrueNAS scale. It takes a bit of fiddling, but I think is ultimately worth it, since you've got easier access to the config files and your data, should you want to back everything up.

The install itself was pretty straight forward.

First, set up a linux VM in TrueNAS, and install arch on it (https://youtu.be/UgkuDVaU16c).

Next, download and install the 'out of the box' package of nextcloud within your arch VM:
https://www.atlantic.net/dedicated-server-hosting/how-to-install-nextcloud-on-arch-linux/

What took longest was sorting out the various errors and warnings the 'security & setup warnings' page throws at you, and getting cron working to run the background tasks.

This all requires a lot of extra php, .htaccess, and http.conf re-configuration to be done (including installing php-legacy), not to mention I'm running behind HAproxy - which is why I couldn't use the Truecharts version any more. Getting cron to work with the different php versions, and using Redis as a mem.cache were the main challenges. With lots of help and tweaks from here (https://wiki.archlinux.org/title/Nextcloud#Background_jobs) and the nextcloud site, it all works perfectly, and you've got full flexibility in Arch to edit the needed config files in a way not easy in docker, snap, or kubernetes.

If it helps, I can post some relevant .htaccess, http.conf, php.ini and config.php settings, and a few other tips I've learned the last few days. You *do* have to be familiar with the command line, and editing using mcedit or nano (and even vi :) ) - but those are tools that haven't changed since you last used Linux >10 years ago!
 
Last edited:
Top