Self Service Configuration and Deployment

Self Service deployment mainly involves the configuration and operation of Self Service nodes, which are key components connecting P2P networks with application services.

Environment Preparation

Minimum Server Configuration Requirements

  • CPU: 2 cores or more

  • Memory: 2GB RAM or more

  • Storage: 20GB available disk space

  • Operating System: Ubuntu 22.04 LTS or higher

  • Network: Stable internet connection, no public IP or open ports required

Dependency Software Installation

1

Docker Environment

# Install Docker (version 20.10+)
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

# Verify Docker installation
docker --version
2

Docker Compose

# Install Docker Compose (version 1.28+)
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

# Verify installation
docker-compose --version
3

Program Download and Extraction

# Download Self Service node package
wget https://github.com/RelayX-Protocol/Self-Service-Installer/releases/latest/download/selfservice.zip

# Extract package
unzip selfservice.zip
cd selfservice

# View directory structure
ls -la

Directory Structure Description

selfservice/
├── selfservice.tar        # Self Service node Docker image
├── config.json            # Core configuration file
├── pango.conf             # Node certificate configuration
├── docker-compose.yml     # Docker Compose deployment file
└── data/                  # Data directory (needs to be created)
    ├── logs/              # Log folder
    ├── mongo/             # MongoDB data directory
    └── node/              # Node data directory
        └── userkey.json   # Self Service account

Configuration Details

config.json - Core Configuration

This is the main configuration file for the Self Service node, controlling node runtime parameters:

Key Parameter Descriptions:

  • logLevel: Log level (debug/info/warn/error)

  • mongo: MongoDB database connection configuration for storing node data and message cache

  • port: Self Service node listening port

  • remoteService: Your application service address, supports HTTP/HTTPS

pango.conf - P2P Network Configuration

This file configures Self Service node connection parameters with RelayX Network:

Parameter Descriptions:

  • localsrvport: P2P network communication port

  • t2trepeater: Network relay identifier, assigned by official

  • nodserverurl: Must match the port in config.json

  • routecert: Service certificate from Self Service certificate (Base64 encoded format)

  • routecertexpired: Certificate expiration time (Unix timestamp, seconds)

docker-compose.yml - Container Orchestration Configuration

Docker Compose configuration file defining the complete service stack:

Deployment Process

1

Pre-create Necessary Files and Directories

2

Configure Files

Modify the database password and application service address in config.json according to the actual environment, as well as the Self Service certificate information in pango.conf.

3

Load Docker Image

4

Start Services

5

Verify Deployment

Health Check Interface Response Description:

Status codes returned by the /health interface:

  • 1: Startup successful, all components running normally

  • 2: Database connection failed, check MongoDB configuration and connection

  • 3: Node connection failed, check P2P network configuration and certificates

Also returns the number of registered Self Service personnel, including successfully registered and failed users.