Caddy is a 3MB web server for your home computer
Caddy is a powerful web server for home computers that takes less than a minute to setup and requires no deeper knowledge of webmaster or administrative services and technologies.
If you want to run a local web server you have plenty of options to do so but it is likely that none is as comfortable to set up as Caddy.
The program is offered as a 3 Megabyte portable version for Windows -- other operating systems such as Mac OS X and Linux are supported as well -- which you just need to extract and run to start the server. Please note that you can compile Caddy from source as well if you prefer it.
Caddy Web Server
The basic version of Caddy is sufficient for running static HTML websites locally which you can then access on the same computer and depending on security policies and applications also in the same computer network or Internet.
Why would you need a program like it? There are plenty of use-cases for it. Maybe you want to make files available on the Internet from a trusted location that only you can access. Think, a bookmarks file for example or a reference HTML page that you use at work.
Just point your browser to localhost:2015 after installation to get started. You will get a 404 not found error since there is no index.html or index.htm file in the Caddy directory by default.
Place an index file in the directory to have it loaded automatically or other HTML files to load them manually or through the use of links.
Access to static HTML pages may be all that you require depending on your needs, but Caddy's functionality does not end there.
If you check out the features listing on the Caddy Server homepage or the user guide, you will notice that Caddy supports more than just static web pages.
For instance, you may serve multiple websites from a single Caddy installation if you want using a so-called Caddyfile which is a configuration file for the server.
There is also support for PHP but that works only in conjunction with a FastCGI server that you need to set up on your system as well.
Other features of interest include support for IPv6 environments, support for gzip compression, HTTP/2 and TLS 1.2 support, and WebSockets support.
A good starting point to find out more about several of the advanced features that Caddy supports is the user guide linked above.
It may be easier however to use a full solution like Wampserver, XAMPP or QuickPHP Web Server that ships with everything right out of the box (everything meaning PHP and MySQL among other things that you need to run advanced dynamic scripts and services such as WordPress).
For static HTML pages and sites however, it is an excellent solution that is dead easy to set up and use.
Plus, it is fully portable which means that you can carry it around wherever you go to start your own web server from any supported operating system.
With Caddy 0.82 released a year after writing this review, it is time to look at the changes introduced in the meantime to the web server.
One of the biggest changes is its automatic use of HTTPS using the free Lets Encrypt initiative. What this means is that your web server will support HTTPS when set up provided that certain criteria are met (such as the host is not localhost or an IP address).
Caddy suports IPv6, multiple sites run on the same server using virtualhosts, rewrites and redirects, WebSockets, and many, many other things that it did not when it was first released in 2015.
In addition, Caddy is now also available for FreeBSD and OpenBSD, as well as Linux ARM which you may use to run the web server on Android devices.
I can see this being perfect for raspberry pi
With all the news about
(professionally-run) web servers
being attacked / compromised every day,
what are the _Security Risks_
associated with this home tool?
(specially for a non-admin non-techie home user?)…
It’s also open source, using the Apache 2.0 license.
On the security question that one of the other posters noted, I’d say you’re probably safe if you run it locally on your machine or home network. There appears to be some basic security baked in for doing that without too much trouble. It doesn’t appear suited for serving files to the internet for anything but a temporary setup.
I would love to sit down and dive right into this without thinking about how beautiful its outside. When the summers over I think I’ll be going pretty hard core, with point me in the right direction. What I can see from this setup, that it is kinda like instantwp.com. Thanks Martin hopefully one day I’ have something nice like this website.