-
Section 1: Introduction
-
Section 2: Docker Basics for Beginners
-
Section 3: VPS — Rent Your Own Server
-
Section 4: Running Varyshop in Docker
-
Section 5: Building Your Website and Lead Magnet Page
-
Section 6: CRM — Managing Your Contacts and Leads
-
Section 7: Mass Communication — Email & SMS Marketing
-
Section 8: Conclusion and Next Steps
HTTPS with Caddy — Secure Access
HTTPS with Caddy
Automatic SSL certificates for secure access
Your Varyshop is running, but it is only accessible over plain HTTP on port 8069. For a production store, you need HTTPS with a real SSL certificate. Caddy is a modern web server that handles this automatically — no manual certificate management required.
Why Caddy
Automatic HTTPS
Caddy obtains and renews SSL certificates from Let's Encrypt automatically. Zero configuration needed.
Simple Configuration
A Caddy config for reverse proxying is just a few lines. No complex Nginx blocks to write.
HTTP/2 by Default
Caddy serves HTTP/2 out of the box, giving your store faster load times.
Prerequisites
Add Caddy to Docker Compose
services:
caddy:
image: caddy:2
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
restart: unless-stopped
depends_on:
- odoo
volumes:
caddy_data:
caddy_config:Create the Caddyfile
your-domain.com {
reverse_proxy odoo:8069
}That Is the Entire Config
Two lines. Caddy will automatically obtain an SSL certificate, redirect HTTP to HTTPS, and proxy all traffic to your Varyshop container.
Update Odoo Configuration
Remove the ports mapping from the odoo service since Caddy now handles external traffic. Odoo only needs to be accessible internally within the Docker network.
odoo:
image: varyshop/varyshop:18
# Remove: ports: - "8069:8069"
expose:
- "8069"Deploy
docker compose down docker compose up -d docker compose logs -f caddy
Restart the stack
Bring everything down and back up with the new Caddy configuration.
Watch Caddy logs
You will see Caddy requesting a certificate from Let's Encrypt. This takes about 30 seconds.
Test HTTPS
Open https://your-domain.com in your browser. You should see your Varyshop with a valid SSL certificate.
DNS Propagation
If Caddy fails to obtain a certificate, your domain DNS may not have propagated yet. Wait 5-10 minutes and try again with docker compose restart caddy.
Secure and Live
Your Varyshop is now running behind HTTPS with automatic certificate renewal. Visitors see a green padlock, search engines rank you higher, and payment providers require it. This is production-ready.
Nastavte Caddy jako reverzní proxy s automatickým HTTPS, aktualizujte Docker Compose a ověřte zabezpečený přístup k Varyshop obchodu.
There are no comments for now.