How to install additional packages with apt

I have installed caddy with apt-get install or apt install on Ubuntu 18.04 LTS server and it works in systemctl.

The installation script is like

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/cfg/gpg/gpg.155B6D79CA56EA34.key' | sudo apt-key add -
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/cfg/setup/config.deb.txt?distro=debian&version=any-version' | sudo tee -a /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy

How to install additional packages(listed in Download Caddy) in the same method? Or can I specify additional packages when installing caddy via apt ?

We only ship a vanilla build of Caddy in our package distributions.

If you need to use plugins, just download your custom build (or use xcaddy to build it), replace your /usr/bin/caddy binary with it.

Be aware that any updates to the apt package will reset your /usr/bin/caddy to a vanilla copy, so you should make sure to either pin the package version to the same one you just installed (see link below for instructions), or instead just install from a .deb on the github release page one time (no auto-updates).

2 Likes

To clarify:

It’s impossible, at least if we want in the official repos. Apt does not have the facilities needed for this. It’s frustrating and it’s why we didn’t work on any apt distribution for years ourselves. We finally settled to just ship vanilla Caddy. (Seems unlikely to get into any official distro repo soon though.)

1 Like

Thank you all

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.