# How to install certbot with anthias nginx docker container

**URL:** <https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535>\
**Category:** Anthias\
**Created:** [August 8, 2024, 5:57pm UTC](https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535 "2024-08-08T17:57:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sul](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sul](https://forums.screenly.io/u/sul)\
**Post date:** [August 8, 2024, 5:57pm UTC](https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535/1 "2024-08-08T17:57:07Z")

</div>

Hi,

can someone help with instructions to install certbot to automatically renew ssl certificates on my Raspberry Pi 4 running Anthias? I think since nginx is running inside a docker container, certbot can’t find it. Here is the error:

$ sudo certbot --nginx

“The nginx plugin is not working; there may be problems with your existing configuration.  
The error was: NoInstallationError(“Could not find a usable ‘nginx’ binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.”)”

Appreciate any working solution to this.

Thank you!

-sul.

---

<div class="post-metadata">

**Author:** ![nicomiguelino](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@nicomiguelino](https://forums.screenly.io/u/nicomiguelino)\
**Post date:** [August 8, 2024, 6:11pm UTC](https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535/2 "2024-08-08T18:11:19Z")

</div>

@sul, I haven’t tried this yet, but you can try to do it inside the Docker container itself:

```bash
$ cd ~/screenly
$ docker compose exec anthias-nginx bash

# Make sure that you have certbot installed.
$ sudo apt-get install -y certbot
$ sudo certbot --nginx

```

If it works, take note that the workaround is only temporary. Generated files might be removed when the Docker containers restart.

---

<div class="post-metadata">

**Author:** ![sul](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sul](https://forums.screenly.io/u/sul)\
**Post date:** [August 8, 2024, 7:17pm UTC](https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535/3 "2024-08-08T19:17:43Z")

</div>

@nicomiguelino

Thank you for the suggestion. I tried your instructions. It ran bash in the correct container, installed certbot, but unfortunately the last command results in the same kind or error as before:

root@0485028c74d8:/# sudo certbot --nginx  
Saving debug log to /var/log/letsencrypt/letsencrypt.log  
The requested nginx plugin does not appear to be installed

thanks!

-s.

---

<div class="post-metadata">

**Author:** ![nicomiguelino](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@nicomiguelino](https://forums.screenly.io/u/nicomiguelino)\
**Post date:** [August 8, 2024, 8:00pm UTC](https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535/4 "2024-08-08T20:00:15Z")

</div>

Have you tried the following?

```bash
$ sudo apt install python-certbot-nginx

```

See this GitHub comment for [reference](https://github.com/certbot/certbot/issues/1736#issuecomment-295446471).

---

<div class="post-metadata">

**Author:** ![sul](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sul](https://forums.screenly.io/u/sul)\
**Post date:** [August 9, 2024, 12:54am UTC](https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535/5 "2024-08-09T00:54:12Z")

</div>

@nicomiguelino

Strangely, it is unable to find that module.

```auto
root@0485028c74d8:/# sudo apt install python-certbot-nginx
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python-certbot-nginx

```

---

<div class="post-metadata">

**Author:** ![nicomiguelino](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@nicomiguelino](https://forums.screenly.io/u/nicomiguelino)\
**Post date:** [August 9, 2024, 2:06pm UTC](https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535/6 "2024-08-09T14:06:51Z")

</div>

@sul, in that case, you can run the following:

```bash
sudo apt-get install python3-certbot-nginx

```

I can verify that the package above exists for the NGINX Docker container by running `apt info python3-certbot-nginx`:

```bash
root@48a11fec5ac2:/# apt info python3-certbot-nginx
Package: python3-certbot-nginx
Version: 2.1.0-2
Priority: optional
Section: python
Source: python-certbot-nginx
Maintainer: Debian Let's Encrypt <team+letsencrypt@tracker.debian.org>
Installed-Size: 175 kB
Depends: certbot, nginx, python3-acme-abi-2 (>= 2.1), python3-certbot-abi-2 (>= 2.1), python3-acme, python3-certbot, python3-openssl, python3-pkg-resources, python3-pyparsing, python3:any
Suggests: python-certbot-nginx-doc
Homepage: https://letsencrypt.org/
Download-Size: 37.4 kB
APT-Sources: http://archive.raspbian.org/raspbian bookworm/main armhf Packages
Description: Nginx plugin for Certbot
 The objective of Certbot, Let's Encrypt, and the ACME (Automated
 Certificate Management Environment) protocol is to make it possible
 to set up an HTTPS server and have it automatically obtain a
 browser-trusted certificate, without any human intervention. This is
 accomplished by running a certificate management agent on the web
 server.
 .
 This agent is used to:
 .
   - Automatically prove to the Let's Encrypt CA that you control the website
   - Obtain a browser-trusted certificate and set it up on your web server
   - Keep track of when your certificate is going to expire, and renew it
   - Help you revoke the certificate if that ever becomes necessary.
 .
 This package contains the Nginx plugin to the main application.

```

---

<div class="post-metadata">

**Author:** ![nicomiguelino](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@nicomiguelino](https://forums.screenly.io/u/nicomiguelino)\
**Post date:** [August 9, 2024, 2:11pm UTC](https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535/7 "2024-08-09T14:11:48Z")

</div>

@sul, after running `sudo apt-get install python3-certbot-nginx`, `sudo apt-get install -y certbot`, and then `sudo certbot --nginx`, it seems that the `certbot` installation succeeded, at least given the following output:

```bash
$ sudo certbot --nginx

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel):

```

---

<div class="post-metadata">

**Author:** ![sul](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sul](https://forums.screenly.io/u/sul)\
**Post date:** [August 9, 2024, 7:44pm UTC](https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535/8 "2024-08-09T19:44:12Z")

</div>

@nicomiguelino

Thank you for the instructions. I was able to install python3-certbox-nginx successfully as well as certbot. Although certbot ran fine, it complained about an ‘A’ record being missing since I am using cname in my dns–this is probably a separate issue altogether. Regardless, unfortunately, anthias seems to have broken along the way because I can no longer see the admin website. I will reformat and reinstall anthias on the RPi 4 again. Will let you know what happens.

Thank you,  
-sul.

---

<div class="post-metadata">

**Author:** ![extremeskillz](https://avatars.discourse-cdn.com/v4/letter/e/439d5e/32.png) [@extremeskillz](https://forums.screenly.io/u/extremeskillz)\
**Post date:** [August 13, 2024, 2:36am UTC](https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535/9 "2024-08-13T02:36:28Z")

</div>

I access my anthias signs with a reverse proxy, saving me the hassle of this. Maybe that will work for you too?

---

<div class="post-metadata">

**Author:** ![nicomiguelino](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@nicomiguelino](https://forums.screenly.io/u/nicomiguelino)\
**Post date:** [August 13, 2024, 2:55pm UTC](https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535/10 "2024-08-13T14:55:22Z")

</div>

@sul, you can refer to the following discussion about using a reverse proxy instead: [How to enable https on Raspberry Pi 4 running 64bit bookworm](https://forums.screenly.io/t/how-to-enable-https-on-raspberry-pi-4-running-64bit-bookworm/1540)

(Thank you @extremeskillz for sharing your setup in that discussion.)

---

<div class="post-metadata">

**Author:** ![vpetersson](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.screenly.io/vpetersson/32/8_2.png) [@vpetersson](https://forums.screenly.io/u/vpetersson)\
**Post date:** [June 9, 2026, 9:27am UTC](https://forums.screenly.io/t/how-to-install-certbot-with-anthias-nginx-docker-container/1535/11 "2026-06-09T09:27:43Z")

</div>

Good news, you do not need certbot for this anymore. The enable\_ssl.sh script that ships with Anthias sets up HTTPS for you, and if you give it a domain name it will automatically obtain and renew a free Let’s Encrypt certificate, with no certbot and no fiddling inside the container. Marking this as solved. If you would like help running it for your setup, tell us your domain arrangement and we will point you to the right options.
