Skip to content

Instantly share code, notes, and snippets.

@jakobii
Created October 31, 2019 18:58
Show Gist options
  • Save jakobii/d5d5478b316af08377a8be490a8750c3 to your computer and use it in GitHub Desktop.
Save jakobii/d5d5478b316af08377a8be490a8750c3 to your computer and use it in GitHub Desktop.
# variables
DISTRIB_CODENAME = bionic
cert_dir = /etc/ssl/certs/
# install
# https://rethinkdb.com/docs/install/ubuntu/
source /etc/lsb-release && echo "deb https://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install rethinkdb
# secure
# https://rethinkdb.com/docs/security/
openssl genrsa -out $cert_dir/rethinkdb.key 2048
openssl req -new -x509 -key key.pem -out $cert_dir/rethinkdb.crt -days 36500
# run
# https://rethinkdb.com/docs/cli-options
rethinkdb \
--bind all \
--http-tls-key $cert_dir/rethinkdb.key \
--http-tls-cert $cert_dir/rethinkdb.crt \
--driver-tls-key $cert_dir/rethinkdb.key \
--driver-tls-cert $cert_dir/rethinkdb.crt \
--http-port 443
# navigate to your servers IP address in a webbrowers
# https://<server ip>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment