# Installation

**Step 1: Update system and install dependencies**

```
sudo apt update -y && sudo apt upgrade -y && sudo apt install -y curl openssh-server git certbot nginx sqlite3 build-essential && sudo systemctl enable ssh && curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && sudo apt-get update -y && sudo apt-get install -y yarn && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash && source ~/.bashrc && sudo ufw allow 22 80 443 && sudo ufw enable
```

**Step 2: Install Docker**&#x20;

```php
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
```

```
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

**Step 3:** Install Node Version Manager

```php
nvm install 20.11.1 && nvm use 20.11.1
```

**Step 4: Clone ar.io repository**

```php
git clone -b main https://github.com/ar-io/ar-io-node
cd ar-io-node
```

**Step 5:** Modify your *.env*

```php
GRAPHQL_HOST=arweave.net
GRAPHQL_PORT=443
START_HEIGHT=0
RUN_OBSERVER=true
ARNS_ROOT_HOST=<your-domain>
AR_IO_WALLET=<your-gateway-wallet-address>
OBSERVER_WALLET=<hot-wallet-public-address(you can use same wallet)>
AO_CU_URL=https://cu.ardrive.io
ARNS_NAME_LIST_CACHE_MISS_REFRESH_INTERVAL_SECONDS=60 
```

{% hint style="success" %}
Note : Export your wallet from wander and place in the wallets directory (your\_wallet.json).
{% endhint %}

**Step 6:** Edit DNS Records on Cloudflare.

<figure><img src="/files/78dd2idAm7QAL9GB14K2" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Don’t forget to change *“Type”* and switch off “*Proxy”.*
{% endhint %}

**Step 7:** Get *acme\_challange* token for DNS Records.

```
sudo certbot certonly --manual --preferred-challenges dns --email <your-email-address> -d <your-domain> -d '*.<your-domain>'
```

{% hint style="success" %}
Note : Change email by your email and domain by your domain.
{% endhint %}

**Step 8:** Configure nginx on Server

```
sudo nano /etc/nginx/sites-available/default
```

```
# Force redirects from HTTP to HTTPS
server {
    listen 80;
    listen [::]:80;
    server_name <your-domain>.com *.<your-domain>;

    location / {
        return 301 https://$host$request_uri;
    }
}

# Forward traffic to your node and provide SSL certificates
server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name <your-domain> *.<your-domain>;

    ssl_certificate /etc/letsencrypt/live/<your-domain>/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/<your-domain>/privkey.pem;

    location / {
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
    }
}
```

```
sudo nginx -t
```

{% hint style="success" %}
There'll be **ok** status if all nginx settings was correct.
{% endhint %}

```
sudo service nginx restart
```

**Step 9:** Run the node

```
sudo docker compose up -d
```

**Step 10:** Stop the node

```
sudo docker compose down
```


---

# Agent Instructions: 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:

```
GET https://docs.logosnodos.online/mainnet-node/ar.io/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
