[GH-ISSUE #1030] Further problems with branding #724

Closed
opened 2026-03-03 02:02:35 +03:00 by kerem · 8 comments
Owner

Originally created by @fuanegua on GitHub (Jun 11, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1030

Thanks a lot for this great opportunity to run on Raspberry Pi! It works all fine!
… except the custom email-templates. What did I wrong?

I’ve tried it this way:

docker pull bitwardenrs/server:raspberry
docker run -d --name bitwarden -v /bw-data/:/data/ -p 8005:80 -e ADMIN_TOKEN=<token> --restart always  -e TEMPLATES_FOLDER=/bw-data/templates/ -e RELOAD_TEMPLATES=true -e ROCKET_TLS='{certs="/ssl/live/<example.com>/fullchain.pem",key="/ssl/live/<example.com>/privkey.pem"}'  -v /etc/letsencrypt/:/ssl/ bitwardenrs/server:raspberry

Also I can’t change the logos and images, so they are outside this folder in /src/static/images. Is there a way to set this folder to /bw-data/ as well?

Docker is just a new field to me. So sorry if this question is a little stupid.

Originally created by @fuanegua on GitHub (Jun 11, 2020). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1030 Thanks a lot for this great opportunity to run on Raspberry Pi! It works all fine! … except the custom email-templates. What did I wrong? I’ve tried it this way: ``` docker pull bitwardenrs/server:raspberry docker run -d --name bitwarden -v /bw-data/:/data/ -p 8005:80 -e ADMIN_TOKEN=<token> --restart always -e TEMPLATES_FOLDER=/bw-data/templates/ -e RELOAD_TEMPLATES=true -e ROCKET_TLS='{certs="/ssl/live/<example.com>/fullchain.pem",key="/ssl/live/<example.com>/privkey.pem"}' -v /etc/letsencrypt/:/ssl/ bitwardenrs/server:raspberry ``` Also I can’t change the logos and images, so they are outside this folder in `/src/static/images`. Is there a way to set this folder to `/bw-data/ ` as well? Docker is just a new field to me. So sorry if this question is a little stupid.
kerem 2026-03-03 02:02:35 +03:00
Author
Owner

@BlackDex commented on GitHub (Jun 13, 2020):

Hello @fuanegua,

The issue is with the TEMPLATES_FOLDER variable.
You configured it to be in /bw-data/templates/ but you have to look at these variable from within the docker container, and there the data folder is located in /data.

So if you change the from:
-e TEMPLATES_FOLDER=/bw-data/templates/
To:
-e TEMPLATES_FOLDER=/data/templates/

And copy all the template data in there you should be able to change the templates.

Regarding the images, that is possible using the templates folder.
You can of course host those pictures on an other virtualhost or somewhere else on the web.
Or if they are small embed them in the html code even by using a data uri as the src="" element instead of the location of the image. You can convert an image to a data uri via a site like https://www.site24x7.com/tools/image-to-datauri.html

Also, i would suggest to just enable RELOAD_TEMPLATES during template changing and disable it and restart bitwarden once done, else for every request it will render those templates over and over.

<!-- gh-comment-id:643618358 --> @BlackDex commented on GitHub (Jun 13, 2020): Hello @fuanegua, The issue is with the `TEMPLATES_FOLDER` variable. You configured it to be in /bw-data/templates/ but you have to look at these variable from within the docker container, and there the data folder is located in `/data`. So if you change the from: `-e TEMPLATES_FOLDER=/bw-data/templates/` To: `-e TEMPLATES_FOLDER=/data/templates/` And copy all the template data in there you should be able to change the templates. Regarding the images, that is possible using the templates folder. You can of course host those pictures on an other virtualhost or somewhere else on the web. Or if they are small embed them in the html code even by using a data uri as the src="" element instead of the location of the image. You can convert an image to a data uri via a site like https://www.site24x7.com/tools/image-to-datauri.html Also, i would suggest to just enable `RELOAD_TEMPLATES` during template changing and disable it and restart bitwarden once done, else for every request it will render those templates over and over.
Author
Owner

@fuanegua commented on GitHub (Jun 13, 2020):

Thanks a lot for your help, @BlackDex!
Maybe I don’t understand it exactly. So in my mind I want to put all the template files outside the docker container to be able to edit and change the files via FTP.
So all these files are in /bw-data/templates.

Do I understand you right that I shall save the template files inside the docker container?
Or do I have to create a directory /data (or /bw-data/data/templates ?!) outside the docker container?

<!-- gh-comment-id:643621447 --> @fuanegua commented on GitHub (Jun 13, 2020): Thanks a lot for your help, @BlackDex! Maybe I don’t understand it exactly. So in my mind I want to put all the template files outside the docker container to be able to edit and change the files via FTP. So all these files are in `/bw-data/templates`. Do I understand you right that I shall save the template files inside the docker container? Or do I have to create a directory `/data` (or `/bw-data/data/templates` ?!) outside the docker container?
Author
Owner

@BlackDex commented on GitHub (Jun 13, 2020):

With the option -v /bw-data/:/data/ you actually tell docker to mount /bw-data/ in the container as /data/. So outside the container you access the files in /bw-data/ inside the container they are accessed via /data/.
So if you create a folder /bw-data/templates/ on the host, it will be called /data/templates/ within the container.

<!-- gh-comment-id:643621841 --> @BlackDex commented on GitHub (Jun 13, 2020): With the option `-v /bw-data/:/data/` you actually tell docker to mount /bw-data/ in the container as /data/. So outside the container you access the files in `/bw-data/` inside the container they are accessed via `/data/`. So if you create a folder `/bw-data/templates/` on the host, it will be called `/data/templates/` within the container.
Author
Owner

@fuanegua commented on GitHub (Jun 13, 2020):

Okay, thanks! Sounds clear. But unfortunately the hole bitwarden container is not reachable/working, when I create it with:

docker run -d --name bitwarden -v /bw-data/:/data/ -p 8005:80 -e ADMIN_TOKEN=<TOKEN> --restart always -e TEMPLATES_FOLDER=/data/templates/ -e ROCKET_TLS='{certs="/ssl/live/<DOMAIN>/fullchain.pem",key="/ssl/live/<DOMAIN>/privkey.pem"}' -v /etc/letsencrypt/:/ssl/ bitwardenrs/server:raspberry

TEMPLATES_FOLDER=data/templates/ or TEMPLATES_FOLDER=templates/ make the cotainer work again but without the new templates.

Anything else I missed?

<!-- gh-comment-id:643628960 --> @fuanegua commented on GitHub (Jun 13, 2020): Okay, thanks! Sounds clear. But unfortunately the hole bitwarden container is not reachable/working, when I create it with: `docker run -d --name bitwarden -v /bw-data/:/data/ -p 8005:80 -e ADMIN_TOKEN=<TOKEN> --restart always -e TEMPLATES_FOLDER=/data/templates/ -e ROCKET_TLS='{certs="/ssl/live/<DOMAIN>/fullchain.pem",key="/ssl/live/<DOMAIN>/privkey.pem"}' -v /etc/letsencrypt/:/ssl/ bitwardenrs/server:raspberry` `TEMPLATES_FOLDER=data/templates/` or `TEMPLATES_FOLDER=templates/` make the cotainer work again but without the new templates. Anything else I missed?
Author
Owner

@BlackDex commented on GitHub (Jun 13, 2020):

Which folders do you have under your own templates? Does it include both admin and email directories? Or only email?
Because that should work.

<!-- gh-comment-id:643643583 --> @BlackDex commented on GitHub (Jun 13, 2020): Which folders do you have under your own templates? Does it include both admin and email directories? Or only email? Because that should work.
Author
Owner

@fuanegua commented on GitHub (Jun 13, 2020):

Yes it‘s strange.
I‘ve got both /bw-data/templates/admin and /bw-data/templates/email in my Pi root directory. In both folders are all hbs files from github. The email hbs are edited.
Does a slash at the end matter?

<!-- gh-comment-id:643646751 --> @fuanegua commented on GitHub (Jun 13, 2020): Yes it‘s strange. I‘ve got both `/bw-data/templates/admin` and `/bw-data/templates/email` in my Pi root directory. In both folders are all hbs files from github. The email hbs are edited. Does a slash at the end matter?
Author
Owner

@fuanegua commented on GitHub (Jun 14, 2020):

Got it!
It was simply a broken variable due to copy & paste errors ({{{ instead of {{) inside an edited hbs that brought bitwarden into a restart loop.
I finally understood how to read the logs and I think I'm a few steps further with docker. Thanks for your patience @BlackDex! 🙏🏼

<!-- gh-comment-id:643698816 --> @fuanegua commented on GitHub (Jun 14, 2020): Got it! It was simply a broken variable due to copy & paste errors (`{{{` instead of `{{`) inside an edited hbs that brought bitwarden into a restart loop. I finally understood how to read the logs and I think I'm a few steps further with docker. Thanks for your patience @BlackDex! 🙏🏼
Author
Owner

@AbdullahZubair commented on GitHub (Jun 21, 2023):

Hi there, @fuanegua!
I apologize for opening this issue after a long period, but I could really use some help. Currently, I'm using the latest version of Vaultwarden with Docker Compose, and I'm looking to customize the web and email aspects to incorporate our organizational branding, including text, logos, and more. I want to ensure that Vaultwarden reflects our organization's identity.
If you could provide any guidance or suggestions on how to achieve this customization, I would greatly appreciate it. I've been exploring the available options, but I'm looking for some expert advice on the best approach.
Thank you so much in advance for your assistance!

<!-- gh-comment-id:1601579776 --> @AbdullahZubair commented on GitHub (Jun 21, 2023): Hi there, @fuanegua! I apologize for opening this issue after a long period, but I could really use some help. Currently, I'm using the latest version of Vaultwarden with Docker Compose, and I'm looking to customize the web and email aspects to incorporate our organizational branding, including text, logos, and more. I want to ensure that Vaultwarden reflects our organization's identity. If you could provide any guidance or suggestions on how to achieve this customization, I would greatly appreciate it. I've been exploring the available options, but I'm looking for some expert advice on the best approach. Thank you so much in advance for your assistance!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#724
No description provided.