

It also adds additional headers to improve security, including HTTP Strict Transport Security (HSTS) and Cross-Site Scripting (XSS) protection. These lines in the Caddyfile configure Caddy to forward HTTPS requests from port 443 to Vaultwarden. Reverse_proxy /notifications/hub vaultwarden:3012 # Redirect notifications to the WebSocket. # Disallow the site to be rendered within a frame (clickjacking protection) Strict-Transport-Security "max-age=31536000 " # Get a cert by using the ACME HTTP-01 challenge. The first thing is to create a configuration file for Caddy called Caddyfile:Īdd the following to the same, save, and then exit: Due to its lightweight, I will use Caddy to reverse proxy our Docker container. If you see no errors, you should see the contents of the YML file, else re-check if you made mistakes while copy-pasting the content or when replacing the domain and email data.Ĭaddy is an open-source web server platform designed to be secure and easy to use. Then create a Docker Compose configuration file:Įnsure to replace and the email with your domain and email, respectively. To do so, make a new folder in your home directory called vaultwarden, and enter it:

I will create a docker container using the compose plugin. You'll need to follow the rest of this guide and do "docker-compose up -d" instead. If in case you already use the "docker-compose" command to deploy containers, then that should work too. If you've installed Docker using our guide, then you've installed compose as well.

Manually fetching docker-compose binary is no longer necessary as Docker now provides a compose package. To install Docker, please refer to Webdock’s official guide here. This allows you to package your application with all its dependencies, making it easy to deploy and run on any system. Containers are small and lightweight execution environments that use the operating system kernel but otherwise run in isolation from each other. Fully Qualified Domain (Can be a subdomain)ĭocker is a software platform that enables you to build applications using containers.A Plain Ubuntu Server (Ubuntu Jammy in my case).
