Certificate on a Container

Hi!

I installed Mautic inside a container that is running on a CentOS 7 and I need to get a certificate to this mautic website that is running inside the container, I’m not sure how to even start doing that, can someone help me?

Many thanks!!

Hi @victor.racy,

Welcome to the community forum!

What OS is the container running and what OS is the host running? I know you said Cent 7, but I just want to be sure. Have you thought about proxying the published container port through a webserver such as Caddy, Apache, or Nginx? A proxy would allow your mautic app to come online without a cert and the webserver would handle TLS termination instead.

3 Likes

there is nothing special on getting a certificate in a container. The letsencrypt server don’t know, care about or even see your containers, the only thing it can see is the public IP address of your computer. So if your public IP address transfers (nats) the 80 and 443 ports to your container and the container can talk to the internet on the 443 port, your acme client will run fine.

4 Likes

Hi Phil!

It’s the CentOS Linux 7 with Linux 3.10.0-957

I already have the app online and can access it through the internet, but it shows as an insecure connection and we can’t have that because my client will be accessing it and it doesn’t look good. I’m trying to search for this proxy solution you mentioned. Thanks!

1 Like

Hi @victor.racy

how did you create the certificate?

As @gpatel-fr wrote, doesn't look like a container problem, more a general "certificate creation" problem.


Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:

It produced this output:

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):

Hi Juergen!

The error when I try to run the certbot says that there’s nothing listening on port 80 so it can’t confirm the domain. My apache server is inside the container with the mautic app. I have to configure just this apache inside the container or do I have to do something else outside to route things to the container?

Thanks!

I don't know. But your domain must be visible, public, worldwide visible. So Letsencrypt is able to check your domain.

If this doesn't work, you have to fix your configuration.

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