Self signed certs with argo tunnel

Hi guys, I’m really confused. I’m trying to add self signed certificates for my docker container. I used docker compose on portainer to create a Vaultwarden image. I created a self signed cert in /etc/docker/certs.d and I have no idea how to attach it to my docker container. I can’t create an account on Vaultwarden until I use HTTPS. My argo tunnel is useless since my cloudflare cert is used for the client to cloudflare. I would like to make an SSL certificate for my subdomain. I am running Ubuntu 22.04 CLI.

I created Vaultwarden with the following:

version: “2”
services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
volumes:
- /var/lib/docker/volumes/vaultwarden:/data/
ports:
- 8001:80
- 4301:443
restart: unless-stopped

Most people use nginx, my reverse proxy is Cloudflare, so nginx isn’t an option for me.

/etc/docker/certs.d is not for web services running in containers. If you want HTTPS, you need the configure the application in the container. Docker will not help you with that. At least not the Docker daemon.

If the application itself doesn’t support SSL, you can use a reverse proxy that does.

If you read the description of the vaultwarden image: https://hub.docker.com/r/vaultwarden/server
you can learn about proxies and SSL. You will also find a link to examples:
https://github.com/dani-garcia/vaultwarden/wiki/Proxy-examples
which includes examples for configuring free SSL certificates generated by Let’sEncrypt. So you don’t need self-signed certs if the domain is public…