So I have had my server on scaleway.com for a while now, using the Traefik/Docker Swarm/Lets Encrypt setup on that server without a problem. I am now trying to move my serve to a local setup using Raspberry Pi 5. However, I keep getting messages saying ERR Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [traefik.otherrealm.org]: error: one or more domains had a problem:\n[traefik.otherrealm.org] invalid authorization: acme: error: 400 :: urn:ietf:params:acme:error:connection :: 73.89.206.113: Timeout during connect (likely firewall problem)\n" ACME CA=https://acme-staging-v02.api.letsencrypt.org/directory acmeCA=https://acme-staging-v02.api.letsencrypt.org/directory domains=["traefik.otherrealm.org"] providerName=le.acme routerName=traefik-public-https@swarm rule=Host(traefik.otherrealm.org)
My Docker compose file (below) is pretty much the same as it was when I successfully had it setup on Scaleway. Has anyone gotten Let's Encrypt to work with Raspberry Pi?
Thanks, below are the details of my setup:
My domains are:
https://theotherrealm.org/https://otherrealm.org/
I ran this command:
docker stack deploy -c traefik.yml traefik
It produced this output when I ran this command:
docker service logs -tf traefik
…...(Repeats constently)....
2025-11-22T03:03:47.259561603Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:47Z ERR Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [traefik.otherrealm.org]: error: one or more domains had a problem:\n[traefik.otherrealm.org] invalid authorization: acme: error: 400 :: urn:ietf:params:acme:error:connection :: 73.89.206.113: Timeout during connect (likely firewall problem)\n" ACME CA=https://acme-staging-v02.api.letsencrypt.org/directory acmeCA=https://acme-staging-v02.api.letsencrypt.org/directory domains=["traefik.otherrealm.org"] providerName=le.acme routerName=traefik-public-https@swarm rule=Host(`traefik.otherrealm.org`)
2025-11-22T03:03:47.887008112Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:47Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=http routerName=traefik-public@swarm
2025-11-22T03:03:47.887052112Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:47Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=https routerName=traefik-public@swarm
2025-11-22T03:03:48.691452366Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:48Z ERR Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [portainer.otherrealm.org]: error: one or more domains had a problem:\n[portainer.otherrealm.org] invalid authorization: acme: error: 400 :: urn:ietf:params:acme:error:connection :: 73.89.206.113: Timeout during connect (likely firewall problem)\n" ACME CA=https://acme-staging-v02.api.letsencrypt.org/directory acmeCA=https://acme-staging-v02.api.letsencrypt.org/directory domains=["portainer.otherrealm.org"] providerName=le.acme routerName=portainer-https@swarm rule=Host(`portainer.otherrealm.org`)
2025-11-22T03:03:49.309322272Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:49Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=http routerName=traefik-public@swarm
2025-11-22T03:03:49.309532457Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:49Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=https routerName=traefik-public@swarm
2025-11-22T03:03:50.435998201Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:50Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=http routerName=traefik-public@swarm
2025-11-22T03:03:50.436081238Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:50Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=https routerName=traefik-public@swarm
2025-11-22T03:03:50.976543355Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:50Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=http routerName=traefik-public@swarm
2025-11-22T03:03:50.976997911Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:50Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=https routerName=traefik-public@swarm
2025-11-22T03:03:55.962336881Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:55Z ERR Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [edge.otherrealm.org]: error: one or more domains had a problem:\n[edge.otherrealm.org] invalid authorization: acme: error: 400 :: urn:ietf:params:acme:error:connection :: 73.89.206.113: Timeout during connect (likely firewall problem)\n" ACME CA=https://acme-staging-v02.api.letsencrypt.org/directory acmeCA=https://acme-staging-v02.api.letsencrypt.org/directory domains=["edge.otherrealm.org"] providerName=le.acme routerName=edge-https@swarm rule=Host(`edge.otherrealm.org`)
2025-11-22T03:03:56.307087027Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:56Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=https routerName=traefik-public@swarm
2025-11-22T03:03:56.307192471Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:56Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=http routerName=traefik-public@swarm
2025-11-22T03:03:57.099619093Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:57Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=http routerName=traefik-public@swarm
2025-11-22T03:03:57.100110557Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:03:57Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=https routerName=traefik-public@swarm
2025-11-22T03:04:03.608261964Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:04:03Z ERR Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [portainer.otherrealm.org]: error: one or more domains had a problem:\n[portainer.otherrealm.org] invalid authorization: acme: error: 400 :: urn:ietf:params:acme:error:connection :: 73.89.206.113: Timeout during connect (likely firewall problem)\n" ACME CA=https://acme-staging-v02.api.letsencrypt.org/directory acmeCA=https://acme-staging-v02.api.letsencrypt.org/directory domains=["portainer.otherrealm.org"] providerName=le.acme routerName=portainer-https@swarm rule=Host(`portainer.otherrealm.org`)
2025-11-22T03:04:04.049640664Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:04:04Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=http routerName=traefik-public@swarm
2025-11-22T03:04:04.049768164Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:04:04Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=https routerName=traefik-public@swarm
2025-11-22T03:04:05.855134635Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:04:05Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=http routerName=traefik-public@swarm
2025-11-22T03:04:05.855196042Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:04:05Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=https routerName=traefik-public@swarm
2025-11-22T03:04:08.162202697Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:04:08Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=http routerName=traefik-public@swarm
2025-11-22T03:04:08.162264253Z traefik_traefik.1.gbfgloxj9l2d@or | 2025-11-22T03:04:08Z ERR error="middleware \"middlewares-rate-limit@file\" does not exist" entryPointName=https routerName=traefik-public@swarm
………
My web server is (include version):
Docker version 29.0.2, build 8108357 / traefik:latest
The operating system my web server runs on is (include version):
Raspberry Pi 5 64bit
Kernel version 6.12
Debian version 13 (trixie)
My hosting provider, if applicable, is:
Selfhosted (Xfinity Home is my internet service provider)
I can login to a root shell on my machine (yes or no, or I don't know):
Yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
No (I use my own instance of Traefik/Portainer but need to have a certificate to access that interface)
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
Latest Version (auto integrated via docker)
My Docker setup:
services:
traefik:
# Use the latest Traefik image available
image: traefik:latest
# restart: unless-stopped
security_opt:
- no-new-privileges:true
env_file: ../secrets/.env
ports:
# Listen on port 80, default for HTTP, necessary to redirect to HTTPS
- 80:80
# Listen on port 443, default for HTTPS
- 443:443
dns:
- 8.8.8.8
- 8.8.4.4
- 1.1.1.1
deploy:
placement:
constraints:
# Make the traefik service run only on the node with this label
# as the node with it has the volume for the certificates
- node.labels.traefik-public.traefik-public-certificates == true
- node.role == manager
labels:
# Enable Traefik for this service, to make it available in the public network
- traefik.enable=true
# Use the traefik-public network (declared below)
- traefik.docker.network=traefik-public
# Use the custom label traefik.constraint-label=traefik-public
# When you first create the network, you need to create the node id
# A.K.A: export NODE_ID=$(docker info -f '{{.Swarm.NodeID}}')
# docker node update --label-add traefik-public.traefik-public-certificates=true $NODE_ID
# This public Traefik will only use services with this label
# That way you can add other internal Traefik instances per stack if needed
- traefik.constraint-label=traefik-public
# admin-auth middleware with HTTP Basic auth
# Using the variables in the .env
- traefik.http.middlewares.admin-auth.basicauth.users=[a hashed password]
# https-redirect middleware to redirect HTTP to HTTPS
# It can be re-used by other stacks in other Docker Compose files
- traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
- traefik.http.middlewares.https-redirect.redirectscheme.permanent=true
# traefik-http set up only to use the middleware to redirect to https
# Uses the environment variable DOMAIN
- traefik.http.routers.traefik-public-http.rule=Host(`traefik.otherrealm.org`)
- traefik.http.routers.traefik-public-http.entrypoints=http
- traefik.http.routers.traefik-public-http.middlewares=https-redirect
# traefik-https the actual router using HTTPS
# Uses the environment variable DOMAIN
- traefik.http.routers.traefik-public-https.rule=Host(`traefik.otherrealm.org`)
- traefik.http.routers.traefik-public-https.entrypoints=https
- traefik.http.routers.traefik-public-https.tls=true
# Use the special Traefik service api@internal with the web UI/Dashboard
- traefik.http.routers.traefik-public-https.service=api@internal
# Use the le (Let's Encrypt) resolver created below
- traefik.http.routers.traefik-public-https.tls.certresolver=le
# Enable HTTP Basic auth, using the middleware created above
- traefik.http.routers.traefik-public-https.middlewares=admin-auth
# Define the port inside of the Docker service to use
- traefik.http.services.traefik-public.loadbalancer.server.port=8080
## Headers
# Secure things by adding a number of security headers
- traefik.http.routers.traefik-public.middlewares=traefik-headers,middlewares-rate-limit@file
- traefik.http.middlewares.traefik-headers.headers.accesscontrolallowmethods=GET, OPTIONS, PUT
- traefik.http.middlewares.traefik-headers.headers.accesscontrolalloworiginlist=https://theotherrealm.org,https://otherrealm.org/
- traefik.http.middlewares.traefik-headers.headers.accesscontrolmaxage=100
- traefik.http.middlewares.traefik-headers.headers.addvaryheader=true
- traefik.http.middlewares.traefik-headers.headers.allowedhosts=traefik.otherrealm.org
- traefik.http.middlewares.traefik-headers.headers.hostsproxyheaders=X-Forwarded-Host
- traefik.http.middlewares.traefik-headers.headers.sslredirect=true
- traefik.http.middlewares.traefik-headers.headers.sslhost=traefik.otherrealm.org
- traefik.http.middlewares.traefik-headers.headers.sslforcehost=true
- traefik.http.middlewares.traefik-headers.headers.sslproxyheaders.X-Forwarded-Proto=https
- traefik.http.middlewares.traefik-headers.headers.stsseconds=63072000
- traefik.http.middlewares.traefik-headers.headers.stsincludesubdomains=true
- traefik.http.middlewares.traefik-headers.headers.stspreload=true
- traefik.http.middlewares.traefik-headers.headers.forcestsheader=true
- traefik.http.middlewares.traefik-headers.headers.framedeny=true
# - traefik.http.middlewares.traefik-headers.headers.customframeoptionsvalue=SAMEORIGIN # This option overrides FrameDeny
- traefik.http.middlewares.traefik-headers.headers.contenttypenosniff=true
- traefik.http.middlewares.traefik-headers.headers.browserxssfilter=true
# - traefik.http.middlewares.traefik-headers.headers.contentsecuritypolicy=frame-ancestors 'none'; object-src 'none'; base-uri 'none';
- traefik.http.middlewares.traefik-headers.headers.referrerpolicy=same-origin
- traefik.http.middlewares.traefik-headers.headers.featurepolicy=camera 'none'; geolocation 'none'; microphone 'none'; payment 'none'; usb 'none'; vr 'none';
- traefik.http.middlewares.traefik-headers.headers.customresponseheaders.X-Robots-Tag=none,noarchive,nosnippet,notranslate,noimageindex,
# - traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.permanent=true
# - traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.regex="https://(.*)/.well-known/(card|cal)dav"
# - traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.replacement = "https://$${1}/remote.php/dav/"
volumes:
# Add Docker as a mounted volume, so that Traefik can read the labels of other services
- /var/run/docker.sock:/var/run/docker.sock:ro
# Mount the volume to store the certificates
- traefik-public-certificates:/certificates/
command:
# Enable Docker in Traefik, so that it reads labels from Docker services
- --providers.docker
# Add a constraint to only use services with the label traefik.constraint-label=traefik-public
- --providers.docker.constraints=Label(`traefik.constraint-label`, `traefik-public`)
# Do not expose all Docker services, only the ones explicitly exposed
- --providers.docker.exposedbydefault=false
# - --providers.docker.network=proxy
# Enable Docker Swarm mode
- --providers.swarm.endpoint=unix:///var/run/docker.sock
- --providers.swarm.exposedbydefault=false
# Create an entrypoint http listening on port 80
- --entrypoints.http.address=:80
# Create an entrypoint https listening on port 443
- --entrypoints.https.address=:443
# Use staging during dev
# https://acme-staging-v02.api.letsencrypt.org/directory
# https://acme-v02.api.letsencrypt.org/directory
- --certificatesresolvers.le.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
# Create the certificate resolver le for Let's Encrypt, uses the environment variable EMAIL
- --certificatesresolvers.le.acme.email=the@otherrealm.org
# Store the Let's Encrypt certificates in the mounted volume
- --certificatesresolvers.le.acme.storage=/certificates/acme.json
# Use the TLS Challenge for Let's Encrypt
- --certificatesresolvers.le.acme.tlschallenge=true
# Enable the access log, with HTTP requests
- --accesslog
# Enable the Dashboard and API
- --api
networks:
# Use the public network created to be shared between Traefik and
# any other service that needs to be publicly available with HTTPS
- traefik-public
agent:
image: portainer/agent:latest
environment:
# REQUIRED: Should be equal to the service name prefixed by "tasks." when
# deployed inside an overlay network
AGENT_CLUSTER_ADDR: tasks.agent
# AGENT_PORT: 9001
# LOG_LEVEL: debug
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- agent-network
deploy:
mode: global
placement:
constraints: [node.platform.os == linux]
portainer:
image: portainer/portainer-ce:latest
command: -H tcp://tasks.agent:9001 --tlsskipverify
ports:
- "9443:9443"
- "9000:9000"
- "8000:8000"
volumes:
- portainer_data:/data
networks:
- traefik-public
- agent-network
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]
labels:
- traefik.enable=true
## HTTP Routers
- traefik.docker.network=traefik-public
- traefik.constraint-label=traefik-public
- traefik.http.routers.portainer-http.rule=Host(`portainer.otherrealm.org`)
- traefik.http.routers.portainer-http.service=portainer
- traefik.http.routers.portainer-http.entrypoints=http
- traefik.http.routers.portainer-http.middlewares=https-redirect
- traefik.http.routers.portainer-https.rule=Host(`portainer.otherrealm.org`)
- traefik.http.routers.portainer-https.service=portainer
- traefik.http.routers.portainer-https.entrypoints=https
- traefik.http.routers.portainer-https.tls=true
- traefik.http.routers.portainer-https.tls.certresolver=le
- traefik.http.services.portainer.loadbalancer.server.port=9000
- traefik.http.middlewares.portainer-http2https.redirectscheme.scheme=https
- traefik.http.middlewares.portainer-http2https.redirectscheme.permanent=true
- traefik.http.routers.portainer-http.middlewares=portainer-http2https
- traefik.http.routers.edge-http.rule=Host(`edge.otherrealm.org`)
- traefik.http.routers.edge-http.service=edge
- traefik.http.routers.edge-http.entrypoints=http
- traefik.http.routers.edge-http.middlewares=https-redirect
- traefik.http.routers.edge-https.rule=Host(`edge.otherrealm.org`)
- traefik.http.routers.edge-https.service=edge
- traefik.http.routers.edge-https.entrypoints=https
- traefik.http.routers.edge-https.tls=true
- traefik.http.routers.edge-https.tls.certresolver=le
- traefik.http.services.edge.loadbalancer.server.port=8000
- traefik.http.middlewares.edge-http2https.redirectscheme.scheme=https
- traefik.http.middlewares.edge-http2https.redirectscheme.permanent=true
- traefik.http.routers.edge-http.middlewares=edge-http2https
volumes:
# Create a volume to store the certificates, there is a constraint to make sure
# Traefik is always deployed to the same Docker node with the same volume containing
# the HTTPS certificates
traefik-public-certificates:
# Create a volume to store the Portainer data
portainer_data:
networks:
# Use the previously created public network traefik-public, shared with other
# services that need to be publicly available via this Traefik
traefik-public:
external: true
# Another network for Portainer
agent-network:
external: true

