Cryptboard.io allows to send text messages and files between multiple devices
Website: https://cryptboard.io/
Details on secure usage could be found at https://cryptboard.io/security
Detail on used technologies is here: https://cryptboard.io/about
Prerequisites:
Installation:
git clone git@github.com:MihanEntalpo/cryptboard.io.git
Installation of docker described at https://docs.docker.com/get-docker/
Installation of docker-compose described at https://docs.docker.com/compose/install/
Install nginx by your repo's package manager
cp web-app/.env.docker.example web-app/.env.docker
Run command:
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
Files jwtRS256.key and jwtRS256.key.pub would be created.
Content of the files should be put in one-liners with "\n" string joining splitted lines, and put it to JWT_PUBLIC_KEY and JWT_PRIVATE_KEY variables.
To make it simple just run the following bash command:
Fill JWT_PRIVATE_KEY in .env.docker:
LINE=$(cat ./web-app/jwtRS256.key | tr '\n' '$' | sed 's|\$|\\\\n|g;s|^|JWT_PRIVATE_KEY=|g'); sed -i "s|^JWT_PRIVATE_KEY.*|$LINE|g" -i ./web-app/.env.docker
Fill JWT_PUBLIC_KEY in .env.docker:
LINE=$(cat ./web-app/jwtRS256.key.pub | tr '\n' '$' | sed 's|\$|\\\\n|g;s|^|JWT_PUBLIC_KEY=|g'); sed -i "s|^JWT_PUBLIC_KEY.*|$LINE|g" -i ./web-app/.env.docker
SERVER_HOST should be set to your HTTP host configured in Nginx or any other reverse-proxy server.
On official app this variable is set to cryptboard.io
SERVER_PORT should be a port, that is opened from docker container with running app
./build-docker-images.sh
./docker-compose.sh up -d
All normal docker-compose commands could be used with docker-compose.sh, for example:
./docker-compose.sh ps -a
./docker-compose.sh up -d
./docker-compose.sh stop
So, instead of docker-compose ps
you run ./docker-compose.sh ps
and so on.
This is just a simplification to use docker-compose without specifying docker-compose.yml file and .env.docker envfile for every call.
Open url http://127.0.0.1:{SERVER_PORT}/ in browser (You you are deploying app not locally, but on some online server, replace 127.0.0.1 by it's real IP)
Use conf/nginx/docker-proxypass.conf as a template for your docker config.
You will need to set the right hostname, proxy_pass port, logfiles location and letsencrypt key and cert files.
Recommended for development
Prerequisites:
Installation:
Instructions are made for deb-based distro:
sudo apt-get install nginx-full php-fpm php-redis git
git clone git@github.com:MihanEntalpo/cryptboard.io.git
cp web-app/.env.example web-app/.env
Composer installation instructions are here: https://getcomposer.org/download/
Run:
cd web-app
./composer.phat install
Or if you've installed composer into your PATH:
cd web-app
composer.phat install
Run command:
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
Files jwtRS256.key and jwtRS256.key.pub would be created.
Content of the files should be put in one-liners with "\n" string joining splitted lines, and put it to JWT_PUBLIC_KEY and JWT_PRIVATE_KEY variables.
To make it simple just run the following bash command:
Fill JWT_PRIVATE_KEY in .env:
LINE=$(cat ./web-app/jwtRS256.key | tr '\n' '$' | sed 's|\$|\\\\n|g;s|^|JWT_PRIVATE_KEY=|g'); sed -i "s|^JWT_PRIVATE_KEY.*|$LINE|g" -i ./web-app/.env
Fill JWT_PUBLIC_KEY in .env:
LINE=$(cat ./web-app/jwtRS256.key.pub | tr '\n' '$' | sed 's|\$|\\\\n|g;s|^|JWT_PUBLIC_KEY=|g'); sed -i "s|^JWT_PUBLIC_KEY.*|$LINE|g" -i ./web-app/.env
SERVER_HOST should be set to your HTTP host configured in Nginx or any other reverse-proxy server.
On official app this variable is set to cryptboard.io
Use file conf/nginx/dockerless.conf as a template for your configuration.
You should change:
server_name, SSL certificate and key, root folder and PHP fastcgi_pass url
If it's not, look for logs of nginx and php and check what should be changed.