Caddy Web Server - Written in GoLang

Caddy Web Server

A web server is a server-side application designed to process HTTP requests between client and server. HTTP is the basic and very widely used network protocol.

A few years ago, I introduced a new web server called Caddy. Since then, I have started using more caddy than nginx in my own projects. What fascinates me about Caddy is especially the fact that it’s written in Google's Go language. In addition, it handles Let's encrypt's SSL / TLS certificate renewalls automatically.

What is Caddy?

Caddy simplifies your infrastructure. It takes care of TLS certificate renewals, OCSP stapling, static file serving, reverse proxying, Kubernetes ingress, and more.

Its modular architecture means you can do more with a single, static binary that compiles for any platform.

Caddy runs great in containers because it has no dependencies—not even libc. Run Caddy practically anywhere.

Caddy is the only web server to use HTTPS automatically and by default.

Written in Go, Caddy offers greater memory safety than servers written in C. A hardened TLS stack powered by the Go standard library serves a significant portion of all Internet traffic.

Features of Caddy

  • Fpeedy HTTP requests using HTTP/2
  • Easy to deploy
  • Obtains and renews TLS certificates for your sites automatically.
  • Run Caddy practically anywhere - No dependencies
  • Portable Executables
  • Run-on multiple CPUs/Cores
  • Full support for the latest IPv6
  • Serve FastCGI, Reverse Proxy, Rewrite and Redirects, Clean URL, Gzip compression, Directory Browsing, Virtual Hosts, and Headers

What Makes Caddy Different?

  • Loaded with the Latest features – HTTP/2, IPv6, Markdown, WebSockets, FastCGI, templates, and other out-of-box features.
  • Run the executables without the need of installation
  • Very specific documentation with the least technical description
  • Support Virtual Host – Setup as many sites as you want
  • Availability of support for most platforms – Windows, Linux, Mac, BSD and Android

How to Install Caddy

Installing this package automatically starts and runs Caddy for you as a systemd service named caddy using our official caddy.service unit file.


Install Caddy on Debian, Ubuntu, Raspbian


 $ sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
 $ curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo apt-key add -
 $ curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
 $ sudo apt update
 $ sudo apt install caddy


Install Caddy on Fedora, RedHat, CentOS

Fedora or RHEL/CentOS 8:


 $ dnf install 'dnf-command(copr)'
 $ dnf copr enable @caddy/caddy
 $ dnf install caddy

RHEL/CentOS 7:


 $ yum install yum-plugin-copr
 $ yum copr enable @caddy/caddy
 $ yum install caddy


Install Caddy on Docker

 $ docker pull caddy

Conclusion

If you are tired of complicated configuration files and profit from automatic HTTPS-Certificates via Let’s Encrypt, you should definitely check out Caddy

Check a complete user Guide / Full Documentation of Caddy Web Server.

Caddy's installation and setup guides.


If you like this blog post and it was useful to you, please follow us on Twitter and Facebook.


Sources:

Post a Comment

0 Comments