For this installation, we need the following prerequisites:
Note: When you type in your app password, remember there should be no spaces. Google will generate the password with spaces. You should remove all the spaces.
Now, let's start the installation procedures:
mkdir docker -p && mkdir docker/vaultwarden -p && cd docker/vaultwarden && mkdir data
Use the below command to list open ports:
sudo netstat -tulpn | grep LISTEN
Now please go to your Portainer web console and create a new stack by using the below scripts according to the Video of this episode and hit deploy the stack.
version: '3'
services:
vaultwarden:
restart: always
container_name: vaultwarden
image: vaultwarden/server:latest
volumes:
- /root/docker/vaultwarden/data/:/data/
ports:
- 8062:80
environment:
- SMTP_HOST=smtp.gmail.com
- [email protected]
- SMTP_FROM_NAME=My VaultWarden Server
- SMTP_SECURITY=starttls
- SMTP_PORT=587
- [email protected]
- SMTP_PASSWORD=your own 16 characters secret password generated by google
- SMTP_TIMEOUT=30
- SMTP_AUTH_MECHANISM="Plain"
- LOGIN_RATELIMIT_MAX_BURST=10
- LOGIN_RATELIMIT_SECONDS=60
- DOMAIN=https://your domain or subdomain address
- INVITATION_ORG_NAME=HomeVault
- INVITATIONS_ALLOWED=true
- ADMIN_TOKEN=some-long-strong-password-for-your-email-user-i-hope
- SIGNUPS_ALLOWED=false
- SIGNUPS_DOMAINS_WHITELIST=gmail.com,example.com,mydomain.net,myotherdomain.org
- SIGNUPS_VERIFY=true
- SIGNUPS_VERIFY_RESEND_TIME=3600
- SIGNUPS_VERIFY_RESEND_LIMIT=6
- EMERGENCY_ACCESS_ALLOWED=true
- SENDS_ALLOWED=true
- WEB_VAULT_ENABLED=true
Note: You can change the left section of ":" ports based on the free ports that you have on your server “In the above example I chose 8062”.
Now you should go to the NPM web admin console and create a proxy host before anything for Vaultwarden service because you cannot go forward without SSL. After that, you can browse Vaultwarden by using the https://your domain or subdomain address
and you can create your desired user the same as the video.
After verifying your email address via a sent link to your mailbox, you can connect to the Vaultwarden service and many more settings that you can find in the related video of me on Youtube.
Also, you can install the Chrome browser extension, Firefox add-ons, and Microsoft Edge add-ons. If you want to use that on your mobile phone you can install the Android and IOS version of either.
Finally, don't forget to use 2FA, and please save your recovery codes in a security page and 2FA tab.
Good luck and be safe…