I want to install Bitwarden on a Windows 2016 Server.
I know there is a Problem with linux based Images and If I want to install it like descriped in the documentation I got an error, that Linux images are not runnig.
But is there a way to host it on a 2016 Server?
As far as I know, Bitwarden should run fine on Windows.
Have you followed the Windows installation instructions?
Yes and under WIn 10 it works under Server 2016 you have to install Docker Enterprise and if you want to start the bitwarden.ps1 you got Errors that a Linux Image not usable
I am also attempting to install it on Server 2016. I followed their instructions, which are rather simple, but I am also unable to install it. My error is a bit different though:
PS I:\DOCKER> .\bitwarden.ps1 -install
_ _ _ _
| |__ (_) |___ ____ _ _ __ __| | ___ _ __
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \
| |_) | | |_ \ V V / (_| | | | (_| | __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_| \__,_|\___|_| |_|
Open source password management solutions
Copyright 2015-2019, 8bit Solutions LLC
Docker version 18.09.2, build 1ac774dfdd
docker-compose version 1.23.2, build 1110ad01
(!) Enter the domain name for your Bitwarden instance (ex. bitwarden.company.com):
(!) Do you want to use Let's Encrypt to generate a free SSL certificate? (y/n): y
error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.39/images/create?fromImage=bitwarden%2Fsetup&tag=1.29.0: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
C:\Program Files\docker\docker.exe: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.39/containers/create?name=setup: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
See 'C:\Program Files\docker\docker.exe run --help'.
PS I:\DOCKER> Get-Service docker
Status Name DisplayName
------ ---- -----------
Running docker Docker Engine
any thoughts or help would be appreciated.
I just slayed this dragon yesterday. After 5 days of beating my head against the wall, that beast is dead and I’m just dealing with the fiddly bits.
First, a couple of things.
- If your Windows 2016 machine is a VM, you need to look into enabling nested virtualization.
- If you Windows 2016 VM is hosted in Azure…Microsoft only supports nested vitualization on their Dv3 and Ev3 size VMs. If you’re on AWS or someone else’s, good luck, I can’t help you with that.
- No, running the Azure Windows 2016 with Containers did not seem to help at all with getting Docker and Bitwarden running.
- Throw Docker EE away and uninstall it from your Windows 2016 server. Download Docker CE. I tried getting EE to work on 2016 and 2019 with no luck whatsoever.
These posts helped me get nested virtualization enabled: https://azure.microsoft.com/en-us/blog/nested-virtualization-in-azure/ and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/nested-virtualization
- The second article has a link to a github repo with a PowerShell script that will get HyperV installed and nested virtualization configured for you. I did not find it necessary to setup or do any of the networking configuration stuff mentioned in the above articles.
Okay, now you are ready to install Docker CE. Basically, I just accepted the defaults…and CE actually worked once I installed it on a VM size that supported nested virtualization (and had it configured). Docker CE will throw a warning that (Windows 2016) Build 18439 has been deprecated, just ignore it. I did not find it necessary to configure any of the networking stuff in Docker. Docker Compose comes with the CE edition, so you don’t have to worry about that. It does take Docker several minutes to get up and running the first time, just be patient. I did sign into Docker and share the C: drive initially, but that seemed to cause problems so I unshared the C: and signed out of Docker and reran the Bitwarden install to resolve the error messages I received. I also found it necessary to run the Docker CE install as an administrator.
Once you have Docker CE running, execute the Bitwarden install commands just like it says in the instructions. You will be asked if you want Docker to share the C: as part of the install, select YES. ALSO, unless you turn the Windows firewall off, you will have to add a rule allowing TCP Port 443 (or whatever port you’re hosting Bitwarden on) through.
I hope this helps. Getting Bitwarden up and running is simple, getting Docker to run a Linux container on Windows 2016…not so much.
Thanks for your investigation.
I had try it meanwile with a vm and debian and there it works fine but I have the proplem that I need an certifikate without security problem to work with a mobile client like the ios/android client.
I don´t want to expose it and don´t want to use a own CA in my lan so it makes no realy sense for me.
Lol I would not say anything with Bitwarden is simple. Its the most convoluted installation process I’ve seen in a long time. Runnnig a VM within a VM is asking for issues. Failed on HyperV 2012 when every other linux package I’ve run works fine. The instructions are lacking as well. I’ve not seen a streamlined ISO that gets up and working fast like Pie hole etc. I don’t know why they insisted in using Docker at all, just adds bloat and complexity. I’ve not seen a good dockerless linux guide on this yet.
Do you happen to have a recorded session for this guide (Screen capture)? My dragon is a bit of a dickish person and giving me all sorts of issues. I installed docker from the Windows Guide, I am assuming that is the CE version? I keep getting the error when I run the bitwarden comman I get this error:
docker : image operating system “linux” cannot be used on this platform
At line:1 char:1
docker : Unable to find image ‘bitwarden/setup:1.39.4’ locally
At C:\Users\user\bwdata\scripts\run.ps1:73 char:5
1.39.4: Pulling from bitwarden/setup
docker: image operating system “linux” cannot be used on this platform.
See ‘docker run --help’.
Docker version 20.10.0, build 6ee42dc
docker-compose version 1.28.5, build c4eb3a1f
docker-py version: 4.4.4
CPython version: 3.9.0
OpenSSL version: OpenSSL 1.1.1g 21 Apr 2020
I can buy you a beer for the troubles. And you make a friend down the road. I am a good story teller lol.