## Unofficial snap ##
Caddy is a powerful, extensible platform to serve your sites, services, and apps, written in Go.
Most people use Caddy as a web server or proxy, but at its core, Caddy is a server of servers. With the requisite modules, it can take on the role of any long-running process!
Configuration is both dynamic and exportable with Caddy's API. Although no config file is required, you can still use them; most people's favorite way of configuring Caddy is using the Caddyfile. The format of the config document takes many forms with config adapters, but Caddy's native config language is JSON.
This particular snap has a few key features:
caddy is setup as a daemon so that Ubuntu Core machines can use it! This means that the configuration is intended to be passed in a fashion useful for Ubuntu Core devices, snap config values. Instead of creating a Caddyfile, set the JSON corresponding to your desired configuration as a config value via:
snap set caddy config='{...}'
caddy-wrapper will consume this configuration value and pass that to caddy.
Instead of serving the content from the caddy snap itself (also supported), instead other snaps can provide the content caddy serves. As long as the implement the caddy-content slot which properly exposes the file hierarchy, caddy can access that file tree and serve the content! To do so, run:
snap connect caddy:caddy-content <snap>:caddy-content
Provider snaps should expose the content as READ to "<foo>", and that content should be available to caddy at "$SNAP/var/www/<foo>"
A check is involved just in-case end-users run caddy add-package. As this behaviour modifies the caddy binary itself and snaps are read-only, the caddy binary is instead copied to the writable area and that modified caddy binary is the one being used to add and remove modules. Whether the modified caddy binary is the one being used or not can be checked (or set) with:
snap get caddy modified
Modules can be specified by the gadget snap which caddy will fetch on first installation via the default-configure hook.
Importantly, configuration is handled via snap config values. Because Caddy's API uses JSON for configuration, this is a natural choice. For an example of a simple test, refer to the project README on the website.
Of course, for users opting to use the CLI directly any method for supplying a configuration can be used.
You are about to open
Do you wish to proceed?
Thank you for your report. Information you provided will help us investigate further.
There was an error while sending your report. Please try again later.
Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
Snap can be installed on Pop!_OS from the command line. Open Terminal from the Applications launcher and type the following:
sudo apt update
sudo apt install snapd
Either log out and back in again, or restart your system, to ensure snap’s paths are updated correctly.
To install caddy, simply use the following command:
sudo snap install caddy
Browse and find snaps from the convenience of your desktop using the snap store snap.
Interested to find out more about snaps? Want to publish your own application? Visit snapcraft.io now.