-
Install Node.js and PM2:
# Install Node.js curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs build-essential # Install PM2 sudo npm install pm2@latest -g
-
Configure PM2:
# Ensure that PM2 will be restarted on reboot pm2 startup # Link PM2 to [Keymetrics] pm2 link <KEYMETRICS_SECRET> <KEYMETRICS_PUBLIC>
-
Install redis-stat:
sudo apt-get install -y ruby-all-dev sudo gem install redis-stat
-
Install fonts for Chinese characters:
sudo apt-get install -y fonts-wqy-zenhei ttf-wqy-microhei
-
Ensure that the following directories exist (if not, make them):
~/.cecibot/backend ~/.cecibot/email ~/.cecibot/telegram
-
Use StevenBlack's hosts to block adware & malware:
sudo wget https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts -O /etc/hosts sudo ifdown --exclude=lo -a && sudo ifup --exclude=lo -a
- You should update your hosts file regularly (preferably every week, or at least once a month), using the same commands.
-
Install the latest version of Python 3:
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update sudo apt-get install -y python3.6 python3.6-dev
-
Install
pip
:wget https://bootstrap.pypa.io/get-pip.py -O - | python3.6 - --user
-
Install redis using chris-leas PPA:
sudo add-apt-repository ppa:chris-lea/redis-server sudo apt-get update sudo apt-get install -y redis-server
-
Symlink
web/
in nginxsudo rm -rf html/ sudo ln -s ~/cecibot/web/ ./html
-
Install all the dependencies of the backend:
# Dependencies of Chromium sudo apt-get install libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1\ libxi6 libxtst6 libnss3 libcups2 libxss1 libxrandr2 libasound2\ libpangocairo-1.0-0 libatk1.0-0 libatk-bridge2.0-0 libgtk-3-0 python3.6 -m pip install --user pyppeteer redis requests
-
Install all the dependencies of the E-Mail frontend:
python3.6 -m pip install --user flask redis boto3
-
Save your AWS credentials at
~/.aws/credentials
:[default] aws_access_key_id=YOUR_ACCESS_KEY aws_secret_access_key=YOUR_SECRET_KEY
-
Set the default AWS region at
~/.aws/config
:[default] region=eu-west-1
-
Install all the dependencies of the Telegram frontend:
python3.6 -m pip install --user python-telegram-bot redis
-
Install nginx:
sudo apt install nginx
-
Install Certbot for Let's Encrypt and follow all of the instructions on their website to get an HTTPS certificate for both
cecibot.com
andwww.cecibot.com
with HTTP -> HTTPS redirection enabled for both:
-
redis-stat
redis-stat --server=63790 --daemon