This guide is written for professional liquidity providers to turn a powerful Mini PC into an always-on OpenDEX node.
Two options are available:
GIGABYTE GB-BLCE-4105 BRIX: 138 €
4 GB RAM: 15 €
120GB M.2 SSD: 20 €
USB stick for backups: 3,99 €
Any >1GB USB stick will do.
A NAS/Samba share works too.
GIGABYTE GB-BLCE-4105 BRIX: 138 €
Alternative: ODROID H2+ - same platform, features NVME, needs separate case, power supply and wifi dongle, out of stock at times
32 GB RAM: 127 €
Alternative: List of compatible RAM
2TB SSD: 193 €
Alternative: 1 TB M.2 SSD NVME - for Odroid H2+
Alternative: 240GB M.2 SSD + 2TB HDD
USB stick for backups: 3,99 €
Any >1GB USB stick will do.
A NAS/Samba share works too.
Download Ubuntu Server 20.04 LTS onto your computer. Any other linux distribution supporting docker is also fine. This guide was written using Ubuntu Server 20.04
.
Insert a USB Stick into your computer and create the a bootable USB Stick with the ubuntu image you just downloaded.
Open your Mini PC, plug in RAM & drives, close it, connect it to your router via ethernet cable and to a power supply. Connect a screen via HDMI, a USB keyboard, the created bootable USB Stick, fire the Mini PC up and follow the the inital setup instructions.
Update ubuntu via sudo apt update && sudo apt upgrade
If you are using Ubuntu 20.04, install docker & docker-compose by running sudo apt install docker.io
. Otherwise if you are using any version besides Ubuntu 20.04, follow the official instructions to install docker.
Add new user opendex
:
ubuntu@ubuntu:~$ sudo adduser opendexAdding user `opendex' ...Adding new group `opendex' (1001) ...Adding new user `opendex' (1001) with group `opendex' ...Creating home directory `/home/opendex' ...Copying files from `/etc/skel' ...New password:Retype new password:passwd: password updated successfullyChanging the user information for opendexdEnter the new value, or press ENTER for the defaultFull Name []:Room Number []:Work Phone []:Home Phone []:Other []:Is the information correct? [Y/n] ubuntu@ubuntu:~$ Y
Add the opendex
user to the sudo group (advanced users can skip this and use another user to run sudo commands), the docker group and test if docker is working:
ubuntu@ubuntu:~$ sudo usermod -aG sudo opendexubuntu@ubuntu:~$ sudo usermod -aG docker opendex# switch to user opendexubuntu@ubuntu:~$ sudo su - opendexopendex@ubuntu:~$ docker run hello-worldHello from Docker!This message shows that your installation appears to be working correctly.
Looking good! Optionally, add an alias to enter your opendexd environment by simply typing "opendex":
opendex@ubuntu:~$ sudo nano ~/.bash_aliases# add the linealias opendex='bash ~/opendex.sh'# CTRL+S, CTRL+X. Then runopendex@ubuntu:~$ source ~/.bashrc
Connect the USB stick to your machine and set it up. It is very important to do this for a mainnet setup (given you do not want to lose money)!
# check the USB stick's path withopendex@ubuntu:~$ ls -la /dev/ | grep sdcrw------- 1 root root 2, 61 Dec 3 16:27 ptysdbrw-rw---- 1 root disk 8, 0 Dec 3 16:27 sdabrw-rw---- 1 root disk 8, 1 Dec 3 16:27 sda1 #this is your USB Stickcrw------- 1 root root 3, 61 Dec 3 16:27 ttysd# set it to automount via fstabopendex@ubuntu:~$ sudo nano /etc/fstab# add the line/dev/sda1 /media/USB ext4 defaults 0 2# CTRL+S, CTRL+X. Then mount itopendex@ubuntu:~$ sudo mkdir /media/USBopendex@ubuntu:~$ sudo mount -a# check if mounting workedopendex@ubuntu:~$ df -h# make sure opendexd can use itopendex@ubuntu:~$ sudo chown opendex:opendex /media/USB
DONE! Continue here.