Package Details: caddy-custom 2.9.1-1

Git Clone URL: https://aur.archlinux.org/caddy-custom.git (read-only, click to copy)
Package Base: caddy-custom
Description: Caddy web server with plugins
Upstream URL: https://github.com/caddyserver/caddy
Keywords: caddy
Licenses: Apache-2.0
Conflicts: caddy
Provides: caddy
Submitter: BryanLiang
Maintainer: BryanLiang
Last Packager: BryanLiang
Votes: 2
Popularity: 1.24
First Submitted: 2024-05-16 12:18 (UTC)
Last Updated: 2025-01-09 02:23 (UTC)

Dependencies (2)

Required by (14)

Sources (4)

Pinned Comments

BryanLiang commented on 2024-08-30 12:30 (UTC) (edited on 2024-10-14 15:38 (UTC) by BryanLiang)

@bugscze I added a detection for environment variable PLUGIN_LIST_PATH just now. You can try setting variable like export PLUGIN_LIST_PATH=/path/to/plugin-list before building.

BryanLiang commented on 2024-05-16 12:20 (UTC) (edited on 2024-05-16 15:45 (UTC) by BryanLiang)

Before building this package, please put all the plugins that you need into plugin-list, one plugin per line.

Latest Comments

1 2 Next › Last »

jonasj commented on 2025-01-28 20:17 (UTC) (edited on 2025-01-28 21:13 (UTC) by jonasj)

@BryanLiang

output is:

# /usr/lib/tmpfiles.d/caddy.conf
d /var/lib/caddy 0750 caddy caddy

I guess that is what should work with.

And I also just tried it on another fresh Arch, there it created the folder properly and it seems to work out of the box ... not sure what the issue was on my first attempt. Was just confused since I didn't see the creation of /var/lib/caddy in the PKGBUILD. Sorry for the noise here ...

BryanLiang commented on 2025-01-28 19:52 (UTC) (edited on 2025-01-29 07:17 (UTC) by BryanLiang)

@jonasj I don't know. I built and installed the package in my vps just now, and /var/lib/caddy/ was created normally. What is your output of systemd-tmpfiles --cat-config | grep caddy.

jonasj commented on 2025-01-28 19:41 (UTC)

@BryanLiang

my system environment is a fresh Arch Linux install. Starting caddy via systemd with the shipped Caddyfile works, however as soon as I configure a domain for which Caddy should request a certificate, it fails because it didn't find "/var/lib/caddy". After creating it manually, it works. Not sure if this tmpfiles.d needs some configuration to work on a fresh Arch?

Did that, and it works. Was just curious about that. I guess that's something for upstream caddy then.

BryanLiang commented on 2025-01-28 19:34 (UTC)

@jonasj

First, what's your system environment? This package ships a caddy.tmpfiles file, which will make tmpfiles.d to create /var/lib/caddy automatically.

Second, I prefer to ship the original systemd unit file, because not everyone needs those extra features. If you need, just download the modified unit file to /etc/systemd/system/.

jonasj commented on 2025-01-28 18:48 (UTC)

When running caddy-custom with a Caddyfile which is expected to request a certificate, it actually fails due to some missing pieces. It failed with an error because of a missing "/var/lib/caddy" directory which hasn't been created during installation. Shouldn't this be added to the PKGBUILD?

Going further: How about shipping a modified systemd unit file with this package? The official (but currently outdated) caddy package has a much more extended systemd unit file (https://gitlab.archlinux.org/archlinux/packaging/packages/caddy/-/blob/main/caddy.service?ref_type=heads) It has a lot of hardening options (which might not be necessary) but some useful additions like ExecPreStart to validate the config, etc.

BryanLiang commented on 2024-11-23 17:23 (UTC)

@enihcam Thanks for you advice. But this package use xcaddy to build and the compiled executable is statically linked, which is different from the official one. Besides xcaddy disable CGO by default, see: https://github.com/caddyserver/xcaddy/blob/c548f44e2d9290d6c490868336699d65f43dd36e/platforms.go#L18 unless you set the environment variable CGO_ENABLED to 1 manually. So I think there is no need to add these flags.

enihcam commented on 2024-11-23 17:05 (UTC)

Please add CGO flags in build(), as defined in official caddy package:

https://gitlab.archlinux.org/archlinux/packaging/packages/caddy/-/blob/main/PKGBUILD?ref_type=heads#L60-L64

  export CGO_LDFLAGS="${LDFLAGS}"
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"

BryanLiang commented on 2024-08-30 12:30 (UTC) (edited on 2024-10-14 15:38 (UTC) by BryanLiang)

@bugscze I added a detection for environment variable PLUGIN_LIST_PATH just now. You can try setting variable like export PLUGIN_LIST_PATH=/path/to/plugin-list before building.

bugscze commented on 2024-08-30 09:55 (UTC)

How to add packages into plugin-list ? If I add packages into "/var/cache/yay/caddy-custom/plugin-list", file gets overwrited with empty default.

It would be nice to have it read from /etc/caddy/plugin-list

NCRonB commented on 2024-07-13 05:48 (UTC)

Thank you for this!