VNC, XRDP and SSH keeps disconnecting on Raspberry Pi 4 after installation

*** newbie alert ***
I am new to Bitwarden_rs, Docker and not so new to Raspberry pi and Linux

Installed bitwarden_rs on Raspberry Pi 4 and after successful installation, any method I use to manage the headless Raspberry pi 4, VNC, XRDP and SSH keeps disconnecting every few seconds making working on PI impossible. Same symptoms from windows 10 or another Raspberry Pi 3. When I stop the bitwarden container the disconnects stop. I am trying to learn Docker so most likely it is me doing something wrong. Any help in solving this or any pointer on where to start trouble shooting this is greatly appreciated.

I have tried both using Rocket and reverse proxy on nginx in conjunction with Bitwarden to connect thru ssl and the end result is the same. My preference is to use nginx as I have other projects that would require ssl and a reverse proxy.

  • Prahalad.

It would be useful to post how you start your docker container, and whether you configured the docker service (on the RPi) in any specific way (or just installed it).

Obviously what you witness should not happen. I would wildly guess some networking issue (though I do not really see how the docker networking would clash with the host one)

Plain vanilla docker install

I start the bitwarden_rs using docker-compose and here is my Docker-Compose file
#—
#Docker-compose file for Bitwarde_rs
#—
version: “3”
services:
bitwardenrs:
restart: always
# Dani Garcia image https://github.com/dani-garcia/bitwarden_rs
image: “bitwardenrs/server:latest”
container_name: bitwarden
environment:
# Timezone settings, important for Fail2ban to work
- TZ=America/New_York
# Logging connection attemps
- LOG_FILE=/data/bitwarden.log
- EXTENDED_LOGGING=‘true’
- LOG_LEVEL=warn
# Beef up a bit
- ROCKET_WORKERS=20
- WEBSOCKET_ENABLED=‘true’
# Hardening a bit
- SIGUPS_ALLOWED=‘false’
- WEBSOCKET_ENABLED=true
#- SHOW_PASSWORD_HINT=‘false’
- DISABLE_ICON_DOWNLOAD=‘true’
#expose:
# - “8005”
ports:
- 8005:80
- 3012:3012
- 465:465
#networks:
# - bitwarden_net
volumes:
- /docker_data/bitwarden/:/data/

I also changed the default Docker0 ip address and my /etc/docker/daemon.json file looks like this
{
“bip”: “192.168.1.5/24”,
“fixed-cidr”: “192.168.1.5/25”,
“default-address-pools”:
[
{“base”:“192.168.2.5/24”,“size”:28}
]
}

I have tried the default and also 10.x.x.x and the final results are the same.

What is the network range of the standard network device you use to connect. Please show the output of “ip a” of the raspi.

Before starting Bitwarden_RS:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether dc:a6:32:b4:58:36 brd ff:ff:ff:ff:ff:ff
inet 192.168.123.3/24 brd 192.168.123.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 fe80::8b51:bca3:d36c:83af/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether dc:a6:32:b4:58:37 brd ff:ff:ff:ff:ff:ff
42: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:82:37:5a:ee brd ff:ff:ff:ff:ff:ff
inet 192.168.1.5/24 brd 192.168.1.255 scope global docker0
valid_lft forever preferred_lft forever

After starting Bitwarden_RS:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether dc:a6:32:b4:58:36 brd ff:ff:ff:ff:ff:ff
inet 192.168.123.3/24 brd 192.168.123.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 fe80::8b51:bca3:d36c:83af/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether dc:a6:32:b4:58:37 brd ff:ff:ff:ff:ff:ff
42: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:82:37:5a:ee brd ff:ff:ff:ff:ff:ff
inet 192.168.1.5/24 brd 192.168.1.255 scope global docker0
valid_lft forever preferred_lft forever
52: br-153bed3b19b3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:5a:ad:48:d2 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.17/28 brd 192.168.2.31 scope global br-153bed3b19b3
valid_lft forever preferred_lft forever
inet6 fe80::42:5aff:fead:48d2/64 scope link
valid_lft forever preferred_lft forever
56: vetha648ad6@if55: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-153bed3b19b3 state UP group default
link/ether 8a:d8:52:5d:d8:cf brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 169.254.135.223/16 brd 169.254.255.255 scope global noprefixroute vetha648ad6
valid_lft forever preferred_lft forever
inet6 fe80::40c2:4d6:c9ab:da03/64 scope link
valid_lft forever preferred_lft forever