caddy file-server --listen :8080

Category: Web Servers & Proxies

caddy file-server --listen :8080

Serve static files from the current directory

Starts a static file server on port 8080 serving the working directory, with automatic gzip and sensible caching headers. Ideal for a quick preview of a site build without configuring a full vhost. Add --root /path to serve a different directory.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.