How to use 2 server with unique domain name?

1. My Caddy version (caddy version):


2. How I run Caddy:

caddy run

a. System environment:

Windows server

d. My complete Caddyfile or JSON config:

root * .
file_server browse

paste config here, replacing this text
DO NOT REDACT anything except credentials

3. The problem I’m having:

Hi everyone, I have always used caddy as a file server, without problems, but currently I need to have a second identical server, I manage the balance on aws and here no problem,

4. Error messages and/or full log output:

2020/04/28 18:35:10.257 e[34mINFOe[0m using adjacent Caddyfile
2020/04/28 18:35:10.264 e[34mINFOe[0m admin admin endpoint started {“address”: “localhost:2019”, “enforce_origin”: false, “origins”: [“localhost:2019”]}
2020/04/28 18:35:10.266 e[34mINFOe[0m http server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {“server_name”: “srv0”, “https_port”: 443}
2020/04/28 18:35:10.267 e[34mINFOe[0m http enabling automatic HTTP->HTTPS redirects {“server_name”: “srv0”}
2020/04/28 18:35:10.271 e[34mINFOe[0m tls cleaned up storage units
2020/04/28 18:35:10.272 e[34mINFOe[0m http enabling automatic TLS certificate management {“domains”: [“”]}
2020/04/28 18:35:10.277 e[34mINFOe[0m autosaved config {“file”: “C:\Users\Administrator1\AppData\Roaming\Caddy\autosave.json”}
2020/04/28 18:35:10.277 e[34mINFOe[0m serving initial configuration
2020/04/28 18:35:10 [INFO][cache:0xc000133b30] Started certificate maintenance routine
2020/04/28 18:35:10 [INFO][] Obtain certificate; acquiring lock…
2020/04/28 18:35:10 [INFO][FileStorage:C:\Users\Administrator1\AppData\Roaming\Caddy] Lock for ‘’ is stale (created: 2020-04-28 18:12:54.1544798 +0000 UTC, last update: 2020-04-28 18:17:34.9969824 +0000 UTC); removing then retrying: C:\Users\Administrator1\AppData\Roaming\Caddy\locks\
2020/04/28 18:35:10 [INFO][] Obtain: Lock acquired; proceeding…
2020/04/28 18:35:10 [INFO][] Waiting on rate limiter…
2020/04/28 18:35:10 [INFO][] Done waiting
2020/04/28 18:35:10 [INFO] [] acme: Obtaining bundled SAN certificate given a CSR
2020/04/28 18:35:11 [INFO] [] AuthURL:
2020/04/28 18:35:11 [INFO] [] acme: use tls-alpn-01 solver
2020/04/28 18:35:11 [INFO] [] acme: Trying to solve TLS-ALPN-01
2020/04/28 18:35:11 http: TLS handshake error from EOF
2020/04/28 18:35:16 [INFO] Deactivating auth:
2020/04/28 18:35:16 [INFO] Unable to deactivate the authorization:
2020/04/28 18:35:16 [ERROR] acme: Error → One or more domains had a problem:
[] acme: error: 400 :: urn:ietf:params:acme:error:tls :: remote error: tls: internal error, url:
(challenge=tls-alpn-01 remaining=[http-01])
2020/04/28 18:35:18 [INFO] [] acme: Obtaining bundled SAN certificate given a CSR
2020/04/28 18:35:19 [INFO] [] AuthURL:
2020/04/28 18:35:19 [INFO] [] acme: Could not find solver for: tls-alpn-01
2020/04/28 18:35:19 [INFO] [] acme: use http-01 solver
2020/04/28 18:35:19 [INFO] [] acme: Trying to solve HTTP-01

5. What I already tried:

To use different subdomains between the two servers but afterwards the SSL on the main one does not work

6. Links to relevant resources:

I’m assuming you have linked the certificate storage between the two Caddy instances.

Are there more logs after that? I can see that TLS-ALPN verification failed (not sure why - is Caddy listening directly on your external ports? Or is something passing traffic through to Caddy?) and that it’s moved on to attempting HTTP validation, but I don’t see the outcome of that HTTP challenge.

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