Can't download attachements from self hosted bitwarden

we have a new self hosted instalation of bitwarden. Everything is working exept for downloading of attachments. Uploading and deleting attachments work.

When we click on attachement to download it just spins, when looking at dev console in browser i can see that its actually trying to access http://localhost:4000/attachments//xxxxxxxxxxxxxxxx to download it. Looks like url rewrite is failing on nginx that comes with the bitwarden install. We do not have other proxies.

both have correct url configured.

where else can this be configured?

I’m having the same issue with a new self-hosted instance through a custom domain (not localhost). I don’t see any instances of localhost in global.override.env or config.yaml

Bitwarden version:
Status: Image is up to date for bitwarden/setup:1.41.3

When I try to download the attachment, the request is to:


and the response json is:
{“Object”:“attachment”,“Id”:“long id here”,“Url”:“http://localhost:4000/attachments//long key here”,“FileName”:“2.”,“Size”:“8327857”,“SizeName”:“7.94 MB”}

my case is solved. In my case i had to add the following to the global.override.env file:


1 Like

I’m getting the same issues with attachments & send self hosted.
Tried what @donatas recommended, but i don’t have a /etc/bitwarden/core/attachments directory
However updating baseURL got me a little closer

I can see attachments and send files being uploaded to:
Attachments with out the a
/opt/bitwarden/bwdata/core/attchments$ ls

Ant this is the link the web page is trying to get to:

Tried setting globalSettings__attachment__baseDirectory to the location above, but no luck.
Any thoughts?