demyxsh / demyx

Demyx is a Docker image that automates and manages WordPress installations. Traefik for reverse proxy with Lets Encrypt SSL/TLS. WordPress sites are powered by OpenLiteSpeed/NGINX-PHP and MariaDB.
https://demyx.sh
MIT License
142 stars 23 forks source link

Latest Demyx version does not create SSL certificate on subdomains #36

Closed Theofilos-Chamalis closed 4 months ago

Theofilos-Chamalis commented 4 months ago

On a fresh install with the latest demyx version, when trying to spin up a new wordpress app with the command: demyx run evolvium.evoptt.com --ssl=true --php=8.2 it reports the error: [2024-03-15-02:56:17] [ERROR] --ssl-wildcard is not supported with subdomains

My DEMYX host file has the following vars changed :

DEMYX_AUTH_USERNAME=myemail@email.com
DEMYX_AUTH_PASSWORD=mypassword
DEMYX_TRAEFIK_SSL-true
DEMYX_CF_KEY=my_cloudflare_global_api_key
DEMYX_DOMAIN=evolvium.evoptt.com
DEMYX_EMAIL=myemail@email.com
DEMYX_IP=my_vps_ip

When DEMYX_CF_KEY is reverted to false, then the error message for the same command as before is: [2024-03-15-03:02:46] [ERROR] Please update DEMYX_DOMAIN, DEMYX_EMAIL, and/or DEMYX_CF_KEY on the host

How can this be fixed?

VPS

Thanks!

demyxco commented 4 months ago

@Theofilos-Chamalis I have pushed a new image in the Docker hub that fixes this issue. You will need to provide DEMYX_CF_KEY if you do want to use --ssl-wildcard though. I will release 1.8.1 soon but here's how to solve it now:

Theofilos-Chamalis commented 4 months ago

@demyxco Thanks for the quick reply!

I have tried the steps described above:

  1. Changed DEMYX_DOMAIN, DEMYX_EMAIL, DEMYX_TELEMETRY, DEMYX_AUTH_USERNAME, DEMYX_AUTH_PASSWORD, DEMYX_AUTH_CPU, DEMYX_MEM
  2. Performed demyx pull demyx and demyx host restart
  3. Rerun the command demyx run evolvium.evoptt.com --ssl=true --php=8.2

but was still greeted with the same error: [2024-03-16-14:36:40] [ERROR] Please update DEMYX_DOMAIN, DEMYX_EMAIL, and/or DEMYX_CF_KEY on the host


Q1: I just need an ssl certificate for the subdomain evolvium.evoptt.com . Do I need to enable the --ssl-wildcard option? Q2: What does the DEMYX_CF_KEY stand for? Is it for the Cloudflare API Token, Cloudflare Global API Key or Cloudflare Origin CA Key? Q3: Do the options DEMYX_IP, DEMYX_HOSTNAME, DEMYX_SMTP, DEMYX_CODE_SSL, DEMYX_TRAEFIK_SSL play any role in this issue?

demyxco commented 4 months ago

Hi, sorry for the delay. The error was my fault due to the wrong if statement logic. The error should be fix now and was confirmed by someone in the Discord community. Please rerun those 3 commands:

Should give Traefik about a minute or so to issue the certificate.

Do I need to enable the --ssl-wildcard option?

No, it's not necessary for just regular SSL.

What does the DEMYX_CF_KEY stand for?

It requires the Global API Key.

Do the options DEMYX_IP, DEMYX_HOSTNAME, DEMYX_SMTP, DEMYX_CODE_SSL, DEMYX_TRAEFIK_SSL play any role in this issue?

Please read more on the Knowledge Base > Environment Variables

Theofilos-Chamalis commented 4 months ago

Thanks for the quick reply and for your hard work on the project @demyxco ! I can confirm that this issue is now resolved and I'm closing it :) .