Certbot problem while setup on existing server


I have setup Bitwarden server on My small server, nothing fancy, but it holds (almost) all of My cloud stuff. As I used My existing server I have problems whit Certbot. I was hosting other services and pages before Bitwarden and I had already setup Certbot. Bitwarden comes whit Certbot integrated in docker and that is causing problems… I cant use two Certbot instances as bot require port 443 to be open for it, it creates conflicts. I have tried to use manually in some way, but whit out success. In ideal conclusion I have My existing Certbot running and generating, renewing also Bitwarden certificate whit out Certbot running on Docker.

Can anyone have suggestions how to setup in this way?

i made these modification to the run.sh scrip

grep -in certbot bwdata/scripts/run.sh 
87:            docker pull certbot/certbot
88:            docker run -it --rm --name certbot -p 8080:80 -v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ certbot/certbot \
132:        docker pull certbot/certbot
133:        docker run -i --rm --name certbot -p 8443:443 -p 8080:80 \
134:            -v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ certbot/certbot \

which allow me to run certbot on port 8080 for http and 8443 for https.

1 Like

Brilliant, seems to be working, tnx.

I still have issues. When I try to update Bitwarden I got "“Error starting userland proxy: listen tcp listen: address already in use.” error in docker.

And how save are there port change modifications? They will stay after update or I will need to reapply on every update?

Edit: Got it, update replaces run.sh script and that’s why it fails to start again.

I just replaced ports as shown and it runs. Those edits are wiped after update but take a notice of it and Your fine.