Docker compose files for personal services. Some services are exposed to the Internet, others are served to the local network and any devices using Tailscale. Hosting provided by Cloudflare.
Many services mention env_file
in their compose.yml
. For security reasons these files are not checked in.
- nginx (80, 443)
- Mastodon (8010-8013)
- Jellyfin (8030)
- Calibre (8040)
- Miniflux (8050)
- N8N (8060)
- MeTube (8080)
- Homepage (8090)
- Mealie (8110)
- Visual Studio Code (8120)
- Vaultwarden (8130)
- Roher Twins (8150)
- Portainer (8160)
- Calibre (8170)
- Wallabag (8180)
- Standard Notes (8190-8192)
- Shamir's Secret Sharing Scheme (8200)
- Outline (8210)
- Draw.io (8220)
- ROMM (8230)
- FileGator (8240)
- Wastebin (8250)
- Lemmy (8260)
- LinkAce (8270)
- GitLab (8280)
- JordanRoher (8310)
- Excalidraw (8320)
- Penpot (8330)
All publicly facing websites are served via Cloudflare Tunnels. To edit them, use the Cloudflare Dashboard to enter Zero Trust. Select Access > Tunnels and manage starbase-80
. Select the "Public Hostname" tab to add a new subdomain.
Be sure to set the HTTP Host Header to subdomain.starbase80.dev
. When adding SSL sites, set the Origin Server Name to the same value and check No TLS Verify.
Run systemctl restart cloudflared
after updating any Cloudflare config. Not necessary when adding public hostnames.
Publicly facing websites should get SSL certificates from Let's Encrypt on top of Cloudflare's SSL.
- Create a new public hostname in Cloudflare Zero Trust
- Set the service to be http://localhost:80
- In
/nginx/sites
, add a new.conf
for the site- Fill out the
server listen 80
block and comment out theserver listen 443
block - Ensure the
server listen 80 location /
block ends withproxy_pass http://service_name_backend;
- Fill out the
- Modify
/nginx/compose.yml
to expose theletsencrypt_one
service and comment out theletsencrypt
service - Restart nginx:
docker exec switchboard nginx -s reload
- In
/nginx
, rundocker compose up -d
to start theletsencrypt_one
service - Check in Portainer that the
letsencrypt_one
service exited after saving the certificate - Modify
/nginx/compose.yml
to expose theletsencrypt
service and comment out theletsencrypt_one
service - Modify the
/nginx/sites/service_name.conf
file- Comment out the
server listen 80
block - Uncomment the
server listen 443
block
- Comment out the
- Restart nginx:
docker exec switchboard nginx -s reload
- Go back to Cloudflare Zero Trust and change the service to be https://localhost:443
- Set the Origin Server Name to the same value as HTTP Host Header and check No TLS Verify
If you get an error when pulling changes to nginx's sites/ folder, run this command:
sudo chown -R $USER:$USER ./nginx/sites
docker exec switchboard nginx -s reload
When adding .sh files, run chmod +x <filename>
to make them executable. Or run this from the root:
sudo find . -name "*.sh" -exec chmod +x {} \;
# Run this to edit the crontab
crontab -e -u jordan
# Add these lines to the crontab
0 2 * * * /bin/bash /home/jordan/docker-symphony/nginx/renew.sh
0 3 * * * /bin/bash /home/jordan/docker-symphony/backup-all.sh
docker exec -it container_name bash
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb
sudo systemctl restart cloudflared.service