Skip to content

Setup Guide for Ubuntu Linux

PermieBTS edited this page Sep 4, 2019 · 50 revisions

18.0 Setup Guide for Ubuntu Linux

18.1 Tested on Ubuntu 16.04 LTS, but should work on other Debian based distribution of similar age. Ubuntu 14.04 is not supported.

18.1.1 Supported Ubuntu versions: 16.04 LTS and newer (tested on Ubuntu 16.04 LTS and Ubuntu 18.04 LTS)

** 18.1.2 NOTE: when you run dexbot on a linux vps with a non root user you must run the setup from a virtual env. You cannot run the setup otherwise because you won't have write access to dist-packages**. See this helpful guide for installing and using a virtualenv with python3.

18.2 Installation for GUI

18.2.1 Bring up a terminal with CTRL + Alt + T.

18.2.2 Copy and paste the following commands into the terminal one line at a time and press Enter. Don't copy the $-sign, as it just signifies that you run the command as a normal user - not superuser.

$ sudo apt-get install gcc make libssl-dev python3-pip python3-dev git
$ git clone https://github.com/Codaone/DEXBot.git dexbot
$ cd dexbot   
$ make install-user

18.3 Installation for CLI only

18.3.1 If you just want the CLI version without graphics (which will work on more systems):

$ sudo apt-get install gcc make libssl-dev python3-pip python3-dev git
$ git clone https://github.com/Codaone/DEXBot.git dexbot
$ cd dexbot   
$ pip3 install --user -e .                  (the dot included)

### 18.4 Missing packages

**18.4.1** On some Ubuntu systems, it will complain about missing packages; you first need to make sure you have the universe repository. And also have the Requirements.txt installed. Here's how:

$ sudo apt-get install -y software-properties-common $ sudo add-apt-repository universe $ pip install -r requirements.txt

If this doesn't solve the missing packages issue, proceed to **18.4.2**

**18.4.2** NOTE: You don’t need to upgrade the system; the issue here is about the _range_ of packages available, not how new/old the packages are.

#### **18.4.3** On Ubuntu 18.04 Bionic Beaver pip3 is not installed by default. Here's how to install it:

**18.4.3.1** Start by updating the package list using the following command:

$ sudo apt update


**18.4.3.2** Use the following command to install pip for Python 3:

$ sudo apt install python3-pip

The above command will also install the dependencies required for building Python modules.

**18.4.3.3** Once the installation is complete, verify the installation by checking the pip version:

$ pip3 --version


**18.4.3.4** The version number may vary, but it should look something like this:

Output pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)


**18.4.3.5** Sometimes when installing DEXBot v0.15.5 and above users will need to install the "alembic" module. Type:

python3 -m pip install alembic

## 18.5 Running
**18.5.1** To run with GUI Type the following command (without the $-sign) and press enter.

$ dexbot-gui

**18.5.1.1** To run with CLI Type the following command (without the $-sign) and press enter:

$ dexbot-cli configure

and follow the setup.

**18.5.1.2** To run a previously setup worker with cli, type:

$ dexbot-cli run


**18.5.2** The bot writes a log file in the same working directory. If you are running the GUI you can watch the output with: `tail -f ~/.local/share/dexbot/dexbot.log` (write in a separate command-line and press Enter)

**18.5.3** A local API node can be configured in `~/.config/dexbot/config.yml`.

**18.5.4** You can run the gui.py file in the /DEXBot folder. Install lubuntu for a GUI.

**18.5.5** Use your **active** "private key" (not your web password for Crypto-Bridge/OpenLedger/SparkDEX/GDEX etc) for the worker privkey. You can find it in the public/private key viewer by unlocking your bts account on a webwallet or downloaded BitShares client. [See 43 seconds onwards of this video to see how to find and copy your active private key.](https://www.youtube.com/watch?time_continue=43&v=Rk9CI2sVNbs)

**18.5.6** See the [BitShares Active Private Key Guide here](https://github.com/Codaone/DEXBot/wiki/BitShares-Active-Private-Key-Guide) for finding your private active key in your BitShares wallet. 

## 18.6 Updating
**18.6.1** Assuming you are on master branch (When you use git to install DEXBot the master branch is used by default. If you're purely using Linux to install DEXBot you will be on master branch without having to do anything):

$ cd ~/dexbot $ git pull $ make install-user

# 18.7 Using package

## 18.7.1 Installation
**18.7.1.1** Download the latest release tar.gz file 
**18.7.1.2** Extract the file into your folder of choice

## 18.7.2 Running

**18.7.2.1** Double click either dexbot-cli or dexbot-gui executable

## 18.8 Updating
**18.8.1** Remove the old version (no need to delete config and database files)

**18.8.2** Repeat installation process

## 18.9 Troubleshooting
**18.9.1** Have a look at [common problems](https://github.com/Codaone/DEXBot/wiki/Common-problems).