Hello DLN Forum!
I recently got an old hand-me-down desktop computer with 8 gigabytes of RAM and an old i5 processor. I love computers and linux, so I am attempting to turn this computer into a home server (More for learning more about linux/systems administration than actual day-to-day use at this point). I had a few old 500GB drives lying around and a 120GB SSD, so I am using the SSD for Ubuntu Server and the 500GB drives in a ZFS RAIDZ1 array. I am attempting to run Nextcloud and Jellyfin in containers and make them accessible from anywhere via subdomain names with certificates from LetsEncrypt. Ideally, the Jellyfin container would be able to access the media files stored in Nextcloud’s database. So far, I have setup a domain with DuckDNS, configured my router to work with it, and forwarded ports 443 and 80 to my server, which I have assigned an IP address on my home network. I have just finished installing Ubuntu Server, and am going to install docker and docker-compose on it tomorrow, but other than that, it should be ready to go.
Unfortunately, I have been unable to figure out how to construct a docker-compose.yml file that would allow me to do this (almost everything I have been able to learn so far has been from Google…). I found this example docker-compose file provided by Nextcloud on Github (docker/docker-compose.yml at master · nextcloud/docker · GitHub), but I am at a loss how to incorporate Jellyfin into it in a way that allows Jellyfin to access the Nextcloud media files and have a HTTPS connections Also, how do I incorporate the fix in the folder that contains this sample docker-compose.yml file into my final docker-compose.yml (I would post a link to it, but I am limited to two links because I am new to the forum here)?
I know that I am asking a lot! Any guides or pointers at all would be much appreciated! Also, I wasn’t sure what category to put this help request under, so if it belongs somewhere else, please let me know. Thank you so much!
Distribution & Version: I am using Ubuntu server 20.04
I use docker-compose for my containers. Let me know if you get stuck. If you’d like, give me an image you’re interested in and we’ll walk through it together. If you’d prefer, you can DM me.
I’d also recommend DLN’s Sudo Show, that’s right up their alley and they have a Matrix channel here if you want extra help.
It’s good to know the overall objective but dividing it into bite sized chunks is going to be critical to making life easy for you and anyone helping. Try to narrow it down to 1 problem (and if that’s not the right problem someone may let you know), get that solved then move to the next.
Thank you, everybody for the fast (and very helpful) responses! I have bought the Docker Deep Dive book, and plan on working through it over the summer. If I run into anything I don’t understand (either in the book or when I am building my docker-compose.yml file for the home server), I will post the problem here, as well as let you know when I have finished the server. I have been listening to the Destination Linux podcast, but I will be sure to check out the Sudo Show as well. Have a great weekend, everybody!
There’s a scheduled Sudo Handout on 5/26. I can’t make it due to timing (I’ll still be at work). But, that is a great way to meet the hosts and talk tech with others.
No one asked me, But I would like to recommend limiting your docker compose exposure and go down the single host Kubernetes route using k3s. it goes much father than just the docker ecosystem
Linux Server IO has great documentation as well. They also have a very active discord (just make sure you are in the correct channel when asking questions). I learned a lot from them.
You will want to run a reverse proxy assuming you want to access these containers off your lan. (the reason behind your duckdns) The LSIO swag container helps you do this.
My slimmed down compose file looks like this:
—
version: “3.1”
services:
When I run docker-compose up -d, I can access Nextcloud from my Duckdns domain over HTTP, but I receive a “this site refused to connected” error when I attempt to access it via HTTPS. I am planning on using self-signed certs instead of certs provided by Letsencrypt at least until I figure out how to make HTTPS work. My nginx.conf file in the container looks like this:
# nextcloud.mysecretdomain.duckdns.org
upstream nextcloud.mysecretdomain.duckdns.org-upstream {
# Cannot connect to network 'timothyc_default' of this container
## Can be connected with "timothyc_proxy-tier" network
# timothyc_app_1
server 172.19.0.4:80;
}
server {
server_name nextcloud.mysecretdomain.duckdns.org;
listen 80 ;
access_log /var/log/nginx/access.log vhost;
location / {
proxy_pass http://nextcloud.mysecretdomain.duckdns.org-upstream;
}
}
Shouldn’t the docker-compose file be telling Nginx to listen on port 443 and to use the certs provided by the omgwtfssl container? I did try to point Nginx to the omgwtfssl container by changing the “labels” section from pointing to a Letsencrypt container to the omgwtfssl container, but that seemed to make no difference. Commenting out the both of the “labels” lines didn’t either. Any guidance would be great!