All posts

What Caddy Pulumi Actually Does and When to Use It

You deploy a new web service and need TLS, routing, and access policies set up before lunch. Caddy can handle HTTPS automatically, yet you still need to declare routes, secrets, and certificates somewhere consistent. Pulumi gives you that declarative infrastructure model, wired through code. Together, Caddy Pulumi can make dynamic site delivery feel like editing configuration with superpowers. Caddy is a fast, Go-based web server that configures itself with HTTPS via Let’s Encrypt. Pulumi is in

Free White Paper

Pulumi Policy as Code + End-to-End Encryption: The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

You deploy a new web service and need TLS, routing, and access policies set up before lunch. Caddy can handle HTTPS automatically, yet you still need to declare routes, secrets, and certificates somewhere consistent. Pulumi gives you that declarative infrastructure model, wired through code. Together, Caddy Pulumi can make dynamic site delivery feel like editing configuration with superpowers.

Caddy is a fast, Go-based web server that configures itself with HTTPS via Let’s Encrypt. Pulumi is infrastructure-as-code that compiles down to cloud-native resources. When you combine them, you get a practical bridge between app delivery and repeatable infrastructure automation. Instead of configuring servers manually, you define and deploy Caddy's setup directly from Pulumi in a versioned, auditable stack.

Here’s the logic. Pulumi manages the environment: load balancers, DNS, secrets in AWS Secrets Manager, or IP policies in Cloudflare. Caddy runs on top, serving traffic with live certificates and identity-based routing. Using Pulumi to spin up Caddy instances locks the entire flow into your CI/CD pipeline. Each push updates infra, refreshes certs, and maintains consistent configuration across environments.

Authentication is the trickiest part to get right. You may need to align OpenID Connect (OIDC) tokens from Okta or Google Workspace to Caddy’s reverse proxy routes. Pulumi can handle those values securely, inject them at runtime, and ensure nothing leaks in plain text. The result is infrastructure that adapts to identity without compromising speed.

A few solid practices emerge:

  • Keep Caddyfile templates minimal and inject variables from Pulumi’s stack config to reduce drift.
  • Use Pulumi’s secrets provider for TLS keys, not raw environment variables.
  • Run Pulumi previews during pull requests so reviewers can see routing diffs.
  • Audit identity policies just like code, especially when mapping RBAC groups to Caddy endpoints.

The result is a deployment pipeline that feels automatic yet stays under your control. No hand-edited configs, no lost certs, no waiting for IAM approvals.

Continue reading? Get the full guide.

Pulumi Policy as Code + End-to-End Encryption: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

Key benefits:

  • Unified visibility across application and infrastructure layers
  • Enforced HTTPS and clean certificate rotation by default
  • Faster environment spin-up from a single source of truth
  • Predictable, reversible changes with policy compliance baked in
  • Traceable identity links for every endpoint request

Platforms like hoop.dev turn those access rules into guardrails that enforce policies automatically. They let you apply identity-aware rules to Caddy routes without writing brittle middleware, giving every developer just-in-time access while keeping auditors happy.

Developers enjoy the speed. One command updates Caddy, the DNS records, and secrets, no context-switching required. Debugging feels human again because logs tie directly to Pulumi events, not scattered YAML in different repos.

AI tooling can extend this flow further. Copilots can suggest Pulumi resource definitions, but having identity-aware boundaries defined in Caddy ensures generated code stays within secure policies. The AI may draft infra, but Caddy and Pulumi enforce the real-world rules.

How do I connect Caddy with Pulumi in practice?
Run Pulumi to provision your runtime environment first, then run Caddy configured through Pulumi outputs. This ensures all resource links—ports, domains, TLS settings—are consistent and trackable. It’s the cleanest way to align IaC automation with app-level routing.

Caddy Pulumi simplifies modern infrastructure by turning routing, certificates, and identity into code you can trust.

See an Environment Agnostic Identity-Aware Proxy in action with hoop.dev. Deploy it, connect your identity provider, and watch it protect your endpoints everywhere—live in minutes.

Get started

See hoop.dev in action

One gateway for every database, container, and AI agent. Deploy in minutes.

Get a demoMore posts