Web Server Pi4 Caddy

1. My Caddy version (caddy -version):

Caddy v1.0.4 (h1:wwuGSkUHo6RZ3oMpeTt7J09WBB87X5o+IZN4dKehcQE=)

2. How I run Caddy:

I installed Caddy in my Raspberry pi 4 and removed apache2.

a. System environment:

Raspbian

b. Command:

paste command here

c. Service/unit/compose file:

paste full file contents here

d. My complete Caddyfile:

http://kpc-pi4.ddns.net {
    root /var/www/kpcataniag.duckdns.org
    gzip


    proxy / localhost:80 {
        transparent
 }
}

3. The problem I’m having:

The problem is that I can access my dns using no-ip, however when i shared it to my friend they can’t access it.

4. Error messages and/or full log output:

There was no error. IT only says Servicing HTTP port 80: http://kpc-pi4.ddns.net

5. What I already tried:

I tried removong http:// on the caddyfile and an error happen.

2020/02/08 20:26:42 [INFO] [kpc-pi4.ddns.net] acme: Obtaining bundled SAN certificate
2020/02/08 20:26:44 [INFO] [kpc-pi4.ddns.net] acme: Obtaining bundled SAN certificate
2020/02/08 20:26:45 [INFO] [kpc-pi4.ddns.net] acme: Obtaining bundled SAN certificate
2020/02/08 20:26:47 [INFO] [kpc-pi4.ddns.net] acme: Obtaining bundled SAN certificate
2020/02/08 20:26:48 [INFO] [kpc-pi4.ddns.net] acme: Obtaining bundled SAN certificate
2020/02/08 20:26:50 failed to obtain certificate: acme: error: 429 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/rate-limits/, url: 

6. Links to relevant resources:

I followed this step: How to Setup a Raspberry Pi Caddy Web Server - Pi My Life Up

Hi @Ozaki_TM, Welcome to Caddy Forum! ::smile:
You are using no-ip. I use it, so I can answer this.

First, you have published kpc-pi4.ddns.net, so I looked into this:

> nslookup kpc-pi4.ddns.net
Name:    kpc-pi4.ddns.net
Address:  34.199.8.144

So the no-ip setting looks correct.

The problem is reaching your Pi from here. Is Pi on your LAN?
If this is the case, you need to set up forwarding on the router. Check the settings.

Also, Caddyfile seems to be something wrong.

http://kpc-pi4.ddns.net {

This should be http only. Remove http:// to make it https.

Tip: The port for https is 443.

    proxy / localhost:80 {

Caddy is starting up on port 80 and trying to proxy port 80,
so he sees Caddy himself. This is obviously strange
Set a port other than 80.

2 Likes

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