localsecurechat/testimage

By localsecurechat

Updated about 1 year ago

Host a Secure Local Instant Messaging Platform

Image
0

147

localsecurechat/testimage repository overview

Running the Container

  1. Copy the following to a bash file and then run the file
#!/bin/bash


if [[ -f ca-cert.pem ]]; then
	echo 'CA Key Exists'
else
	echo 'Creating CA Key'
	openssl genrsa -aes256 -out ca-key.pem 4096
	openssl req -new -x509 -sha256 -days 365 ca-key.pem -out ca-cert.pem
fi

ipAddr="$(hostname -I | awk '{print $1;}')"
hostname="$(hostname --fqdn)"
cakey="$(cat ca-key.pem)"
cacert="$(cat ca-cert.pem)"

echo 'Running Docker container'
sudo docker rm lsmserver -f 2> /dev/null
sudo docker run -it -e ipAddr="${ipAddr}" -e hostname="${hostname}" -e cakey="${cakey}" -e cacert="${cacert}" -p 7000:7002 -p 80:80 --name lsmserver --mount type=volume,src=lsmservervol,dst=/usr/app localsecurechat/testimage

Adding Certificate Authority Keys to User Devices

  1. After running rundocker.sh you will have in that directory ca-cert.pem and ca-key.pem
  2. Open up Firefox -> click on the menu icon -> Settings
  3. Click on Privacy & Security -> scroll down to the Certificates section -> click on 'View Certificates'
  4. Click on the Authorities tab -> click on Import
  5. Navigate to the ca-cert.pem and click Select

If the Docker container is running on a seperate machine than the one you will access the website through, you will need to transfer the ca-cert.pem file to your other device

Command Line Interface Commands

  • exit Closes the websocket server
  • add-user Adds a new user
  • list-users Lists the users and their status

Tag summary

Content type

Image

Digest

sha256:e0f0ac3e9

Size

1.3 GB

Last updated

about 1 year ago

docker pull localsecurechat/testimage