Mind's Forge |
Notes »
Nextcloud Using DockerPre-thinking and researchThe past couple days I've been looking at tutorials on how to get Nextcloud running using docker and am about to give it a go myself. Ideally I'm looking for this kind of deploy: Docker compose deploy on the home server (my Void box that's currently mainly running Jellyfin) using residential ISP so we'll have to use dynamic DNS. My router is a TP-Link and includes easy access to the tplinkdns.com service, so I used that but discovered Let's Encrypt might not be able to issue a cert for it. I did a CNAME entry on one of my domain names (pointing to the tplinkdns name) and hopefully I'll be able to get a cert for that. Using Caddy to reverse proxy to the Nexcloud instance along with PostgreSQL (willing to swap this out for MariaDB). I've been looking over this tutorial while figuring out docker and docker-compose. It seems like he's running an Apache container and then reverse proxying to Caddy from Apache... seems like overkill, but maybe he had trouble getting the 'fpm' tagged container working. I'm going to attempt to use the This guy's recipes seem to align more with how I think: blazekjan's Docker compose github and his Caddy Docker proxy compose Actual stepsInstalled docker and enabled the docker service on the Void server
cd nextcloud wget https://raw.githubusercontent.com/blazekjan/docker-selfhosted-apps/main/nextcloud/compose.yaml vim compose.yaml filling in db user/pass for Postgres and Redis. Signed up for SendGrid and got an API key
~docker magic~ it's pulling, extracting, containerizing... error:
Looks like we need to create a docker network labeled caddy first:
Running the compose up command again worked, now on to the caddy container: cd ../caddy wget https://raw.githubusercontent.com/blazekjan/docker-selfhosted-apps/main/caddy-docker-proxy/compose.yaml vim compose.yaml created the .env file in the caddy dir, with the DOCKERDIR variable
And it's started! Now to get NAT firewall setup to let traffic through ufw allow http ufw allow https also followed instructions for editing the Restarting the server to see if we can get the HTTP cert through... Looks like the cert has been acquired and it's serving up an error: Internal Server Error The server encountered an internal error and was unable to complete your request. Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report. More details can be found in the server log. Looking at the nextcloud logs in
I fiddled around, but still kept getting the same error, trying to swap Postgres for MariaDB Swapped Postgres out for Maria and realized the nextcloud.log file wasn't updating, there were only 2 lines and when I deleted the file, it didn't come back... turns out my "fiddling" didn't do anything because I had old data in the volumes, after deleting the volumes and running my mariadb edited docker-compose, it worked! 6/4/23:
To access your Nextcloud instance locally just add an entry in your The entry should resolve your CNAME domain that points to your dynamic DNS (or your DDNS name if you were able to get a LE cert) to your local IP like so: ExtrasDocker recipesnuke it all: restart it all: |
Page last modified on July 11, 2023, at 04:08 am |