Caddy is a web server that allows HTTP/2. It is a full-featured web server that includes the ability to enable HTTPS automatically. This allows for web server creation with high flexibility and low overhead.
My article will show you how to download and setup the Caddy web server. Please note that this article is meant for 64-bit servers, however it should work with 32-bit as well.
Download and install the latest version of Caddy by running the following command:
curl https://getcaddy.com | bash
This will download Caddy which only includes Caddy core. No additional add-ons will be included in this download. Some Caddy add-ons are
Caddy is an easy-to-use web server. First, create an
index.html file and populate it with the following content:
<!doctype html> <html> <head> <title> Hello World </title> </head> <body> <p>Hello world!</p> </body> </html>
Once done, run
caddy in the same directory. If your website is located elsewhere, run
Next, go to your browser and navigate to
http://0.0.0.0:2015/index.html. You will see a page that reads
If you would like to change the port of the server or make it the default HTTP port, run
caddy -port=80. Remember that running Caddy with port 1024 or lower requires root privileges.