> For the complete documentation index, see [llms.txt](https://dgtnetwork.gitbook.io/dgt-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dgtnetwork.gitbook.io/dgt-docs/6.-administrator-guide/6.1-introduction/6.1.6-os-setup-and-initialization.md).

# 6.1.6 OS Setup and initialization

The information presented here and below is focused on installing the Ubuntu operating system and then downloading the DGT source files from GitHub. In case of other parameters, use the necessary clarifications or get advice from <partnership@dgt.world>.

* Download an operating system image, such as [Ubuntu 20.04.3](https://releases.ubuntu.com/20.04.3/ubuntu-20.04.3-live-server-amd64.iso?_ga=2.252072585.1036147928.1641525928-1577823777.1641525928).
* Prepare the server for booting or create a stub for the virtual machine (see the manual for [VirtualBox](https://docs.oracle.com/cd/E26217_01/E26796/html/qs-create-vm.html) or [VMWare](https://kb.vmware.com/s/article/1018415)). Check the minimum system requirements – see above.
* Install the operating system using the proper user guide. For example, the [official guide](https://ubuntu.com/tutorials/install-ubuntu-server#1-overview) is recommended for Ubuntu. Enter the required credentials[^1], e.g. *login: dgt, password: matagami2022*.
* For the Linux system, install additionally:

  o   Open SSH (read more [here](https://linuxize.com/post/how-to-enable-ssh-on-ubuntu-20-04/))

  o   Midnight Commander (optional, see [here](https://installati.one/ubuntu/20.04/mc/))

  o   Python 3.9 or above (see [here)](https://linuxize.com/post/how-to-install-python-3-9-on-ubuntu-20-04/)

  o   SFTP/FTP for enabling remote access to server files (see [here](https://ubuntu.com/server/docs/service-ftp))

### **6.1.6.1 Docker Installation**

Whether you are downloading files directly from GitHub or using prepared installation files, the most convenient way to assemble the node is to use Docker, a deployment automation and container management software. The following is a sequence of steps to install the Docker container management tool for the Docker operating system.

* Update: sudo apt update
* Install auxiliary utilities:

  o   `apt-transport-https` — activates the transfer of files and data through https.

  o    `ca-certificates` — enables verification of security certificates.

  o    `curl` — utility for accessing web resources.

  o    software-properties-common —activates the ability to use scripts to manage software.

```
sudo apt install apt-transport-https ca-certificates curl software-properties-common
```

* Add a GPG key to operate with the official Docker repository:

```
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
```

* Add the Docker repository into the local list of repositories:

```
sudo add-apt-repository "deb [arch=amd64] 
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
```

* Re-update the data on operating system’s packages:

```
sudo apt update
```

* Install the Docker package itself:

```
sudo apt install docker-ce -y
```

* Initialize the Docker daemon and add it to startup:

```
sudo systemctl start docker
sudo systemctl enable docker

```

More information is available in the [official Docker guide](https://docs.docker.com/engine/install/ubuntu/).

### **6.1.6.2 Setup Docker Compose**

{% hint style="warning" %}
It is not recommended to use a version of Docker Compose other than 1.21.1 for this version of DGT
{% endhint %}

Docker Compose is a tool for describing and running multi-container Docker applications. The tool allows users to start, execute, communicate, and close containers with a single command.

* We download the Docker Compose assembly directly from the GitHub repository with the required versions and options:

o   -L allows redirects if the file is moved.

o   -o modifies the file name to make it easier to run and specifies the directory to save.

```
sudo curl -L 
"https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
```

Installation options:

o   Specify a different version, for example, “1.28.6” instead of “1.23.1”

o   Install from repository: *sudo apt-get install docker-compose*

* After the download is complete, you will need to add execution rights to the downloaded binary file:

```
sudo chmod +x /usr/local/bin/docker-compose
```

* We check the correctness of the Docker Compose operations:

```
sudo docker–compose –version
```

### **6.1.6.3        Post-Installation actions**

To support the workability of bath-files, we configure rights and groups:

* Create a Docker group:

```
sudo groupadd docker
```

* Add the current user to the created group:

```
sudo usermod -aG docker $USER
```

* Activate changes in the group:

```
newgrp docker
```

* We check the ability to run Docker commands for the current user (without sudo):

```
docker run hello-world
```

* In case of running Docker commands before adding a user to a group (which is what happens, if we take the checks into account), an error occurs with incorrect rights to the *\~/.docker/*. directory.

```
WARNING: Error loading config file: /home/user/.docker/config.json -
stat /home/user/.docker/config.json: permission denied
```

To fix this, we will use the following commands:

```
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
$ sudo chmod g+rwx "$HOME/.docker" -R
```

* Check again:

```
docker run hello-world
```

### **6.1.6.4 Last check before launch**

Before proceeding with the installation of the DGT Node, check that you have completed the necessary preparatory steps and that the system requirements are met:

<table data-header-hidden><thead><tr><th width="60.666666666666686"></th><th width="506"></th><th></th></tr></thead><tbody><tr><td>#</td><td>Action/Requirements</td><td>Complete?</td></tr><tr><td>1</td><td>You understand the functionality of the DGT platform and understand its positioning – see <a href="/pages/orQQaZDNVPwqoMhtORjy">1.1</a></td><td>▢</td></tr><tr><td>2</td><td>You intend to use DGT for purposes consistent with the DGT Code of Conduct (see 8.4)</td><td>▢</td></tr><tr><td>3</td><td>You have access to the official <a href="https://github.com/DGT-Network">GitHub DGT</a> repository; you read and understand the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a> license requirements for the DGT CORE configuration and <a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL 3.0</a> for configuring GARANASKA (see also <a href="/pages/33yZYvamonwum7qIe8Bs">1.5</a>)</td><td>▢</td></tr><tr><td>4</td><td>The target system meets the minimum requirements (CPU, HDD, RAM, Network Access) specified in <a href="/pages/MBv4KidiRHWuk1gRfpIe#id-6.1.5.1-minimal-requirements">6.1.5.1</a></td><td>▢</td></tr><tr><td>5</td><td>If a premade virtual machine image is used, the corresponding archive has a checksum that matches this guide (see <a href="/pages/6DdX0agddVxbOtaZevh7">6.1.3</a>)</td><td>▢</td></tr><tr><td>6</td><td>You have full access to the server, including administrative rights</td><td>▢</td></tr><tr><td>7</td><td>Docker container manager and Docker Compose are installed on your operating system and the necessary settings have been implemented (see <a href="#id-6.1.6.1-docker-installation">6.1.6.1 – 6.1.6.3</a>)</td><td>▢</td></tr></tbody></table>

[^1]: It is recommend that you use your own settings for the account and follow known guides when creating them, such as [NIST Password Guidelines](https://pages.nist.gov/800-63-3/sp800-63-3.html),  [ENISA Basic Security practice](https://www.enisa.europa.eu/media/news-items/basic-security-practices-regarding-passwords-and-online-identities) or [Canada Best Practices for Passphrases and Passwords (ITSAP.30.032)](https://www.cyber.gc.ca/sites/default/files/publications/ITSAP.30.32%20-en.pdf)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://dgtnetwork.gitbook.io/dgt-docs/6.-administrator-guide/6.1-introduction/6.1.6-os-setup-and-initialization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
