[{"data":1,"prerenderedAt":124},["ShallowReactive",2],{"seo-verification":3,"blog-deploy-your-applications-with-caddy-on-a-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"slugs":9,"title":12,"excerpt":13,"readTime":14,"views":15,"isPinned":16,"publishedAt":17,"category":18,"categories":22,"featuredImage":24,"bgImage":25,"posterImage":26,"relatedSolution":27,"intro":30,"sections":31,"ctaTitle":77,"ctaBody":78,"ctaButton":79,"ctaUrl":80,"relatedPosts":81},39,"deploy-your-applications-with-caddy-on-a-vps",{"fr":10,"en":8,"ar":11},"deployer-avec-caddy","انشر-تطبيقاتك-باستخدام-caddy-على-خادم-vps","Deploy your applications with Caddy on a VPS","Deploy Caddy on your VPS: web server and reverse proxy with automatic HTTPS. A Caddyfile of a few lines is enough to go into production.",3,0,false,"2026-05-12T00:00:00+00:00",{"id":14,"name":19,"slug":20,"color":21,"icon":20},"Deployment","deploiement","bg-success\u002F10 text-success",[23],{"id":14,"name":19,"slug":20,"color":21,"icon":20},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fdeployer-avec-caddy-poster.svg",{"categorySlug":28,"appSlug":29},"application-deployment-devops","caddy","Caddy is a web server and reverse proxy written in Go whose signature is automatic HTTPS: it obtains and renews your TLS certificates with no configuration. On a VPS, a three-line Caddyfile replaces dozens of lines of Nginx plus Certbot, which makes it the fastest option for exposing an application over HTTPS.",[32,36,46,49,71,74],{"type":33,"title":34,"body":35},"h2","Why choose Caddy as the front end on your VPS?","The historical complexity of a reverse proxy comes down to TLS: generating a certificate, configuring renewal, managing the HTTP→HTTPS redirection. Caddy removes all of that. As soon as you specify a domain name in the Caddyfile, it contacts Let's Encrypt (or ZeroSSL as a fallback), provisions the certificate, staples it (OCSP stapling) and renews it in the background. The configuration is readable, short, and hot-reloadable without service interruption.",{"type":37,"title":38,"items":39},"ul","Caddy's strengths in production",[40,41,42,43,44,45],"End-to-end automatic HTTPS: issuance, renewal and redirection without intervention","Minimalist Caddyfile: a block of a few lines per site, far shorter than an Nginx config","Built-in reverse proxy with health checks and load balancing to your containers or local ports","HTTP\u002F2 and HTTP\u002F3 (QUIC) enabled by default","Hot reload of the configuration (`caddy reload`) without interrupting connections","JSON administration API to drive the configuration dynamically",{"type":33,"title":47,"body":48},"Prerequisites","Caddy is frugal: 1 vCPU and 512 MB to 1 GB of RAM are enough to serve several sites as a reverse proxy. You can choose between installing it as a system binary (systemd service) on Ubuntu\u002FDebian, or running it in a Docker container. In both cases, you need a domain pointing to the VPS IP and ports 80, 443 (and 443\u002FUDP for HTTP\u002F3) open in your firewall.",{"type":50,"title":51,"steps":52},"steps","Deploy Caddy as a reverse proxy",[53,56,59,62,65,68],{"title":54,"body":55},"Install Caddy","On Ubuntu\u002FDebian, add the official repository then `apt install caddy`. Caddy registers itself as a systemd service active at startup. Check: `systemctl status caddy`. In container mode, start from the `caddy:latest` image and mount a volume on `\u002Fdata` to persist the certificates.",{"title":57,"body":58},"Point the DNS and open the ports","Create an A record `app.yourdomain.com` to the VPS IP. Open the necessary ports: `ufw allow 80`, `ufw allow 443` and `ufw allow 443\u002Fudp` for HTTP\u002F3. Port 80 is essential for Let's Encrypt's HTTP challenge.",{"title":60,"body":61},"Write the Caddyfile","Edit `\u002Fetc\u002Fcaddy\u002FCaddyfile`. To expose an application running locally on port 3000: `app.yourdomain.com { reverse_proxy localhost:3000 }`. That's all: Caddy deduces that HTTPS is needed because you specified a domain and triggers the certificate issuance.",{"title":63,"body":64},"Reload and check","Apply the configuration without downtime: `caddy reload --config \u002Fetc\u002Fcaddy\u002FCaddyfile`. Follow the certificate acquisition in the logs: `journalctl -u caddy -f`. On the first HTTPS call to your domain, the certificate is in place.",{"title":66,"body":67},"Add security headers and compression","Enrich the block with a `header` directive for HSTS and the anti-clickjacking headers, and enable `encode gzip zstd` for compression. Since the config is declarative, these additions stay readable and a simple `caddy reload` applies them.",{"title":69,"body":70},"Logging in for the first time","Caddy is a web server; it has no login interface. After installation it serves its welcome page on port 80, and you configure it over SSH by editing \u002Fetc\u002Fcaddy\u002FCaddyfile then running systemctl reload caddy. Automatic TLS will only be enabled once a real domain name is declared in that file.",{"type":72,"body":73},"tip","To host several applications on the same VPS, simply list several site blocks in the same Caddyfile, each with its `reverse_proxy`. And for local development without a public domain, replace the domain name with `:80` or use the `tls internal` directive: Caddy then generates a local CA and signs the certificate itself, handy for an internal pre-production environment.",{"type":72,"title":75,"body":76},"The official documentation","For advanced configuration and options specific to the tool, refer to the \u003Ca href=\"https:\u002F\u002Fcaddyserver.com\u002Fdocs\" target=\"_blank\" rel=\"noopener noreferrer\">official Caddy documentation\u003C\u002Fa>. This guide covers going live on a VPS; the vendor's docs remain the reference for fine-tuning, major updates and specific use cases.","Put Caddy in front of your applications on a Cloud VPS","Deploy a ServOrbit Cloud VPS with the Deployment template: Caddy handles automatic HTTPS while you focus on your application.","See the Cloud VPS","\u002Fvps-cloud",[82,96,109],{"id":83,"slug":84,"slugs":85,"title":88,"excerpt":89,"readTime":90,"views":15,"isPinned":16,"publishedAt":91,"category":92,"categories":93,"featuredImage":24,"bgImage":25,"posterImage":95,"relatedSolution":24},33,"deploy-your-applications-with-caprover-on-a-vps",{"fr":86,"en":84,"ar":87},"deployer-avec-caprover","انشر-تطبيقاتك-باستخدام-caprover-على-خادم-vps","Deploy your applications with CapRover on a VPS","Complete CapRover guide: installation, captain-definition, GitHub Actions CI\u002FCD, multi-node cluster, backups and troubleshooting 502, build failed and Docker API errors.",10,"2026-05-18T00:00:00+00:00",{"id":14,"name":19,"slug":20,"color":21,"icon":20},[94],{"id":14,"name":19,"slug":20,"color":21,"icon":20},"\u002Fblog\u002Fcovers\u002Fdeployer-avec-caprover-poster.svg",{"id":97,"slug":98,"slugs":99,"title":102,"excerpt":103,"readTime":14,"views":15,"isPinned":16,"publishedAt":104,"category":105,"categories":106,"featuredImage":24,"bgImage":25,"posterImage":108,"relatedSolution":24},34,"deploy-your-applications-with-dokku-on-a-vps",{"fr":100,"en":98,"ar":101},"deployer-avec-dokku","انشر-تطبيقاتك-باستخدام-dokku-على-خادم-vps","Deploy your applications with Dokku on a VPS","Deploy your apps with Dokku, the smallest PaaS on the market: git push, Heroku buildpacks and automatic SSL on a lightweight VPS.","2026-05-17T00:00:00+00:00",{"id":14,"name":19,"slug":20,"color":21,"icon":20},[107],{"id":14,"name":19,"slug":20,"color":21,"icon":20},"\u002Fblog\u002Fcovers\u002Fdeployer-avec-dokku-poster.svg",{"id":110,"slug":111,"slugs":112,"title":115,"excerpt":116,"readTime":14,"views":15,"isPinned":16,"publishedAt":117,"category":118,"categories":119,"featuredImage":24,"bgImage":25,"posterImage":121,"relatedSolution":122},35,"deploy-your-applications-with-portainer-on-a-vps",{"fr":113,"en":111,"ar":114},"deployer-avec-portainer","انشر-تطبيقاتك-باستخدام-portainer-على-خادم-vps","Deploy your applications with Portainer on a VPS","Manage Docker visually with Portainer on your VPS: containers, stacks, volumes and networks managed from a clear web interface.","2026-05-16T00:00:00+00:00",{"id":14,"name":19,"slug":20,"color":21,"icon":20},[120],{"id":14,"name":19,"slug":20,"color":21,"icon":20},"\u002Fblog\u002Fcovers\u002Fdeployer-avec-portainer-poster.svg",{"categorySlug":28,"appSlug":123},"portainer",1787580994681]