# Setting-up your Node
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:
- AWS Elastic Beanstalk (opens new window)
- Azure (opens new window)
- Digital Ocean (opens new window)
- Scaleway (opens new window)
- OVH (opens new window)
Orchestrators with Docker as a first-class citizen:
For the moment, we have chosen to only describe the
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:
- Docker (opens new window) installed on your Linux machine
- Docker Compose (opens new window) installed on your machine (only if you want to use it to setup node, documented below).
Create the following configuration file
version: "2" services: postgres: image: "postgres:11-alpine" container_name: postgres-livenet restart: always #ports: #- "127.0.0.1:5432:5432" # uncomment this if you want to connect locally on DB volumes: - "postgres:/var/lib/postgresql/data" networks: - core environment: 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 uns: image: universalnamesystem/core:livenet container_name: uns-livenet # Can be anything restart: always environment: UNS_NET: livenet #FORGER_SECRET: "" CORE_DB_HOST: postgres CORE_DB_PORT: 5432 CORE_DB_DATABASE: uns_livenet CORE_DB_USERNAME: uns CORE_DB_PASSWORD: password ports: - "4001:4001" #- "4003:4003" cap_add: - SYS_NICE - SYS_RESOURCE - SYS_TIME networks: - core tty: true links: - postgres depends_on: - postgres volumes: postgres: networks: core:
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
# 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
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:
Find and uncomment line
FORGER_SECRET by removing the
# at the beginning of the line and set your crypto-account passphrase as value (between
uns: image: universalnamesystem/core:livenet ... environment: ... 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
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.