acme2certifier icon indicating copy to clipboard operation
acme2certifier copied to clipboard

Docker image ports different in documentation

Open Szaamaan opened this issue 11 months ago • 4 comments

I'm using the latest image grindsa/acme2certifier:0.40.1-nginx-wsgi and I'm having some port-related issues.

The documentation for Docker config indicates that ports 22443 and 22280 should be used. However I couldn't get this to work.

Eventually I started the container with that image and opened a shell inside, and:

  • I could do curl localhost
  • I could NOT do curl http://localhost:22280
  • I could NOT do curl https://localhost
  • I could NOT do curl https://localhost:22443

It appears only the most basic HTTP port is actually being exposed in this image.

Am I doing something wrong or are the documentation-defined ports indeed missing from this image? If they are missing (and I'm not doing anything stupid) how can I get acme2certifier to offer up a HTTPS port? A recent update to traefik seems to require HTTPS connections to ACME CA and doesn't play nice with just an HTTP port.

Szaamaan avatar Dec 17 '25 19:12 Szaamaan

Hi, you are new to docker configuration, remapping ports is assumed knowledge for docker and not specific to this project. The linked documentation is for an example configuration and corresponds to the docker compose file: https://github.com/grindsa/acme2certifier/blob/master/examples/Docker/docker-compose.yml

Typically inside containers things like web servers use their default ports (e.g. 80 for http), but when you actually want to run it from a host the assumption would be that your host port 80 is possibly busy doing something else. When you start your docker container you have the option of remapping ports (e.g. use 22280 instead of 80) to one that's free on your localhost. If you use a docker compose file you can repeat this process with the same config when you update the image etc.

Another key part (included in the example docker compose file) is also the volume mapping, otherwise your container storage is ephemeral and will be destroyed when you next update the container image.

webprofusion-chrisc avatar Dec 18 '25 00:12 webprofusion-chrisc

Hi,

Another remark: Although port 22443 is exposed as port 443, the corresponding SSL service will only start if both a certificate and a key file are present in /var/www/acme2certifier/volume.

This means you must mount a volume or directory to this path and ensure the following files exist there:

  • Certificate file: acme2certifier_cert.pem
  • Key file: acme2certifier_key.pem

Instructions in docker-entrypoint script Documentation

HTH /G.

grindsa avatar Dec 18 '25 05:12 grindsa

Hi, you are new to docker configuration, remapping ports is assumed knowledge for docker and not specific to this project.

Hi, I feel you missed a key point. The documentation expects the internal ports to be 22280 and 22443. However it appears, at least with the image I was using, that there's just internal port 80; 22280 and 22420 don't seem to be open.

I've checked this by opening a shell INSIDE the containers, not outside (port mapping doesn't apply yet), and I wrote as much in my original message.

My point is that with the grindsa/acme2certifier:0.40.1-nginx-wsgi image I do not need to map 80:22280... I just need to map 80:80, which seems to be counter to the documentation. Or at least somewhat confusing.

Szaamaan avatar Dec 18 '25 06:12 Szaamaan

Hi,

Another remark: Although port 22443 is exposed as port 443, the corresponding SSL service will only start if both a certificate and a key file are present in /var/www/acme2certifier/volume.

This means you must mount a volume or directory to this path and ensure the following files exist there:

  • Certificate file: acme2certifier_cert.pem
  • Key file: acme2certifier_key.pem

Instructions in docker-entrypoint script Documentation

HTH /G.

Good point - I've missed that. With the added certificate files the local 443 port now opens. However, as previously stated, I just need to map 80:80 and 443:443, NOT 443:22443 or 80:22280...

Szaamaan avatar Dec 18 '25 07:12 Szaamaan

HI, sorry for delay in responding. As suggested I updated the documentation. Feel free to have a look and provide feedback.

Happy holidays... /G.

grindsa avatar Dec 28 '25 11:12 grindsa