OpenEDR installation will not work with WSL-1, it needs a Ubuntu container running on WSL-2. Everything will install as if it is in a VM but...
Caveats
Note that:
Assuming you enable WSL2, the installation order should be, 1) Ubuntu, 2) Docker Desktop & lastly OpenEDR
docker will not start with host; you will need Windows docker desktop to configure to start service after user sign-in
eth0 will change IP with each reboot (unlike a VM which is rather static even with DHCP), this affects the sftp service for Windows endpoint to upload event files.
For each Windows host reboot, you will need to use Ubuntu console to run:
cd openEDR
manage/mountUploads.sh
The script will start bindfs mount & start onewaysftp container.
It is better to use an Ubuntu VM (eg. HyperV, VirtualBox or VMware) to host OpenEDR backend because
WSL2 uses NAT by default, network bridge is complicated. Easier with hypervisors.
OpenEDR will "work out-of-the-box" with stock Ubuntu server 16-20, even when it is VM under network-bridge mode.
But I WANT WSL2!
Let's say you really to use OpenEDR with WSL2, these are additional steps to take:
Rebuild onewaysftp container to listen on 127.0.0.1:2222
Add Windows port-proxying from 0.0.0.0:2222 to 127.0.0.1:2222
The backend installation script will use container's eth0, that IP is based on NAT addressing. That means if you have another Windows VM, it will likely have issues uploading to the OpenEDR onewaysftp container. After we rebuilt the container, the docker host 127.0.0.1:2222 is accessible. You can install OpenEDR host agent on the Windows host but it is NOT recommended.
OpenEDR installation will not work with WSL-1, it needs a Ubuntu container running on WSL-2. Everything will install as if it is in a VM but...
Caveats
Note that:
For each Windows host reboot, you will need to use Ubuntu console to run:
The script will start bindfs mount & start
onewaysftp
container.It is better to use an Ubuntu VM (eg. HyperV, VirtualBox or VMware) to host OpenEDR backend because
But I WANT WSL2!
Let's say you really to use OpenEDR with WSL2, these are additional steps to take:
onewaysftp
container to listen on 127.0.0.1:2222Rebuild SFTP Container
Please use the instruction from https://github.com/jymcheong/OpenEDR/wiki/0.-Installation#modify-env-to-reassign-frontend_ip but modify SFTP_HOST=127.0.0.1 instead.
Port-Proxying
The backend installation script will use container's eth0, that IP is based on NAT addressing. That means if you have another Windows VM, it will likely have issues uploading to the OpenEDR
onewaysftp
container. After we rebuilt the container, the docker host 127.0.0.1:2222 is accessible. You can install OpenEDR host agent on the Windows host but it is NOT recommended.Using an admin powershell session:
Modify
sftpconf.json
Using Ubuntu console:
nano openEDR/backend/sftp/scripts/IPaddresses
.sudo docker restart onewaysftp
Last step will re-generate sftpconf.zip which is under
openEDR/backend/sftp/keys
.sftpconf.zip
needs to be copied to the target Windows endpoint installed with OpenEDR underc:\Windows\openedr
.