> 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/kusama/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***

```bash
sudo apt update && sudo apt upgrade -y
sudo apt install curl git make wget lz4 clang pkg-config libssl-dev build-essential -y
sudo apt install golang-go -y
sudo apt install apt-transport-https gnupg cmake protobuf-compiler -y

curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
sudo mv bazel-archive-keyring.gpg /usr/share/keyrings

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
```

## ***Automatic Installation***

```bash
source <(curl -s https://raw.githubusercontent.com/validexisinfra/Kusama/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
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/.kusama
chown -R $(id -u):$(id -g) $HOME/.kusama
```

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

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

<pre class="language-bash"><code class="lang-bash">sudo tee /etc/systemd/system/kusama.service > /dev/null &#x3C;&#x3C;EOF
[Unit]
Description=Kusama Validator Node
After=network.target

[Service]
Type=simple
User=$current_user
WorkingDirectory=$HOME/.kusama
ExecStart=/usr/local/bin/polkadot \
  --validator \
  --name "$STARTNAME" \
  --chain=kusama \
  --database RocksDb \
  --base-path $HOME/.kusama \
  --public-addr /ip4/$(wget -qO- eth0.me)/tcp/30333 \
  --port 30333 \
  --rpc-port 9933 \
<strong>  --prometheus-external \
</strong>  --prometheus-port=9615 \
  --network-backend litep2p \
  --in-peers 12 \
  --out-peers 8 \
  --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
</code></pre>

***Start and Enable the Service***

```bash
sudo systemctl daemon-reload
sudo systemctl enable kusama.service
sudo systemctl restart kusama.service
sudo journalctl -u kusama.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/0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe)
{% 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%2Fkusama-rpc.dwellir.com#/accounts) and first create a wallet
* We create a validator. To do this, select `Network - Staking - Accounts - Validator`
