Сообщение Guide to installing Docker and preparing the server to run nodes появились сначала на INCRYPTED.Сообщение Guide to installing Docker and preparing the server to run nodes появились сначала на INCRYPTED.

Guide to installing Docker and preparing the server to run nodes

5 min read
In this article:

• 1. What you need to know before launching nodes

• 2. What is Linux

• 3. What is Docker in simple terms

• 4. Installing Docker on Linux (practical part)

• 5. Conclusion

Virtually all nodes, whether testnet, mainnet, or validator, run on Linux and through Docker. This is not a complication of the process, but an established industry standard.

This combination is used because a node is a server service that must operate stably and without interruptions 24/7.

We have created our own service, Nodes+, which helps you easily install and maintain nodes for various projects. However, if you wish, you can deploy a node yourself — in this article, we have prepared a basic guide for independent installation.

Why Linux and Docker

Linux is the basis for most servers. It runs stably around the clock, consumes minimal resources, and allows complete control over processes, which is critical for the correct operation of nodes.

Docker, in turn, solves the problem of differences in user environments. The node runs in a container that already has all the necessary dependencies, so it works the same on any server.

What Docker offers

  • Isolation — the node does not affect the system and other services;
  • Identical environment — fewer errors during startup;
  • Quick updates — updating usually boils down to a single command.

That is why the combination of Linux and Docker is used in almost all guides on running nodes.

Linux is a server operating system used to run nodes.

It is important to understand right away that Linux differs from Windows and macOS in terms of how it is used. It is not a system for everyday work, but a tool for stable and continuous service operation.

Server Linux is a system without a graphical interface, in which management is performed via the command line interface (CLI), allowing the user to manually manage processes, files, and services.

When launching a node, the user does not need to have in-depth knowledge of Linux. It is sufficient to be able to:

  • execute commands from guides;
  • understand whether the service is running;
  • verify that the node is functioning correctly.

This minimum is sufficient to start and maintain most nodes.

Docker is a way to run applications in containers.

A container is an isolated environment that already contains everything necessary for the application to run.

It is important not to confuse a container with a virtual machine. A container does not run a separate operating system, but uses the host system’s kernel, making it lighter, faster, and less resource-intensive.

Why projects use Docker

Docker allows you to run applications without manually installing dependencies, reduces errors caused by different library versions, and simplifies support and updates.

How Docker is used in nodes

In most cases, a single node is launched in a single container, and its launch, shutdown, and update are performed using Docker commands.

This makes the process of launching nodes as simple and predictable as possible for the user.

Before installing Docker, you must have Ubuntu installed. Many servers already come with Ubuntu, so most often you only need to install Docker.

One example of such servers is our partners Unihost, who provide high-quality and reliable server infrastructure optimised for running and stable operation of nodes 24/7.

System check

1. Launch the terminal and check the Ubuntu version:

or

2. Then we check the architecture:

3. Let’s move on to checking whether Docker is installed:

4. Checking for Docker packages:

5. Checking for the availability of the Docker service:

If Docker is installed, great, let’s move on to installing the node. If not, let’s move on to installing Docker.

The official way to install Docker via APT

1. Remove old versions of Docker (if any):

2. Update packages and install dependencies:

3. Add the official Docker GPG key:

4. Add the Docker repository:

5. Updating the package index:

6. Install Docker Engine and plugins:

7. Enable autostart and launch Docker:

8. Checking the service status:

9. Check the Docker version after installation:

or

10. Launch the test container:

If the installation was successful, you will see the message Hello from Docker!.

What to do if the command did not work (common errors)

Error 1: docker: command not found.

This usually means that Docker has not been installed or the repository has not been added.

1. Check the availability of the repository:

2. Update the packages and repeat the installation:

Error 2: permission denied / Got permission denied while trying to connect to the Docker daemon socket.

This means that Docker was launched without privileges (not via sudo).

Possible solutions:

  1. Run the command with sudo:
  1. Add the user to the docker group:

After correcting the error, we perform a check:

Error 3: Cannot connect to the Docker daemon.

This usually occurs when the service is not running. To resolve this, enter the following commands:

After learning about Linux and Docker and completing all the steps described above, you will be able to prepare the server for installation and launch nodes on your own. Using ready-made server solutions, such as Unihost, simplifies the deployment process and provides you with a stable, high-performance server suitable for long-term, uninterrupted node operation. Using the Nodes+ service, in turn, completely takes care of server configuration and maintenance, saving you from technical difficulties.

If you have any questions while completing the activities, you can ask them in our Telegram chat.

Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact service@support.mexc.com for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.