Problem
How to setup a Mail Relay in BitWarden?
How to setup the SMTP Server in BitWarden?
Solution
Follow the guide below to configure BitWarden to use outMail as a Internet Mail Relay.
This article assumes you are running a self-hosted version of BitWarden and that you have already installed it and its working.
In order for BitWarden to send emails via outMail you need to change the SMTP Server settings. This can be achieved by editing the global override environment variables.
Edit the file called bwdata/env/global.override.env and change the following lines
[email protected] globalSettings__mail__smtp__host=smtpgmail.com globalSettings__mail__smtp__port=587 globalSettings__mail__smtp__ssl=false [email protected] globalSettings__mail__smtp__password=gmail password (This is the gmail app password you created)
While in the file it's best to configure the following:
globalSettings__disableUserRegistration=true (if you don't want people to register for an account).
[email protected] to access the admin console via https://subdomain.domain.com/admin
Once settings have been made restart bitward.
sudo ./bitwarden.sh restart
For more information on the BitWarden global vars please see the documentation - bitwarden.com/help/article/environment-variables
Cloud Flare DDNS
in Apps
Posted
Are you hosting service on a dynamic IP and receiving a new IP when bouncing your router or firewall?
prerequisites:
1. In portainer go to stacks. and create a new stack.
2. Copy the below docker-compose into the editor adding your API key.
version: '2' services: cloudflare-ddns: image: oznu/cloudflare-ddns:latest restart: always environment: - API_KEY=xxxxxxx - ZONE=example.com - SUBDOMAIN=subdomain #remove - PROXIED=yes
3. I remove the "SUBDOMAIN" environment as I use CNAME for all my subdomains. Meaning if I update the IP of my A record then my subdomains that use CNAME records are updated.
4. Before clicking on deployment let's set up a test scenario. Go to Cloud Flare and change the last octet of the IP.
5. Back in Portainer click deploy.
6. Go to container logs and verify the container is running. You should see the IP change.
7. In cloud flare verify the DNS has changed to reflect your current IP.
8. In the environment you will see a cron job to run every 5 minutes. This can be changed to your needs.