NetworkError when attempting to fetch resource / no conncection to Bitwarden WebVault #367

Closed
opened 2026-02-04 20:03:06 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @muibusan on GitHub (Aug 9, 2019).

Hi! I've been trying for several hours, but can't figure it out.

I keep and keep getting the error "NetworkError when attempting to fetch resource." in the Firefox addon when I try to connect. And same problem in the desktop app. I use this server URL: http://192.168.2.1:8080 (and it fails)

These commands to install everything worked fine:

docker pull bitwardenrs/server:raspberry
docker run -d --name bitwarden -v /home/bitwarden/data/:/data/ -p 8080:8080 bitwardenrs/server:raspberry

I changed port from 80:80 to 8080:8080 because I use Pihole and hence port 80 is not available.

I even forwarded port 8080 in my router to my rPi's local IP address 192.168.2.1 and port 8080, both TCP and UDP.

I use DietPi, Buster, on my Raspberry - a light-weight version of Raspbian. It uses Lighttpd as a web server. Fail2ban is installed, but I don't think that's the problem.

docker info seems to be okay, too:

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 1

I have not yet configured SSL certificates or an HTTPS connection on my rPi. But as far as I understand Bitwarden's Firefox plugin and Windows desktop app should be able to establish a connection using standard HTTP in the first instance.

What can't I establish a connection? How can I troubleshoot it?

Originally created by @muibusan on GitHub (Aug 9, 2019). Hi! I've been trying for several hours, but can't figure it out. I keep and keep getting the error _"NetworkError when attempting to fetch resource."_ in the Firefox addon when I try to connect. And same problem in the desktop app. I use this server URL: http://192.168.2.1:8080 (and it fails) These commands to install everything worked fine: ``` docker pull bitwardenrs/server:raspberry docker run -d --name bitwarden -v /home/bitwarden/data/:/data/ -p 8080:8080 bitwardenrs/server:raspberry ``` I changed port from 80:80 to 8080:8080 because I use Pihole and hence port 80 is not available. I even forwarded port 8080 in my router to my rPi's local IP address 192.168.2.1 and port 8080, both TCP and UDP. I use DietPi, Buster, on my Raspberry - a light-weight version of Raspbian. It uses **Lighttpd** as a web server. Fail2ban is installed, but I don't think that's the problem. `docker info` seems to be okay, too: ``` Server: Containers: 1 Running: 1 Paused: 0 Stopped: 0 Images: 1 ``` I have not yet configured SSL certificates or an HTTPS connection on my rPi. But as far as I understand Bitwarden's Firefox plugin and Windows desktop app should be able to establish a connection using standard HTTP in the first instance. What can't I establish a connection? How can I troubleshoot it?
Author
Owner

@muibusan commented on GitHub (Aug 10, 2019):

HEUREKA! 😄 After two nights of fiddling for hours I found the problem.

It's the containerPort argument in the docker run directive. 🙄 I set it to 8080:8080 - not knowing what I did. Better leave it to 80 as this is where docker expects incoming data for the Bitwarden WebVault. The hostPort, however, can be set to any (free) port you like, e.g. 4567.

Thus, a working docker directive would be:

docker run -d --name bitwarden -v /home/bitwarden/data/:/data/ -p 4567:80 bitwardenrs/server:raspberry

It is even possible to also assign a fixed hostIP in case this suits your setup. This way docker will bind the port to that particular IP (e.g. 192.168.0.2) and hence prevent the port from being exposed to the whole world:

docker run -d --name bitwarden -v /home/bitwarden/data/:/data/ -p 192.168.0.2:4567:80 bitwardenrs/server:raspberry

So, issue resolved, ticket closed.

@muibusan commented on GitHub (Aug 10, 2019): HEUREKA! 😄 After two nights of fiddling for hours I found the problem. It's the _containerPort_ argument in the `docker run` directive. 🙄 I set it to 8080:**8080** - not knowing what I did. Better leave it to 80 as this is where docker expects incoming data for the Bitwarden WebVault. The _hostPort_, however, can be set to any (free) port you like, e.g. 4567. Thus, a working docker directive would be: ``` docker run -d --name bitwarden -v /home/bitwarden/data/:/data/ -p 4567:80 bitwardenrs/server:raspberry ``` It is even possible to also assign a fixed _hostIP_ in case this suits your setup. This way docker will bind the port to that particular IP (e.g. 192.168.0.2) and hence prevent the port from being exposed to the whole world: ``` docker run -d --name bitwarden -v /home/bitwarden/data/:/data/ -p 192.168.0.2:4567:80 bitwardenrs/server:raspberry ``` So, issue resolved, ticket closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#367