Add-package not working

1. The problem I’m having:

I’m trying to install the plugin GitHub - porech/caddy-maxmind-geolocation: Caddy v2 module to filter requests based on source IP geolocation. But trying to add any package I get the following error

2. Error messages and/or full log output:

Error: unknown command "add-package" for "caddy"
Run 'caddy --help' for usage.

3. Caddy version:

2.6.2

4. How I installed and ran Caddy:

Installed via apt get

a. System environment:

debian 12

b. Command:

caddy add-package https://github.com/porech/caddy-maxmind-geolocation

c. Service/unit/compose file:

d. My complete Caddy config:

jellyfin.local {
        tls internal
        reverse_proxy mynas:8096
        log {
                output file /etc/caddy/local.log
        }
}

5. Links to relevant resources:

Howdy @walterwhite, welcome to the Caddy community.

Your version of Caddy is a few years out of date. The Debian maintainers have made some choices regarding their packaging of Caddy, which includes not opting for the last few years of bugfixes and improvements, but notably they explicitly patch out features like caddy upgrade and caddy add-package which download new versions, circumventing their package management.

If you want to use add-package, you’ll need to install Caddy from a more up-to-date repository (see: Install — Caddy Documentation), or you’ll need to appeal to the Debian package maintainers for support.

As a minor note, I think it also needs the URL to be without scheme, e.g. caddy add-package github.com/porech/caddy-maxmind-geolocation, following the example at Command Line — Caddy Documentation.

2 Likes

Thank you very much. I completely forgot to check if this was the latest version, as I assumed it would be as it is in the Debian package management. After installing version 2.8.2 I was able to add the package successfully.

1 Like

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