# Setting-up your Node

# Introduction

Here we will help you set up a uns.network relay node and/or forger node.

To make your life easier, we've built Docker images of uns.network nodes.

# What is docker

Docker is the de facto industry standard for packaging applications into a container. By doing so, all dependencies, such as the language runtimes, operating system, and libraries are combined with the product.

Different cloud providers offer specific products to host your Docker containers, such as:

Orchestrators with Docker as a first-class citizen:

For the moment, we have chosen to only describe the docker-compose setup. So, if you choose to run your uns.network node on other platforms, share your own experience on the uns.network network of the forum! (opens new window)

# Minimum requirements for running a relay or forger node

  • Linux: Ubuntu 18.04 / 20.04, CentOS/RHEL 7 / 8 ...
  • 2+ vCPU x86/64 bits
  • 2-4 GB RAM
  • at least 20 GB drive

We strongly recommend running your node on SSD drive as there are a lot of read and write operations to the DB.

# Network configuration

Depending on your hosting infrastructure, you will need open TCP ports on your firewall:

    • 4001 (required): this is the communication port used by the node to exchange information with other nodes of the uns.network
    • 4003 (optional): open it if you want to open the API to the world, in order to submit transactions for example. If you don't know what is it for, keep it closed


Don't forget to forward (by NAT, routing ...) the opened ports to the corresponding ports on your VM or Docker engine!

Unfortunately, there is no standard documentation to do that, so please follow the configuration guide of the firewall provided by your hosting provider, or if you are running a node at home, the guide for your 'home box'.

# Run a node with Docker Compose

In this documentation, we'll start a LIVENET uns.network node using Docker Compose (opens new window) and a configuration file.

So, be sure to have these prerequisites:

Create the following configuration file docker-compose.yml:

version: "2"
    image: "postgres:11-alpine"
    container_name: postgres-livenet
    restart: always
      #- "" # uncomment this if you want to connect locally on DB
      - "postgres:/var/lib/postgresql/data"
      - core
      POSTGRES_DB: uns_livenet # Must match with CORE_DB_DATABASE below
      POSTGRES_USER: uns # Must match with CORE_DB_USERNAME below
      POSTGRES_PASSWORD: password # Must match with CORE_DB_DATABASE below

    image: universalnamesystem/core:livenet
    container_name: uns-livenet # Can be anything
    restart: always
      UNS_NET: livenet
      #FORGER_SECRET: ""
      CORE_DB_HOST: postgres
      CORE_DB_PORT: 5432
      CORE_DB_DATABASE: uns_livenet
      CORE_DB_PASSWORD: password
      - "4001:4001"
      #- "4003:4003"
      - SYS_NICE
      - SYS_TIME
      - core
    tty: true
      - postgres
      - postgres

You can also download the full file from our repository (opens new window).


You can download the file directly on your machine:

$ curl -O https://raw.githubusercontent.com/unik-name/docs.uns.network/master/docs/setting-up-uns-node/livenet/docker-compose.yml

Check-out the reference guide to understand the Docker-compose file.

# Run a relay with Docker Compose

With the previously created configuration file, you simply have to run:

$ docker-compose up

The node starts logging a lot of information and tries to reach peers before syncing. You can stop the node by hitting CTRL+C.


You can read your node logs by running docker-compose logs --tail 10 uns (here, the last 10 log lines).

# Run a permanent relay with Docker Compose

If you want to permanently run your node (so as a daemon), use this command:

$ docker-compose up -d

Then you can shutdown it with:

$ docker-compose down

# Run a forger with Docker Compose

To run a forger node, please edit the docker-compose.yml file, with Nano or Vim for example: nano docker-compose.yml.

Find and uncomment line FORGER_SECRET by removing the # at the beginning of the line and set your crypto-account passphrase as value (between " "):


    image: universalnamesystem/core:livenet
      FORGER_SECRET: "your fantastic passphrase here"

Then, (re)start your forger node with the following command:

$ docker-compose up -d

Now you have a running forger node and you're forging blocks! 👏

# Checking your delegate status in the Explorer

Now, your job is done. You can check on explorer (opens new window) that you're in the delegate list (either in active or standby tab).

If you're in the active tab, congratulation, you're a uns.network delegate, and your forger node is actually forging blocks and getting rewards!

If you're in the standby tab, you need to gather more voting power than current active delegates (i.e. have cryptoaccounts with positive balance voting for you).

Let's go fot the final steps.