> For the complete documentation index, see [llms.txt](https://services.validexis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://services.validexis.com/mainnets/polkadot/installation-on-ubuntu-debian.md).

# ⚙️  Installation on Ubuntu/Debian

Recommended Hardware:

<table><thead><tr><th>Node Type</th><th width="184">CPU</th><th>RAM</th><th>Storage</th></tr></thead><tbody><tr><td>Mainnet</td><td>6</td><td>32GB</td><td>1TB </td></tr></tbody></table>

&#x20;***Update System and Install Dependencies***

<pre class="language-bash"><code class="lang-bash">sudo apt update &#x26;&#x26; sudo apt upgrade -y
sudo apt install -y \
  curl git make wget clang pkg-config libssl-dev build-essential \
  apt-transport-https gnupg cmake protobuf-compiler lz4

<strong>GO_VERSION=1.24.2
</strong>curl -Ls https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local

echo 'export PATH=/usr/local/go/bin:$HOME/go/bin:$PATH' | sudo tee /etc/profile.d/golang.sh > /dev/null
echo 'export PATH=/usr/local/go/bin:$HOME/go/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
</code></pre>

## ***Automatic Installation***

```bash
source <(curl -s https://raw.githubusercontent.com/validexisinfra/Polkadot/main/installmain.sh)
```

***Install Rust and Required Components***

```bash
curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env
rustup update
rustup component add rust-src
rustup target add wasm32-unknown-unknown
rustup install nightly-2024-01-21
rustup target add wasm32-unknown-unknown --toolchain nightly-2024-01-21
```

***Clone and Build Polkadot SDK***

```bash
cd ~
git clone https://github.com/paritytech/polkadot-sdk.git
cd polkadot-sdk
git checkout polkadot-stable2509-2
cargo build --release
```

#### Install binaries into the system directory

```bash
sudo mkdir -p /usr/lib/polkadot
sudo cp target/release/polkadot* /usr/lib/polkadot/
sudo ln -sf /usr/lib/polkadot/polkadot /usr/local/bin/polkadot
```

***Create working directory***

```bash
mkdir -p $HOME/.polkadot
chown -R $(id -u):$(id -g) $HOME/.polkadot
```

***Configure and Create a Systemd Service***

```bash
current_user=$(whoami)
STARTNAME="Your_Node_Name"
```

```bash
sudo tee /etc/systemd/system/polkadot.service > /dev/null <<EOF
[Unit]
Description=Polkadot Validator Node
After=network.target

[Service]
Type=simple
User=$current_user
WorkingDirectory=$HOME/.polkadot
ExecStart=/usr/local/bin/polkadot \
  --validator \
  --name "$STARTNAME" \
  --chain=polkadot \
  --database RocksDb \
  --base-path $HOME/.polkadot \
  --state-pruning 64 \
  --blocks-pruning 64 \
  --public-addr /ip4/$(wget -qO- eth0.me)/tcp/30333 \
  --port 30333 \
  --rpc-port 9933 \
  --prometheus-external \
  --prometheus-port=9615 \
  --unsafe-force-node-key-generation \
  --telemetry-url "wss://telemetry-backend.w3f.community/submit/ 1" \
  --telemetry-url "wss://telemetry.polkadot.io/submit/ 0"
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target
EOF
```

***Start and Enable the Service***

```bash
sudo systemctl daemon-reload
sudo systemctl enable polkadot.service
sudo systemctl restart polkadot.service
sudo journalctl -u polkadot.service -f
```

{% hint style="info" %}
After launch, we wait for our node to synchronize. You can track our condition using [TELEMETRY](https://telemetry.polkadot.io/#list/0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3)
{% endhint %}

After the node has synchronized, we pull out the key from our node by entering the command

```bash
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9933
```

#### *Creating a validator* <a href="#creating-a-validator" id="creating-a-validator"></a>

* Go to the [chain](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-public-rpc.blockops.network%2Fws#/accounts) and first create a wallet
* We create a validator. To do this, select `Network - Staking - Accounts - Validator`
