Guide for SCALE Nextcloud setup with HTTPS and reverse proxy?

profzelonka

Explorer
Joined
Mar 29, 2020
Messages
67
I'll take anything I can get, of the 4 available nextcloud dockers I got 0 working, and then there's the confusion of using ingress for reverse proxy is what I read? WHAT. The more I study the more confused I am.

Closest I got was by using "Launch Docker Image" and using "nextcloud" as Image repository. (Official docker) It would load up the UI on the IP desired but I couldn't create a mysql/mariadb database to consistent error. 'localhost' seems right, I literally tried everything I could think of and at least localhost gives an error.
Previous: Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory
On messing with the environment options, now a fresh docker setup won't even start the UI on the IP, logs say apache isn't sure of the ServerName and goes with 176*something when my setup is 192*, and of course I can't set the servername in environment settings.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.16.0.228. Set the 'ServerName' directive globally to suppress this message
How is this even possible? Is the config saved somewhere? How do I clear it? I've removed the dockers every time and not even using set datasets any more. It makes no sense that something is cached somewhere??

I read that people have previously setup a VM instead of using dockers, but I really would rather not split my resources. Is a nextcloud docker setup not viable or recommended still at this point?

Any pointers, at all, would be appreciated..
 
Last edited:

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
I've installed the Nextcloud Official docker with SCALE in my lab, though not with mysql (I just used the sqllite, which is used by default).

What exactly are you trying to do? Just put a proxy in front of the Nextcloud app so you can access it from nextcloud.mydomain.com (or whatever)?

If you're fine with postgres instead of mysql, the official SCALE version of Nextcloud seems to work out of the box, though I did have an issue mapping binds how I wanted them (though that might not apply to you).
 

profzelonka

Explorer
Joined
Mar 29, 2020
Messages
67
SQLite is only recommended for development or small databases without file syncing, and for some reason Nextcloud recommends mysql over postgres as most of the development happens with mysql first. Being that nextcloud is a fast developing application it doesn't sound like a good idea to go with anything but mysql/mariadb. I already had to redo a nextcloud isntall on truenas CORE twice before, would really like to future proof this install as much as possible, but I'm open to trying it except that now the official docker isn't loading up due to the apache prompt I mentioned above. Is there cache I need to clear somewhere? I tried deleting the image (from Manage Docker Images) after deleting the dockers but get the error "DockerError(409, 'conflict: unable to delete 093e7ccba7e4 (must be forced) - image is referenced in multiple repositories')" even tho nothing is using it.

:confused: I've gotten a dozen dockers setup already, so it's not like I'm a complete beginner.

Anyone willing to throw together a quick nextcloud docker (mysql) install and type up a few steps if successful? There's gotta be something I'm missing here..
 
Last edited:

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
SQLite is only recommended for development or small databases without file syncing, and for some reason Nextcloud recommends mysql over postgres as most of the development happens with mysql first. Being that nextcloud is a fast developing application it doesn't sound like a good idea to go with anything but mysql/mariadb. I already had to redo a nextcloud isntall on truenas CORE twice before, would really like to future proof this install as much as possible, but I'm open to trying it except that now the official docker isn't loading up due to the apache prompt I mentioned above. Is there cache I need to clear somewhere? I tried deleting the image (from Manage Docker Images) after deleting the dockers but get the error "DockerError(409, 'conflict: unable to delete 093e7ccba7e4 (must be forced) - image is referenced in multiple repositories')" even tho nothing is using it.

:confused: I've gotten a dozen dockers setup already, so it's not like I'm a complete beginner.

Anyone willing to throw together a quick nextcloud docker (mysql) install and type up a few steps if successful? There's gotta be something I'm missing here..

I've spun up the default official Docker on SCALE (with sqllite, as mentioned). Admittedly, I've only ever own Nextcloud in its own VM, so I don't know much about the Docker versions.

I also know very little about Kubernetes. Probably a dumb question, but did you build a pod for mysql to use with your Nextcloud Docker?
 

profzelonka

Explorer
Joined
Mar 29, 2020
Messages
67
I also know very little about Kubernetes. Probably a dumb question, but did you build a pod for mysql to use with your Nextcloud Docker?
There shouldn't be a need, the non-truenas official docker (https://hub.docker.com/_/nextcloud) has apache and all 3 database options included (UNLESS I'M WRONG?!? :o)
When I choose host to be localhost I get "No such file or directory", while anything other than localhost says "No address associated with hostname".
How do I find out what the hostname is for mysql?

You're right tho, the official truenas app doesn;t have mysql as an option, it automatically sets up postgres. (which isn't recommended by nextcloud :\)
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
Very good video explaining how to setup nextcloud & ingress with traefik using the community truecharts version.
 

Ppriorfl

Dabbler
Joined
May 22, 2021
Messages
46
Very good video explaining how to setup nextcloud & ingress with traefik using the community truecharts version.
This video is private.
 

Heavy

Explorer
Joined
Aug 12, 2021
Messages
57
I know this will be a tad annoying, but once its set up, its set up.

1. Get Truecharts on your Truenas Scale server

2. Add your lets-encrypt certs to Truenas Scale

3. Install Traefik (This will be your reverse proxy)

4. Learn how Traefik will work with other apps

5. Get internal networking working on your server

6. View my guide on installing Nextcloud

You can skip some steps, but there's no guarantee it will work if you do. Also, once you do steps 1-5 you should never have to do those things again.. so itll be worth your while. If you need help let me know.
 

stavros-k

Patron
Joined
Dec 26, 2020
Messages
231
6. View my guide on installing Nextcloud

You can skip some steps, but there's no guarantee it will work if you do. Also, once you do steps 1-5 you should never have to do those things again.. so itll be worth your while. If you need help let me know.

Just a note, using env var for nextcloud data dir is no longer supported!
User data has been splitted into different storage, so it can be easily changed from simple(PVC) to simple(hostpath).

There's a big chance that it won't work if the env var is used.
 

Heavy

Explorer
Joined
Aug 12, 2021
Messages
57
Just a note, using env var for nextcloud data dir is no longer supported!
User data has been splitted into different storage, so it can be easily changed from simple(PVC) to simple(hostpath).

There's a big chance that it won't work if the env var is used.
Env Var definitely still works, the screenshots were taken from a running nextcloud installation.

However, I did make the changes you suggested, Thank you.
 

erie_1

Cadet
Joined
Jun 15, 2023
Messages
4
I know this will be a tad annoying, but once its set up, its set up.

1. Get Truecharts on your Truenas Scale server

2. Add your lets-encrypt certs to Truenas Scale

3. Install Traefik (This will be your reverse proxy)

4. Learn how Traefik will work with other apps

5. Get internal networking working on your server

6. View my guide on installing Nextcloud

You can skip some steps, but there's no guarantee it will work if you do. Also, once you do steps 1-5 you should never have to do those things again.. so itll be worth your while. If you need help let me know.
none of these links work anymore...
 

pleb_123

Cadet
Joined
Oct 5, 2023
Messages
4
I know this will be a tad annoying, but once its set up, its set up.

1. Get Truecharts on your Truenas Scale server

2. Add your lets-encrypt certs to Truenas Scale

3. Install Traefik (This will be your reverse proxy)

4. Learn how Traefik will work with other apps

5. Get internal networking working on your server

6. View my guide on installing Nextcloud

You can skip some steps, but there's no guarantee it will work if you do. Also, once you do steps 1-5 you should never have to do those things again.. so itll be worth your while. If you need help let me know.
we were so close to a comprehensive tutorial to set up a robust nextcloud, and now the links don't work anymore :( this is honestly driving me nuts
 
Top