Securing Your Spwig Server with SSL and Automated Backups

Here’s how I secure my Spwig instance on Hetzner:

SSL Setup

  1. Go to Settings > Site Settings > Domain & SSL
  2. Enter your domain and select Let’s Encrypt
  3. Input your admin email (critical for renewal alerts)
  4. Spwig handles certificate verification, NGINX config, and auto-renewal

*My Hetzner setup requires port 80 to be open for Let’s Encrypt validation. I recommend using the default Docker Compose setup which includes NGINX reverse proxy with SSL termination.

Automated Backups
I use a cron job to run daily backups:

0 2 * * * /usr/bin/docker-compose -f /path/to/spwig-compose.yml exec db pg_dump -Fc -U spwig_user spwig_db | gzip > /backups/spwig-db-$(date +%Y%m%d).dump.gz

*Store backups on Hetzner storage with rsync:

rsync -avz /backups/ user@hetzner-storage:/spwig-backups/

Verify integrity with checksums:

sha256sum /backups/*.dump.gz > /backups/checksums.txt

Monitoring
I use Prometheus to scrape metrics from:

  • PostgreSQL (via pg_exporter)
  • Docker container stats
  • NGINX (via nginx_exporter)

Grafana dashboards show:

  • Database query latency
  • Container CPU/memory usage
  • SSL certificate expiration dates

*For log analysis, I run Logwatch daily to check for failed login attempts or unusual API activity.

2 Likes

Thanks for sharing, Tom! When I migrated from WooCommerce to Spwig, I was worried about SSL and backups, but the process was smoother than I expected. Your setup with Let’s Encrypt and automated backups gives me more confidence in the platform’s reliability. I remember struggling with WooCommerce’s plugin-based backups, this feels more streamlined. Have you had any issues with the SSL setup on Hetzner? I’m considering a similar approach for my outdoor gear store.

Nice setup! For one of our agency clients, we use pg_dump with --inserts for easier restores. Also, I’ve automated checksum verification with a small bash script that compares against a stored hash file.