Installing exchanger-api / DONE

Rest-API installation on your own servers is available only if you purchase a full BoxExchanger software licence

Prepare dependencies

apt update
apt upgrade -y
apt install -y nano sudo curl wget

1. Install Docker and Docker Compose

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

2. Create runner user and add it to sudoers

sudo adduser --disabled-password --gecos "" runner
sudo usermod -aG sudo runner

3. Create docker group and add user to it

sudo usermod -aG docker runner

4. Switch to a 'runner' user

sudo su runner
newgrp docker

5. Create docker network

docker network create --subnet 10.1.0.0/24 exchanger-net

6. Docker login

  • Create a Personal Access Token in GitLab

  • Make sure to tick the read_registry permission scope

  • Create a reminder to update the PAT after expiration date, as once it expires you lose access for updates. https://git.boxexchanger.net/-/profile/personal_access_tokens

  • Login to docker read_registry

    docker login rg.boxexchanger.net
    
    # Username: your_gitlab_username
    # Password: your_gitlab_pat

7. Create required folders

8. Create your configurations (.env)

9. Create nginx configuration for api

Create /home/runner/api_server/nginx_api.conf file with following contents

Example nginx config.

10. Create your docker-compose.yml

11. Execute credential mongo generation script

12. Initialize MongoDB

13. Start API server

14. Get and remove initial admin credentials:

  • remove access.txt

Last updated