Caddy

A static website using a Caddy web server.

Deploy Caddy

caddy

alphasecio/caddy-server

Just deployed

Deploy and Host Caddy on Railway

Caddy is a powerful yet simple, Go-based open-source web server. Written in a memory-safe language, it compiles to a single, static binary, making it easy to run Caddy practically anywhere, even in containers. Caddy obtains and renews TLS certificates automatically, staples OCSP responses, and even performs automatic HTTPS rewrites.

About Hosting Caddy

Hosting Caddy means running a web server that handles HTTP/HTTPS requests, manages TLS certificates, and serves content through its modular architecture. The server compiles to a single static binary requiring minimal system dependencies while handling automatic certificate provisioning and renewal. Production deployment typically involves configuring domain settings, managing Caddyfile configurations, and coordinating SSL certificate management across different environments. Railway streamlines Caddy deployment by providing container hosting for the static binary, managing domain configuration for automatic HTTPS, and handling the underlying infrastructure while Caddy manages certificate automation and web serving.

Common Use Cases

  • Static Website Hosting: Serve static websites with automatic HTTPS certificate management and renewal
  • Reverse Proxy Services: Handle dynamic reverse proxying for backend services and load balancing
  • Container Web Serving: Deploy lightweight web servers in containerized environments with minimal resource overhead

Dependencies for Caddy Hosting

The Railway template includes the required Caddy binary and container environment with pre-configured static file serving.

Deployment Dependencies

Implementation Details

Template Features:

  • Static website on Railway using Caddy server: Pre-configured setup for serving static content
  • Automatic certificate management: TLS certificate provisioning and renewal without manual intervention
  • Custom domain configuration: Support for custom domain setup with automatic HTTPS

Server Capabilities:

The modular architecture serves a whole host of use cases from simple static file serving to more complex use cases like dynamic reverse proxying and handling Kubernetes ingress.

Technical Features:

  • Go-based Architecture: Memory-safe language compilation to single, static binary
  • Container Compatibility: Runs practically anywhere, including containerized environments
  • Automatic HTTPS: Obtains and renews TLS certificates automatically with OCSP response stapling
  • HTTPS Rewrites: Performs automatic HTTPS redirects for improved security
  • Modular Design: Extensible architecture supporting various web serving scenarios

Configuration:

Caddy uses Caddyfile configuration format for defining server behavior, domain handling, and various directives for customizing web server functionality.

Why Deploy Caddy on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Caddy on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
mellow-vue
A full-stack Vue app with The Boring JavaScript Stack.

View Template
Sveltekit NestJS
Full-stack with SvelteKit + NestJS + Prisma + Postgresql with utils

View Template
.NET8 Web API
A basic ASP.NET Core Web API template (.NET 8)