Bitwarden App Logs Out if the server is not running

I have observed that if i’m offline, the bitwarden app/extentions work perfectly fine and show me my existing vault items. But if the case is that I’m online, but my bitwarden server is offline for more than a few hours, then the app logouts and i cannot access anything until the server is back up. Is this behavior expected? And if so, shouldn’t it not behave like this?

Hey there, do you have a reverse proxy in front of the server?

Yes, I earlier had an Nginx reverse proxy. But right now I’m using the Cloudflare tunnel reverse proxy. The issue is happening with both.

Hey @ghaisasadvait, Bitwarden logs out the client when there’s an error response on purpose, because it means that the server is sending an error. In this case, the reverse proxy is sending the error, but the Bitwarden client doesn’t know it’s talking to a reverse proxy and not the bitwarden server directly. so it logs out, feel free to contact the official support team at bitwarden.com/contact for additional support.

This can cause a huge headache sometimes.Maybe an option in the client would be nice.

But anyways, Thanks! Appreciate your input!

What is the response status code that the client receives when your server is offline?

Not exactly sure, but since I am using cloudflare as a proxy service, and cloudflare tunnel as a reverse proxy, I’m assuming the response code will be a 5XX error (Origin unreachable).

@kspearrin Can this feature be added?

Hey @ghaisasadvait I’ve passed this along to the team :+1:

@dwbit Appreciate it. Thanks!

@bw-admin @kspearrin Any update on this?

Hey @ghaisasadvait can you open a ticket with the official support team on the Bitwarden website?

I sent the email but they asked me to open a feature request.

Same here. Have voted up your Feature request.

Does the client log the reason for this anywhere? It is really frustrating for the client to just logout with no obvious reason at all.

@bw-admin Any progress on this? Its been years since I posted this but I don’t see any development on this? Offline access when the server is down is a crucial part of a password manager.

To be clear, Bitwarden does support offline access when the server cannot be reached (e.g., when the internet connection is down); the logout behavior that you have described evidently occurs only when the server is reachable but returns an error code.

Yes, that’s correct. But in most cases, people use a reverse proxy which will throw an error if the BW server is down. This should be a configurable option on the client side which should be off by default.

Seems like one should be able to configure the reverse proxy to not return a result if it does not get a result from the upstream host … that is, configure the reverse proxy to operate in a totally transparent fashion.

I locally have an NPM, I can configure it to be transparent. But unfortunately, using cloudflare as a proxy, I cannot set custom response error codes on Cloudflare if the origin is down on the free plan.