Package Details: caddy2 2.1.1-7

Git Clone URL: https://aur.archlinux.org/caddy2.git (read-only, click to copy)
Package Base: caddy2
Description: Fast web server with automatic HTTPS
Upstream URL: https://caddyserver.com
Keywords: webserver
Licenses: Apache
Conflicts: caddy
Provides: caddy
Submitter: Poscat
Maintainer: Arisu
Last Packager: Arisu
Votes: 17
Popularity: 4.41
First Submitted: 2019-10-21 13:43
Last Updated: 2020-08-14 12:10

Pinned Comments

Arisu commented on 2020-08-27 06:23

Caddy 2.1.1 doesn't build with go 1.15 (see this pr).

Please downgrade to go 1.14 until caddy 2.2.0 is released.

(@eggze)

Latest Comments

1 2 3 4 Next › Last »

Arisu commented on 2020-09-11 14:38

@paulriddle if you do gpg --receive-keys 29D0817A67156E4F25DC24782A349DD577D586A5, you get that error because the key is not in the default keyserver (http://keys.gnupg.net) for some reason.

-> The wiki mentions an alternative keyserver which you'd use like this: gpg --keyserver pool.sks-keyservers.net --receive-keys 29D0817A67156E4F25DC24782A349DD577D586A5.

paulriddle commented on 2020-09-11 06:45

Something's wrong with the pgp key?

:: (1/1) Parsing SRCINFO: caddy2

:: PGP keys need importing:
 -> 29D0817A67156E4F25DC24782A349DD577D586A5, required by: caddy2
==> Import? [Y/n] Y
:: Importing keys with gpg...
gpg: keyserver receive failed: General error
problem importing keys

Arisu commented on 2020-08-27 06:23

Caddy 2.1.1 doesn't build with go 1.15 (see this pr).

Please downgrade to go 1.14 until caddy 2.2.0 is released.

(@eggze)

eggze commented on 2020-08-27 06:05

With the latest version I started having the following errors:

==> Starting check()...
go: downloading github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a
ok      github.com/caddyserver/caddy/v2 (cached)
?       github.com/caddyserver/caddy/v2/caddyconfig [no test files]
ok      github.com/caddyserver/caddy/v2/caddyconfig/caddyfile   0.016s
panic: qtls.ClientSessionState not compatible with tls.ClientSessionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.2()
    github.com/lucas-clemente/quic-go@v0.17.1/internal/handshake/unsafe.go:26 +0x205
FAIL    github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile   0.060s
# github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi
modules/caddyhttp/reverseproxy/fastcgi/client_test.go:252:24: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
modules/caddyhttp/reverseproxy/fastcgi/client_test.go:269:24: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
panic: qtls.ClientSessionState not compatible with tls.ClientSessionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.2()
    github.com/lucas-clemente/quic-go@v0.17.1/internal/handshake/unsafe.go:26 +0x205
FAIL    github.com/caddyserver/caddy/v2/caddytest   0.039s
panic: qtls.ClientSessionState not compatible with tls.ClientSessionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.2()
    github.com/lucas-clemente/quic-go@v0.17.1/internal/handshake/unsafe.go:26 +0x205
FAIL    github.com/caddyserver/caddy/v2/caddytest/integration   0.050s
?       github.com/caddyserver/caddy/v2/cmd [no test files]
panic: qtls.ClientSessionState not compatible with tls.ClientSessionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.2()
    github.com/lucas-clemente/quic-go@v0.17.1/internal/handshake/unsafe.go:26 +0x205
FAIL    github.com/caddyserver/caddy/v2/modules/caddyhttp   0.041s
?       github.com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth [no test files]
panic: qtls.ClientSessionState not compatible with tls.ClientSessionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.2()
    github.com/lucas-clemente/quic-go@v0.17.1/internal/handshake/unsafe.go:26 +0x205
FAIL    github.com/caddyserver/caddy/v2/modules/caddyhttp/encode    0.042s
?       github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip   [no test files]
?       github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd   [no test files]
panic: qtls.ClientSessionState not compatible with tls.ClientSessionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.2()
    github.com/lucas-clemente/quic-go@v0.17.1/internal/handshake/unsafe.go:26 +0x205
FAIL    github.com/caddyserver/caddy/v2/modules/caddyhttp/fileserver    0.041s
panic: qtls.ClientSessionState not compatible with tls.ClientSessionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.2()
    github.com/lucas-clemente/quic-go@v0.17.1/internal/handshake/unsafe.go:26 +0x205
FAIL    github.com/caddyserver/caddy/v2/modules/caddyhttp/headers   0.022s
?       github.com/caddyserver/caddy/v2/modules/caddyhttp/map   [no test files]
?       github.com/caddyserver/caddy/v2/modules/caddyhttp/requestbody   [no test files]
panic: qtls.ClientSessionState not compatible with tls.ClientSessionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.2()
    github.com/lucas-clemente/quic-go@v0.17.1/internal/handshake/unsafe.go:26 +0x205
FAIL    github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy  0.020s
FAIL    github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi [build failed]
panic: qtls.ClientSessionState not compatible with tls.ClientSessionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.2()
    github.com/lucas-clemente/quic-go@v0.17.1/internal/handshake/unsafe.go:26 +0x205
FAIL    github.com/caddyserver/caddy/v2/modules/caddyhttp/rewrite   0.019s
?       github.com/caddyserver/caddy/v2/modules/caddyhttp/standard  [no test files]
panic: qtls.ClientSessionState not compatible with tls.ClientSessionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.2()
    github.com/lucas-clemente/quic-go@v0.17.1/internal/handshake/unsafe.go:26 +0x205
FAIL    github.com/caddyserver/caddy/v2/modules/caddyhttp/templates 0.019s
?       github.com/caddyserver/caddy/v2/modules/caddypki    [no test files]
?       github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver [no test files]
ok      github.com/caddyserver/caddy/v2/modules/caddytls    (cached)
?       github.com/caddyserver/caddy/v2/modules/caddytls/distributedstek    [no test files]
?       github.com/caddyserver/caddy/v2/modules/caddytls/standardstek   [no test files]
?       github.com/caddyserver/caddy/v2/modules/filestorage [no test files]
?       github.com/caddyserver/caddy/v2/modules/logging [no test files]
?       github.com/caddyserver/caddy/v2/modules/standard    [no test files]
FAIL
==> ERROR: A failure occurred in check().
    Aborting...
error making: caddy2

Is it something wrong on my system? I tried to clear my cache but still the same result.

Arisu commented on 2020-08-14 12:39

@venator85 thanks a lot for your feedback. I updated caddy.service to fix both these issues. You can revert the changes I asked you to try, and when you upgrade to that new version please move back caddy.conf to Caddyfile.

Important note: it looks like caddy 2.1.1 doesn't build against go 1.15. If you already upgraded it, either downgrade to 1.14 or wait for the upcoming caddy 2.2.0 release (which will hopefully support go 1.15).

venator85 commented on 2020-08-13 09:36

@Arisu I've fixed the issue of Caddy not listening to port 80 by moving my configuration from Caddyfile to the caddy.conf file :)

venator85 commented on 2020-08-12 16:53

@Arisu It's strange, echo ~caddy indeed returns /var/lib/caddy. After editing the caddy.service as you recommended, journalctl now prints:

Aug 12 18:44:39 server caddy[5866]: LOGNAME=caddy
Aug 12 18:44:39 server caddy[5866]: USER=caddy
Aug 12 18:44:39 server caddy[5866]: INVOCATION_ID=34441cc2073b48f9b40c4e8a1ec6ba62
Aug 12 18:44:39 server caddy[5866]: JOURNAL_STREAM=8:36896
Aug 12 18:44:39 server caddy[5866]: XDG_DATA_HOME=/var/lib
Aug 12 18:44:39 server caddy[5866]: XDG_CONFIG_HOME=/var/lib/caddy/.config
Aug 12 18:44:39 server caddy[5866]: {"level":"info","ts":1597250679.8961384,"msg":"using provided configuration","config_file":"/etc/caddy/caddy.conf","config_adapter":"caddyfile"}
Aug 12 18:44:39 server caddy[5866]: {"level":"info","ts":1597250679.897954,"logger":"admin","msg":"admin endpoint started","address":"tcp/localhost:2019","enforce_origin":false,"origins":["localhost:2019","[::1]:2019","127.0.0.1:2019"]}
Aug 12 18:44:39 server caddy[5866]: {"level":"info","ts":1597250679.8983467,"msg":"autosaved config","file":"/var/lib/caddy/.config/caddy/autosave.json"}
Aug 12 18:44:39 server caddy[5866]: {"level":"info","ts":1597250679.898373,"msg":"serving initial configuration"}

but caddy is only listening on port 2019 and not on 80:

# ss -ltpn
State       Recv-Q    Send-Q   Local Address:Port    Peer Address:Port   Process
LISTEN      0         5              0.0.0.0:631          0.0.0.0:*       users:(("cupsd",pid=443,fd=6))
LISTEN      0         50             0.0.0.0:445          0.0.0.0:*       users:(("smbd",pid=444,fd=32))
LISTEN      0         4096         127.0.0.1:2019         0.0.0.0:*       users:(("caddy",pid=5866,fd=3))
LISTEN      0         50             0.0.0.0:139          0.0.0.0:*       users:(("smbd",pid=444,fd=33))
LISTEN      0         4096         127.0.0.1:46453        0.0.0.0:*       users:(("containerd",pid=451,fd=9))
LISTEN      0         128            0.0.0.0:22           0.0.0.0:*       users:(("sshd",pid=446,fd=3))
LISTEN      0         5                 [::]:631             [::]:*       users:(("cupsd",pid=443,fd=7))
LISTEN      0         50                [::]:445             [::]:*       users:(("smbd",pid=444,fd=30))
LISTEN      0         50                [::]:139             [::]:*       users:(("smbd",pid=444,fd=31))
LISTEN      0         128               [::]:22              [::]:*       users:(("sshd",pid=446,fd=4

Arisu commented on 2020-08-12 13:15

@venator85 that's odd; in my case that autosave.json file goes into the /var/lib/caddy/.config/caddy/autosave.json directory. Please check caddy user's home directory (echo ~caddy to be /var/lib/caddy) and then try to systemctl edit caddy.service and add:

[Service]
Environment=XDG_CONFIG_HOME=/var/lib/caddy/.config

If that works I'll add the change directly in the package's caddy.service file.

Arisu commented on 2020-08-12 13:14

@JayGatsby sorry for the late reply; did it work out? In any case if you have doubts about this key's authenticity, you can see it is used in the official caddy package: https://github.com/archlinux/svntogit-community/blob/packages/caddy/trunk/PKGBUILD#L33

venator85 commented on 2020-08-12 11:51

After installing and starting caddy.service it seems that Caddy is not listening on any port. I'm using the default config file in the package. Any hints?

Also, I got the following error: {"level":"error","ts":1597232675.2930715,"msg":"unable to autosave config","file":"/etc/caddy/autosave.json","error":"open /etc/caddy/autosave.json: read-only file system"}