How to use Certbot with Spring Boot and Docker and Apache Tomcat

Does anyone have any experience with using Let's Encrypt/Certbot on an embedded Tomcat server with Spring Boot, which is being run in a Docker container? I can't seem to get this working.

My domain is:

My web server is (include version): Apache Tomcat

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

My hosting provider, if applicable, is: Digital Ocean

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

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

Hi @furdturg and welcome to the LE community forum :slight_smile:

I'm not sure if Spring Boot requires anything non-standard or not.
I'm pretty sure Docker containers can be used like any other VM type solution.
And I do know that Apache Tomcat is no ordinary Apache and should be dealt with by following their recommended installation procedures OR simply place it behind a regular reverse proxy (for faster results).

So... if you can NAT the ports (80/443) to your host and extend (expose) them to the Docker instance, you should be able to obtain a cert for your Tomcat via certbot with HTTP-01 authentication.
I don't have any guide for such a feat but, if you break it down, it really isn't that complicated.
[the hardest part is dealing with Apache Tomcat]

I found this online:


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