bitwarden-docker-Am I stupid?

OK so I’ve posted some other stuff about things that confuse/annoy/delay me with my new Nethserver install (which are probably really down to changes in Linux over time) but this one…

So I want BitWarden and it seems that BW insists on docker, so it’s not a decision by NS.

So… docker is easily installed through the GUI but doesn’t appear under “Applications”, which is okay, but I’m not sure where to go next, I feel a long way from putting passwords into bitwarden as I google for docker on nethserver docco.

https://docs.nethserver.org/en/v7/docker.html

Excellent docco exists! So now I read

“If you have a free block device (required for production environments)”

But if you don’t? And how do we install this in a non-prod environment? And it’s not supported in the enterprise edition, so how do we define production if it’s not enterprise?

Having decided not to go to the shops and buy a new hard drive just to install a web app, I’m going to try and proceed with the method at https://nickhuber.ca/blog/bitwarden-rs-without-docker, or perhaps still use the docker version from the nethserver docker docco (heh!) but without the dedicated block device.

So I’ll follow up later with notes on whatever worked, but in the meantime, I hope nobody minds if keep up my whining…what really was it that made ‘yum install bitwarden’ so unachievable? Was it systemd? journalctl? Or some internal political decision?

And how does this scale? What’s next, apache needs its own docker? postfix? SSH?

shakes fist at cloud

I don’t expect it’s unachievable–I’m sure you could create a RPM for it if you were so inclined. But I don’t think anyone else has been so inclined, as the Docker installation works well and is (IIRC) the only method supported by the Bitwarden developer. Now, if you want to run it on Neth, you’re going to need to be prepared to customize a bit. I don’t; I run Bitwarden on its own VM.

1 Like

You don’t need to use a block device but it’s recommended in production environments as it increases performance, see Docker docs.

Nethserver-docker is a community project and therefore not covered by official support.

2 Likes

Thank you both for your replies!

As it happens, it’s on docker because it is in C# and includes MSSQL server.

I found a guide to bitwarden_rs on centos and I followed that, and it worked…

I made a virtual server but didn’t modify the guide much, so it’s left mess in /var/www/vault. You should do better than I did.

I also did this for npm audit to work:

yum remove -y nodejs npm
yum install -y rh-nodejs14-npm

ln -s /opt/rh/rh-nodejs14/root/usr/bin/npm /usr/bin/npm
ln -s /opt/rh/rh-nodejs14/root/usr/bin/node /usr/bin/node

yum install -y nethserver-netdata

Not sure what that might break…

Anyway it’s working! So happy… :grin:

Of course, my changes to virtualhosts.conf were trashed by the e-smith automation. These lines are needed in the correct vhost entry:

RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /notifications/hub(.*) ws://127.0.0.1:3012/ [P,L]
ProxyPass / http://127.0.0.1:8000/

ProxyPreserveHost On
ProxyRequests Off
RequestHeader set X-Real-IP %{REMOTE_ADDR}s

I can’t see how to get them in there using templates yet, but I’m sure I’ll figure it out.

Adding /etc/httpd/conf.d/bitwarden.conf doesn’t work. The contents are parsed, but seem to have no effect, I guess the contents of the virtualhosts file takes precedence.

I’ve run out of time so I’ll need to sort this out later.