Skip to main content
This guide covers different methods to enable HTTPS for your Zipline instance, from automatic solutions to manual certificate management. The recommended way to add SSL to Zipline is using a reverse proxy like Nginx, Caddy, or Traefik. These handle SSL termination and certificate management.
Zipline itself doesn’t have built-in SSL/TLS support. Use a reverse proxy for HTTPS.
See the Reverse Proxy Setup guide for detailed configurations.

Quick Start: Caddy (Easiest)

Caddy is the simplest option as it automatically obtains and renews SSL certificates.
1

Install Caddy

Follow the official Caddy installation guide for your OS.
2

Create Caddyfile

Create a Caddyfile with your domain:
3

Configure Zipline

Update your Zipline environment variables:
4

Start Caddy

Caddy will automatically obtain an SSL certificate from Let’s Encrypt!
Ensure ports 80 and 443 are open and your domain’s DNS points to your server’s IP before starting Caddy.

Let’s Encrypt with Certbot (Nginx/Apache)

For Nginx or Apache, use Certbot to obtain free SSL certificates from Let’s Encrypt.

Prerequisites

  • Domain name pointing to your server
  • Nginx or Apache installed and configured
  • Ports 80 and 443 open

Nginx + Certbot

1

Install Certbot

Ubuntu/Debian:
CentOS/RHEL:
2

Obtain certificate

Follow the prompts to:
  • Enter your email address
  • Agree to terms of service
  • Choose whether to redirect HTTP to HTTPS (recommended: yes)
3

Verify auto-renewal

Certbot automatically sets up renewal. Test it with:
4

Configure Zipline for HTTPS

Restart Zipline:

Apache + Certbot

1

Install Certbot

2

Obtain certificate

3

Test auto-renewal

Docker Compose with Caddy

Run Caddy alongside Zipline in Docker Compose for a complete solution.
Caddyfile:
When using Docker networking, reference the Zipline service by its service name (zipline) instead of localhost.

Cloudflare SSL

Cloudflare provides free SSL certificates and DDoS protection.
1

Add domain to Cloudflare

  • Sign up at cloudflare.com
  • Add your domain
  • Update nameservers at your domain registrar
2

Configure SSL mode

In Cloudflare dashboard:
  • Go to SSL/TLS settings
  • Set SSL mode to Full (or Full (strict) if you have a valid cert on your origin)
3

Enable additional features (optional)

  • Always Use HTTPS: Redirect HTTP to HTTPS
  • Automatic HTTPS Rewrites: Fix mixed content
  • Minimum TLS Version: Set to TLS 1.2 or higher
4

Configure Zipline

When using Cloudflare, set SSL mode to Full or Full (strict). Never use Flexible mode as it creates an unencrypted connection between Cloudflare and your server.
For better security with Cloudflare:
1

Generate origin certificate

In Cloudflare dashboard:
  • Go to SSL/TLS → Origin Server
  • Click “Create Certificate”
  • Choose key type and validity (up to 15 years)
  • Click “Create”
2

Save certificate files

Save both:
  • Origin Certificate (save as origin-cert.pem)
  • Private Key (save as origin-key.pem)
3

Configure Nginx

Download Cloudflare’s CA cert:
4

Set SSL mode to Full (strict)

In Cloudflare dashboard, set SSL mode to Full (strict).

Self-Signed Certificates (Development Only)

Self-signed certificates should ONLY be used for development/testing. Never use them in production.
1

Generate self-signed certificate

2

Configure Nginx

3

Access with certificate warning

Access https://localhost and accept the security warning in your browser.

Configuration After SSL Setup

Once SSL is configured, update Zipline settings:
Restart Zipline:

Verifying SSL Setup

1

Check certificate validity

Look for:
  • Verify return code: 0 (ok)
  • Correct certificate details
2

Test with SSL Labs

Visit SSL Labs SSL Test and enter your domain.Aim for an A or A+ rating.
3

Verify Zipline URLs

Upload a file and check the returned URL uses https://.

Troubleshooting

  • Ensure your domain DNS points to your server
  • Check that ports 80 and 443 are open
  • Verify firewall rules allow ACME challenge requests
  • Check Certbot logs: sudo tail -f /var/log/letsencrypt/letsencrypt.log
This happens when HTTPS pages load HTTP resources:
  • Ensure CORE_RETURN_HTTPS_URLS=true is set
  • Check that custom themes don’t reference HTTP resources
  • If using Cloudflare, enable “Automatic HTTPS Rewrites”
  • Check that your web server serves .well-known/acme-challenge/
  • Ensure ports 80 and 443 remain accessible
  • Verify Certbot timer is active: systemctl status certbot.timer
  • Check renewal logs: sudo journalctl -u certbot.service
  • Verify CORE_RETURN_HTTPS_URLS=true is set
  • Restart Zipline after changing configuration
  • Check that CORE_TRUST_PROXY=true is set if using a reverse proxy
  • Ensure reverse proxy sends X-Forwarded-Proto: https header
  • Verify SSL certificate paths in reverse proxy config
  • Check that certificate files are readable
  • Ensure private key matches certificate
  • Test SSL config: sudo nginx -t or sudo apache2ctl configtest

Security Recommendations

  • Use TLS 1.2 or higher: Disable older protocols (TLS 1.0, 1.1)
  • Strong cipher suites: Use modern, secure ciphers
  • Enable HSTS: Force browsers to use HTTPS
  • Regular updates: Keep your reverse proxy and OS updated
  • Monitor expiration: Set up alerts for certificate expiration
  • Use CAA records: Restrict which CAs can issue certificates for your domain

Example Nginx Security Headers

For the best balance of ease and security, use Caddy for automatic SSL management or Cloudflare for free SSL with additional performance benefits.