GitHub

Caddy Web Server

What is the project about?

Caddy is an extensible, open-source web server platform written in Go. It's designed to be easy to use and configure, with a strong focus on automatic HTTPS.

What problem does it solve?

Caddy simplifies the process of setting up and managing a web server, especially when it comes to HTTPS. It automates the acquisition and renewal of TLS certificates, making it easier to secure websites. It also offers a modern, extensible architecture that can be adapted to various needs. It removes the complexity of setting up HTTPS.

What are the features of the project?

  • Easy configuration: Uses a simple Caddyfile format or a more powerful native JSON config.
  • Automatic HTTPS: Obtains and manages TLS certificates from ZeroSSL and Let's Encrypt by default. Also supports fully-managed local CA for internal names and IPs.
  • Dynamic configuration: Allows changes via a JSON API.
  • Config Adapters: Supports various config formats (Caddyfile, YAML, TOML, etc.) by converting them to JSON.
  • High availability: Handles TLS/OCSP/certificate issues gracefully.
  • Scalability: Proven to handle a large number of sites.
  • HTTP/1.1, HTTP/2, and HTTP/3 support: Modern protocol support out of the box.
  • Extensibility: Modular architecture allows for customization and adding features without bloat.
  • No external dependencies: Self-contained executable.
  • Memory safety: Written in Go, offering better memory safety than languages like C/C++.
  • Clustering: Can coordinate with other Caddy instances.

What are the technologies used in the project?

  • Go: The primary programming language.
  • JSON: Native configuration format.
  • Caddyfile: A user-friendly configuration format.
  • CertMagic: A Go library for automatic certificate management (powering Caddy's HTTPS features).
  • Let's Encrypt & ZeroSSL: Certificate Authorities (CAs) used for automatic HTTPS.

What are the benefits of the project?

  • Simplified web server management: Easy to set up and configure.
  • Enhanced security: Automatic HTTPS by default.
  • Improved performance: Supports modern HTTP protocols.
  • Flexibility and extensibility: Adaptable to various use cases.
  • Reliability: Designed for high availability and graceful error handling.
  • Reduced operational overhead: Automates certificate management.
  • Memory Safe: Built using the Go programming language.

What are the use cases of the project?

  • Serving websites: Hosting static and dynamic websites.
  • Reverse proxy: Acting as a reverse proxy for other applications.
  • Load balancing: Distributing traffic across multiple servers.
  • API gateway: Managing and securing APIs.
  • File server: Serving files over HTTP/HTTPS.
  • Development server: Local development and testing.
  • Any long-running Go program: Caddy is a platform to run Go applications.
caddy screenshot