Skip to content

manual_installation

Maran edited this page Jul 7, 2017 · 5 revisions

Step 01 - Update and upgrade packages

apt-get update
apt-get upgrade

Step 02 - Install Docker dependencies

apt-get install -y apt-transport-https ca-certificates curl

Step 03 - Get Docker key

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

Step 04 - Add the Docker repository to APT sources:

apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'

Step 05 - Update the package database with the Docker packages from the newly added repo:

apt-get update

Step 06 - Make sure we are about to install from the Docker repo instead of the default Ubuntu 16.04 repo:

apt-cache policy docker-engine

Step 07 - Install Docker

apt-get install -y docker-engine

Step 08 - Checked that docker is installed, the daemon started, and the process enabled to start on boot:

systemctl status docker

Step 09 - Download BCD and BCD-Proxy

curl -o /usr/local/bin/bcd https://download.bytesized-hosting.com/bcd
chmod +x /usr/local/bin/bcd
curl -o /usr/local/bin/bcd-proxy https://download.bytesized-hosting.com/bcd-proxy
chmod +x /usr/local/bin/bcd-proxy

Step 10 - Add a username to use other then 'bytesized'

useradd USERNAME -G docker --home /home/USERNAME/ -m

Step 11 - Login to the website and add "Bytesized Connect" and make sure you change the "Run as user" to the username you made in the previous step

Step 12 - Write down the $APIKEY & $APISECRET you got after filling in the "Bytesized Connect" form.

sudo -u USERNAME /usr/local/bin/bcd init 54600bb3d1e4025b10000a36 834ab12926b38ef46177547b12efcd91c03a92e10c27eb3c

You should see the following

INFO[0000] Starting the Bytesized Connect Daemon 0.19.0
INFO[0000] Initialization run, writing config file.
INFO[0000] Initialization run completed, please start the daemon normally.

Step 13 - Downloading the bcd.service & bcd-proxy.service files:

curl -o /lib/systemd/system/bcd.service https://download.bytesized-hosting.com/bcd.service
curl -o /lib/systemd/system/bcd-proxy.service https://download.bytesized-hosting.com/bcd-proxy.service

Step 14 - Editing with nano the bcd.service file because if you open the bcd.service file with nano on the 6th line of code there is again mentioned the user bytesized. So i change via nano the 6th line from "User=bytesized" to "User=USERNAME”

nano /lib/systemd/system/bcd.service

Also edit /lib/systemd/system/bcd-proxy.service and turn ExecStart=/usr/local/bin/bcd-proxy into ExecStart=/usr/local/bin/bcd-proxy --username USERNAME

This will ensure routing is working.

Step 15 - After saving the bcd.service file i enabled bcd.service and bcd-proxy.service to start on boot:

systemctl enable bcd.service
systemctl enable bcd-proxy.service

For both i received the following output in the terminal:

Created symlink from /etc/systemd/system/multi-user.target.wants/bcd.service to /lib/systemd/system/bcd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/bcd-proxy.service to /lib/systemd/system/bcd-proxy.service

Step 16 - Starting the services bcd and bcd-proxy:

service bcd start
service bcd-proxy start

Go back to the website and press "Check connection" everything should be working now.