/nextcloud-traefik-letsencrypt-docker-swarm

Nextcloud with Let's Encrypt in a Docker Swarm

Primary LanguageShell

Nextcloud with Let's Encrypt in a Docker Swarm

Install Docker Swarm by following my guide.

Configure Traefik and create secrets for storing the passwords on the Docker Swarm manager node before applying the configuration.

Traefik configuration.

Create a secret for storing the password for Nextcloud database using the command:

printf "YourPassword" | docker secret create nextcloud-postgres-password -

Create a secret for storing the password for Nextcloud admin using the command:

printf "YourPassword" | docker secret create nextcloud-admin-password -

Clear passwords from bash history using the command:

history -c && history -w

Run nextcloud-restore-application-data.sh on the Docker Swarm worker node where the container for backups is running to restore application data if needed.

Run nextcloud-restore-database.sh on the Docker Swarm node where the container for backups is running to restore database if needed.

Run docker stack ps nextcloud | grep nextcloud_backups | awk 'NR > 0 {print $4}' on the Docker Swarm manager node to find on which node container for backups is running.

Deploy Nextcloud in a Docker Swarm using the command:

docker stack deploy -c nextcloud-traefik-letsencrypt-docker-swarm.yml nextcloud

Author

Iโ€™m Vladimir Mikhalev, the Docker Captain, but my friends can call me Valdemar.

๐ŸŒ My website with detailed IT guides
๐ŸŽฌ Follow me on YouTube
๐Ÿฆ Follow me on Twitter
๐ŸŽจ Follow me on Instagram
๐Ÿงต Follow me on Threads
๐Ÿ˜ Follow me on Mastodon
๐ŸงŠ Follow me on Bluesky
๐ŸŽธ Follow me on Facebook
๐ŸŽฅ Follow me on TikTok
๐Ÿ’ป Follow me on LinkedIn
๐Ÿˆ Follow me on GitHub

Communication

๐Ÿ‘พ Chat with IT pros on Discord
๐Ÿ“ง Reach me at ask@sre.gg

Give Thanks

๐Ÿ’Ž Support on GitHub
๐Ÿ† Support on Patreon
๐Ÿฅค Support on BuyMeaCoffee
๐Ÿช Support on Ko-fi
๐Ÿ’– Support on PayPal