Installing BoxExchanger software

  • I bought an exchanger
  • I rented an exchanger

1. Server parameters (VDS):

Minimum Featured
OS Linux Debian 9 or 10
CPU x2 (KVM) x4 (KVM)
Memory 2 GB 4 GB
Disk 10 GB 40 GB (SSD)

Server rent

You can rent a server in any company that you trust with your data to select VDS according to the parameters listed below.

We also selected a list of servers that our clients are running on:

2. Preparing the environment

After installing the server, you need to connect to it via SSH and set up the environment

Install Server Packages (nano git curl)

apt-get install -y curl git nano

Install NodeJS

Install NVM:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash

Add nvm path:

export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

Install NodeJS and NPM:

nvm install 12

Install MongoDB

Documentation from mongodb.com Official docs

Instruction debian 10 only use the official documentation if you have a different version of the system

Adding Keys:

sudo apt-get install -y gnupg wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list sudo apt-get update

Install:

sudo apt-get install -y mongodb-org Launch and add to autorun: sudo systemctl start mongod sudo systemctl daemon-reload sudo systemctl enable mongod

Create db and password:

mongo IMPORTANT! In the code below there are variables, you need to create your own (ADMIN_NAME, ADMIN_PASSWORD, DB_NAME, USER_NAME, YOUR_PASSWORD, DB_NAME) data data should not be disclosed to anyone it is your access from the database by disclosing them or installing the command without changes you run the risk be hacked!
use admin;
db.createUser({
  user: "ADMIN_NAME",
  pwd: "ADMIN_PASSWORD",
  roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
});
use DB_NAME;
db.createUser({
  user: "USER_NAME",
  pwd: "YOUR_PASSWORD",
  roles: [ { role: "readWrite", db: "DB_NAME" } ]
});
exit

Activate authorization

nano /etc/mongod.conf
security:
  authorization: "enabled"
        

Install Redis

apt-get install -y redis-server

Install Nginx

apt-get install -y nginx

Install packages g ++ build-essential imagemagick graphicsmagick

apt-get install -y g++ build-essential imagemagick graphicsmagick

Install PM2

npm i -g pm2

3.Downloading software to the server

Create SSH key

Documentation from github.com Generating a new SSH key

Linux tutorial

ssh-keygen -t rsa -b 4096

> Enter x3

eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa

Get your key:

cat ~/.ssh/id_rsa.pub

Copy the result and install this key in your user account or send it to us at support@boxexchanger.net from the mail you specified when purchasing the software

Clone the repositories

cd /var/www

NAME_PROJECT - you can find out in your personal account as well as a full link to cloning repositories or contact support.

git clone git@gitlab.com:NAME_PROJECT/exchanger-api.git git clone git@gitlab.com:NAME_PROJECT/exchanger-client-web.git git clone git@gitlab.com:NAME_PROJECT/exchanger-admin-web.git

4. Configuring and running Rest-API

cd /var/www/exchanger-api/ npm i npm run configure npm run dev # after 10 sec CTRL + C (2 times)

set your db access "mongodb": { "uri": "mongodb://USER_NAME:YOUR_PASSWORD@localhost:27017/DB_NAME" ...

nano config/app_config.json

configure your api config "shema" = https, your domain your project name, "server_path": "/service/", etc...

nano config/api_config.json

configure your api config

npm run seed

Find the line !! SAVE !!!, *****@admin.ex ***** Save the data, this is your login and password from the admin panel!

npm run migrate npm run build-api npm run start

Check api::

curl http://localhost:3010

response should has::

this is "service path" for project ...

5. Setting up Nginx configurations

Log in to your account click on your license you will be taken to the settings menu in the right corner there will be a button to download nginx configuration download it and transfer it to the server and the folder/etc/nginx/sites-enabled/

6. Build admin panel

cd /var/www/exchanger-admin-web/ npm i npm run configure

Configure the configuration: (if you have any difficulties contact support at support@boxexchanger.net)

nano config/app.json

Build project:

npm run generate

last string must be ✔ Client-side fallback created: 200.html this means that the admin panel has been assembled successfully

7. Build a web panel

cd /var/www/exchanger-client-web/ npm i npm run configure

Configure the configuration: (if you have any difficulties contact support at support@boxexchanger.net)

nano config/app.json

Build project:

npm run generate

last string must be ✔ Client-side fallback created: 200.html this means that the web panel has been assembled successfully



PS: How to update the BoxExchanger software you can find on the page BoxExchanger software update