1. The problem I’m having:
I’m trying to take a simple “brochure” wordpress site I’ve been maintaining for years on a VPS with nginx, php, mariadb, and move it into a local setup where I want to use docker-compose, caddy, frankenphp, and mariadb.
I’ve hit all kinds of errors. I’ve tried with and without https, though I’m not sure I ever got that right.
2. Error messages and/or full log output:
curl -vL https://nocnocs-localhost:8443
- Host nocnocs-localhost:8443 was resolved.
- IPv6: (none)
- IPv4: 127.0.0.1
- Trying 127.0.0.1:8443…
- ALPN: curl offers h2,http/1.1
- TLSv1.3 (OUT), TLS handshake, Client hello (1):
- CAfile: /etc/ssl/certs/ca-certificates.crt
- CApath: none
- TLSv1.3 (IN), TLS alert, internal error (592):
- TLS connect error: error:0A000438:SSL routines::tlsv1 alert internal error
- closing connection #0
curl: (35) TLS connect error: error:0A000438:SSL routines::tlsv1 alert internal error
## 3. Caddy version:
docker-compose exec ca
ddy caddy version
v2.9.1 h1:OEYiZ7DbCzAWVb6TNEkjRcSCRGHVoZsJinoDR/n9oaY=
4. How I installed and ran Caddy:
a. System environment:
uname -a
Linux xps55202025 6.14.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Apr 2025 18:43:59 +0000 x86_64 GNU/Linux.
b. Command:
docker-compose up
c. Service/unit/compose file:
cat docker-compose.yml
services:
mariadb:
image: mariadb:latest
container_name: mariadb
volumes:
- ./data/mariadb:/var/lib/mysql
- ./conf/maria.env:/etc/mysql/conf.d/mariadb.cnf
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
networks:
- backend
restart: always
frankenphp:
image: dunglas/frankenphp:latest
container_name: frankenphp
depends_on:
- mariadb
volumes:
- ./wordpress:/var/www/html
- ./conf/php.ini:/etc/php/8.3/fpm/php.ini
environment:
- SERVER_NAME=${SERVER_NAME}
- WORDPRESS_DB_HOST=mariadb:3306
- WORDPRESS_DB_NAME=${WORDPRESS_DB_NAME}
- WORDPRESS_DB_USER=${WORDPRESS_DB_USER}
- WORDPRESS_DB_PASSWORD=${WORDPRESS_DB_PASSWORD}
expose:
- "80" # Expose port 80 to other services in the same network
restart: always
networks:
- backend
caddy:
image: caddy:2-alpine
container_name: caddy
depends_on:
- frankenphp
volumes:
- ./data/caddy:/data
- ./data/caddy/config:/config
- ./Caddyfile:/etc/caddy/Caddyfile
ports:
- "8080:80"
- "8443:443"
restart: always
networks:
- backend
networks:
backend:
driver: bridge
d. My complete Caddy config:
cat Caddyfile
{
debug
}
nocnocs-localhost {
reverse_proxy frankenphp:80
file_server
}
5. Links to relevant resources:
I’ve been referring to the Caddy docs, using my not-great docker knowledge, and getting AI help.