Pls help me , I get an error when I build Caddy

1. My Caddy version (caddy version):

Not successfully installed,I followed to build caddy.

2. How I run Caddy:

run go get to install caddy

a. System environment:

Ubuntu 16.04 and Debian 9, both of them get the same error after I type the command above

b. Command:

go get

c. Service/unit/compose file:

Not have

d. My complete Caddyfile or JSON config:

Not have

3. The problem I’m having:

I have followed every steps from and tried it in my other server.However, the following error still occurs

4. Error messages and/or full log output:

root@molitei:~# go get

go/src/ cannot use func literal (type func(certmagic.Certificate) (certmagic.Config, error)) as type certmagic.ConfigGetter in field value
go/src/ config.Manager.Email undefined (type *certmagic.Config has no field or method Email)
go/src/ config.Manager.CA undefined (type *certmagic.Config has no field or method CA)
go/src/ config.Manager.KeyType undefined (type *certmagic.Config has no field or method KeyType)
go/src/ config.Manager.DNSProvider undefined (type *certmagic.Config has no field or method DNSProvider)
go/src/ undefined: certmagic.HostQualifies
go/src/ config.Manager.KeyType undefined (type *certmagic.Config has no field or method KeyType)
go/src/ undefined: certmagic.HostQualifies
go/src/ not enough arguments in call to certmagic.NewDefault().RevokeCert
have (string, bool)
want (context.Context, string, bool)

5. What I already tried:

I tried it in my other server Debian 9 and install the old go version 1.13 but still give me the error

6. Links to relevant resources:

Relevant issue: Get an error when I build Caddy · Issue #3165 · caddyserver/caddy · GitHub

Looks like @Mohammed90 gave you a solution:

$ git clone caddy-v1
$ cd caddy-v1/caddy
$ go build

Thank you very much! Can you help me how to build it with plugins(tls.dns.dnspod)

Just follow the steps in the README: GitHub - caddyserver/caddy: Fast, multi-platform web server with automatic HTTPS

And the instructions for DNS plugins: dnsproviders/ at master · caddyserver/dnsproviders · GitHub

Thx for your help, I use instruction of "To build Caddy with plugins (and with version information) "which from and now succefully install Caddy v1.0.5 (h1:5B1Hs0UF2x2tggr2X9jL2qOZtDXbIWQb9YLbmlxHSuM=)

However, I get a dnspod json error when I run caddy Caddyfile. I remember that the issue has been solved in v1.0.5 but why I use it and still get the error?

I find that when I run go build , it still downloading the lego v3.2.0 instead of v3.3.0 which solve the issue
go build
go: downloading v1.2.0
go: finding module for package
go: downloading v0.8.3
go: downloading v0.13.1
go: downloading v1.4.0
go: downloading v1.0.0
go: downloading v0.0.0-20140401203705-3eca13d6893a
go: downloading v3.2.0

Can you just help me how to upgrade the lego to v3.3.0 and tell me why it download v3.3.0 while my caddy’s version is v1.0.5? Thank you!


go get -u

before running go build. It will upgrade to v3.5.0.

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