Bitwarden is a free and open-source password management (password manager) service that stores sensitive information such as website credentials in an encrypted vault. The Bitwarden platform offers a variety of client applications including a web interface, desktop applications, browser extensions, mobile apps, and a CLI. In this step by step guide I will teach you how to install official Bitwarden on your UGREEN NAS device using Docker & Portainer.
Bitwarden v2025.2.0 release.
This guide works perfectly with the latestSTEP 1
Please Support My work by Making a Donation.
STEP 2
Install Portainer using my step by step guide. If you already have Portainer installed on your UGREEN NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.
STEP 3
⚠️Mandatory: Enable HTTPS on your UGREEN NAS.
STEP 4
Create a new hostname on the noip website using your noip account. For example, I have created bitwardenmarius as hostname and I use the free ddns.net domain. In the IP Address area, type in your own IPV4 IP address from your ISP, then click Create/Add Hostname. Follow the instructions in the image below.
STEP 5
Go to File Manger and open the docker folder. Inside the docker folder, create one new folder and name it bitwarden. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
STEP 6
Now create three new folders inside the bitwarden folder that you have previously created at STEP 5 and name them data, db, logs. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
STEP 7
Download (click on the blue link below) and upload the my.cnf file below in the db folder that you have previously created at STEP 6. Follow the instructions in the image below. 🔒Note: Support my work to unlock the password. You can use this password to download any file on mariushosting forever!
STEP 8
Launch your browser then go to the official Bitwarden website by clicking on the blue link below.
On the Admin Email Address field type in your own email. I recommend you use a Gmail account. Select your Data Region, then click Submit. Follow the instructions in the image below.
STEP 9
After you click Submit at STEP 8, you will automatically get an INSTALLATION ID and an INSTALLATION KEY. Copy and save them to a safe place because you will need them at STEP 12.
STEP 10
Follow my step by step guide on how to activate SMTP for your Gmail account. This step is mandatory. Note: If you don’t want to use the easiest way for SMTP with Google and you already have SMTP details from your own Mail Server, you can just skip this STEP and use your personalized email SMTP details instead.
STEP 11
Log into Portainer using your username and password. On the Portainer left sidebar click on Stacks then + Add stack. Follow the instructions in the image below.
STEP 12
In the Name field type in bitwarden. Follow the instructions in the image below.
services: db: image: mariadb:11.4-noble #LTS Long Time Support Until May 29, 2029. container_name: Bitwarden-DB hostname: bitwarden-db security_opt: - no-new-privileges:false environment: - TZ=Europe/Bucharest - MYSQL_ROOT_PASSWORD=rootpass - MYSQL_DATABASE=bitwarden_vault - MYSQL_USER=bitwardenuser - MYSQL_PASSWORD=bitwardenpass volumes: - /volume1/docker/bitwarden/db:/var/lib/mysql:rw - /volume1/docker/bitwarden/db:/etc/mysql/conf.d:rw restart: on-failure:5 bitwarden: image: bitwarden/self-host:beta container_name: Bitwarden hostname: bitwarden security_opt: - no-new-privileges:true healthcheck: test: curl -fsSo - http://localhost:8080 environment: - BW_DOMAIN=yourownhostname.ddns.net - BW_DB_PROVIDER=mysql - BW_DB_SERVER=bitwarden-db - BW_DB_DATABASE=bitwarden_vault - BW_DB_USERNAME=bitwardenuser - BW_DB_PASSWORD=bitwardenpass - BW_INSTALLATION_ID=Your-Own-Bitwarden-Installation-ID - BW_INSTALLATION_KEY=Your-Own-Bitwarden-Installation-KEY - UID=999 - GID=10 - BW_ENABLE_ADMIN=true - globalSettings__logDirectory=/etc/bitwarden/logs - adminSettings__admins=Your-own-gmail-address - globalSettings__disableUserRegistration=false - globalSettings__mail__replyToEmail=Your-own-gmail-address - globalSettings__mail__smtp__host=smtp.gmail.com - globalSettings__mail__smtp__ssl=false - globalSettings__mail__smtp__port=587 - globalSettings__mail__smtp__username=Your-own-gmail-address - globalSettings__mail__smtp__password=Your-own-app-password ports: - 9890:8080 volumes: - /volume1/docker/bitwarden/data:/etc/bitwarden - /volume1/docker/bitwarden/logs:/var/log/bitwarden restart: on-failure:5 depends_on: db: condition: service_started
Note: Before you paste the code above in the Web editor area below, change the value for TZ. (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area below, change the value for BW_DOMAIN with your own DDNS hostname without https:// at the beginning that you have previously created at STEP 4
Note: Before you paste the code above in the Web editor area below, change the value for BW_INSTALLATION_ID and type in your own Bitwarden INSTALLATION ID that you have previously copied and saved at STEP 9.
Note: Before you paste the code above in the Web editor area below, change the value for BW_INSTALLATION_KEY and type in your own Bitwarden INSTALLATION KEY that you have previously copied and saved at STEP 9.
Note: Before you paste the code above in the Web editor area below, change the value numbers for UID and GID with your own values. (Follow my step by step guide on how to do this.) 999 is my personal UID value and 10 is my personal GID value. You have to type in your own values.
Note: Before you paste the code above in the Web editor area below, change the value for adminSettings__admins and type in your own Gmail address. STEP 10.
Note: Before you paste the code above in the Web editor area below, change the value for globalSettings__mail__replyToEmail and type in your own Gmail address. STEP 10.
Note: Before you paste the code above in the Web editor area below, change the value for globalSettings__mail__smtp__username and type in your own Gmail address. STEP 10.
Note: Before you paste the code above in the Web editor area below, change the value for globalSettings__mail__smtp__password and type in your own Gmail app password. STEP 10.
STEP 13
Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.
STEP 14
If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.
STEP 15
Open your Nginx Proxy Manager container that you have previously installed at STEP 3. Click Add Proxy Host. A new pop up window will open. Add the following details:
Domain Names: Type in your own noip domain name that you have previously created at STEP 4.
Scheme: http
Forward Hostname/IP: Type in the local NAS IP of your UGREEN NAS.
Forward Port: Type in the Bitwarden local Port that is 9890
Check Block Common Exploits
Check Websockets Support
Click the SSL tab. Follow the instructions in the image below.
STEP 16
After you click the SSL tab, add the following details:
SSL Certificate: Request a new SSL Certificate
Check: Force SSL
Check: HSTS Enabled
Check: HTTP/2 Support
Email Address for Let’s Encrypt: Type in your own Email Address.
Check: I Agree to the Let’s Encrypt Terms of Service.
Click Save. Follow the instructions in the image below.
STEP 17
In the Proxy Hosts area, if everything goes right, you will see that your hostname has been generated. Click on it. Follow the instructions in the image below.
STEP 18
Now open your browser and type in your HTTPS/SSL certificate like this https://yourownhostname.ddns.net/#/signup In my case it’s https://bitwardenmarius.ddns.net/#/signup If everything goes right, you will see the Bitwarden Register account page. Type in your own Email (adminSettings__admins) that you have previously added at STEP 12, and Name. Click Continue. Follow the instructions in the image below. Note: If you forget to add /#/signup after your DDNS, you will not be able to register an account.
STEP 19
Type in your Master Password, confirm it, then click Create Account. Wait a few seconds until your account is created. Follow the instructions in the image below.
STEP 20
Wait a few seconds until your account is created. Follow the instructions in the image below.
STEP 21
After the account is created, you will also receive a Welcome email. Go to the next STEP.
STEP 22
Your official Bitwarden at a glance!
STEP 23
One of the most important things you need to know about Bitwarden is that anyone who can access your HTTPS Bitwarden link can register for a new account by default. Follow my step by step guide below to disable registration of new users in Bitwarden. Open Portainer then go to Stacks. Localize then click on your bitwarden stack that you have previously created at STEP 12. Click the EDITOR tab then change the value on line globalsettings__disableUserRegistration from:
– globalsettings__disableUserRegistration=false to – globalsettings__disableUserRegistration=true
Click Update the stack. Follow the instructions in the image below.
A new pop up window will open. Click Update.
When new users try to register, they will receive the following error message: “An error has occurred. Open Registration has been disabled by the system administrator”. To reactivate user registration, change the value from true to false.
STEP 24
If you want, you can also access your Bitwarden admin dashboard at https://yourownhostname.ddns.net/admin In my case it’s https://bitwardenmarius.ddns.net/admin
STEP 25
You can also change the theme from Light to Dark. On the left sidebar in Bitwarden, click Settings, then Preferences. Select the Dark theme, then click Save. Follow the instructions in the image below.
STEP 26
Your Bitwarden dashboard at a glance!
Enjoy Bitwarden on your UGREEN NAS!
If you get an error message when registering that says: unhandled server error, just wait for a few seconds/minutes, then click the Continue button again. If the error message pops up again, make sure the BW_DOMAIN at STEP 12 is correctly added. Also check if your email credentials at STEP 12 are correct. If you notice there was a typo somewhere in your compose stack at STEP 12, you will need to start the Bitwarden installation from scratch. Remember to follow the Docker Clean guide to the letter before your start the installation again. And make sure there are no typos next time.
This post was updated on Wednesday / February 26th, 2025 at 11:52 AM