How to build VaultWarden/MariaDB on Portainer with Nginx

Vault warden is a password Manager, This app is the best I have and my company using this password manager. It is very helpful for team that can log in for our business and help employees to access instead of waiting for the leader or owner to respond to us for email or password or TOTP code. So, It better to build and make this for your small business or over 500 employees. It will save your headaches. And times.

Make sure you’re running the Portainer and Nginx Proxy Manager before we start this.

We will need to go open PhpMyAdmin to create Database and user for vault warden. If you don’t have one, then follow this instruction to set up PhpMyAdmin.

Login to PhpMyAdmin, then create a database

Login to your admin account

Then click new for database to create.

Create any name you prefer, only you need to make sure it matches on your docker-compose below.

Then now we have to create a user, so we have to go “privileges” in the Menu

Click Privileges on the top bar

Then click add user account

Make sure you create a username and password(I used generate password) since it is not exposed public, so my database is safe.

That it then now we go to create the vault warden on Portainer.

Open Portainer site → login admin → stacks → Add Stacks:

version: '3.3'
      - nginx
      - mariadb
    container_name: vaultwarden
    image: vaultwarden/server:latest
    restart: unless-stopped
      - ROCKET_PORT=80
      - DATABASE_URL=mysql://user:password@databasecontainer_name:3306/databasename
      - ADMIN_TOKEN=
      - TZ=America/los_Angeles
      - SMTP_PORT=465
      - SMTP_SECURITY=force_tls
      - SMTP_PASSWORD=PsoMEr,?,25
      - 80
      - 3012
      - /mnt/applegatebackup/vaultwarden/data/:/data/
   external: true
   external: true


Leave a Reply

Your email address will not be published. Required fields are marked *