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?
Had the same problem on my Synology NAS. Thank you for posting your solutions. They were really helpful.
For anyone still struggling with the issue and finding this post, here’s a little script I am running from a scheduled task to keep my bitwarden up to date and fix the ports automatically:
export bwdir=/path/to/bitwarden/bitwarden # set this to the bitwarden directory inside your bitwarden installation
export timestamp=$(date +%Y%m%d_%H%M)
echo "####### bitwarden.sh updateself =>"
echo "####### ./bitwarden.sh update =>"
# Create a backup copy of run.sh and then replace the ports
# I am using 3443 and 3080. Adapt according to your port mapping.
sed -i.ORIG_$timestamp "s/p 443:443/p 3443:443/" $script && \
sed -i "s/p 80:80/p 3080:80/" $script
Note: you’ll have to clean up old backup copies occasionally.