# Installation

### Install Dependencies

{% hint style="danger" %}
Skip this step if you're already run Impact Protocol before. Run this command if you're using new server. Make sure you use this command one by one.
{% endhint %}

{% code overflow="wrap" %}

```bash
sudo apt-get update
sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler
sudo apt install build-essential
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustc --version
rustup default stable
rustup update
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup show
rustup +nightly show
```

{% endcode %}

### Install Impact Protocol

* Remove old folder

```bash
rm -rf impactprotocol
```

* Clone repository

```bash
git clone https://github.com/GlobalBoost/impactprotocol
```

* Go the folder

```bash
cd impactprotocol
```

* Build

{% hint style="info" %}
It will take some time to build, it depend on your server specs.
{% endhint %}

```bash
cargo build --release
```

* Copy impact binary to system

{% code overflow="wrap" %}

```bash
sudo cp $HOME/impactprotocol/target/release/impact /usr/local/bin/
```

{% endcode %}

* Remove old data chain

Change the **--base-path** directory with your own folder name. It depend what is your directory name that you run before. Skip this step if you're running on new server.

{% code overflow="wrap" %}

```bash
impact purge-chain --chain=impact-testnet --base-path /tmp/impactnode
```

{% endcode %}

* Generate mining key

{% hint style="danger" %}
Skip this step if you're already have account before.
{% endhint %}

```bash
impact generate-mining-key --chain=impact-testnet
```

* Import mining key

Change **\<seed\_phrase>** with your seed phrase.&#x20;

{% code overflow="wrap" %}

```bash
impact import-mining-key <seed_phrase> \--base-path /tmp/impactnode \--chain=impact-testnet
```

{% endcode %}

* Create Impact as a service

{% hint style="danger" %}
Change the "xxx" with your own data.\
**--author** is your public key, you can find it when you import the mining key before.

**--name** is your node name.
{% endhint %}

{% code title="impact.service" %}

```bash
sudo tee /etc/systemd/system/impact.service > /dev/null << EOF
[Unit]
Description=Impact Protocol Node
After=network-online.target

[Service]
User=$USER
Restart=on-failure
RestartSec=10
ExecStart=$(which impact) \
--base-path /tmp/impactnode \
--chain=impact-testnet \
--port 30333 \
--ws-port 9945 \
--rpc-port 9933 \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--validator \
--author xxx \
--rpc-methods Unsafe \
--name "xxx"

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

{% endcode %}

* Refresh the service and start

{% code overflow="wrap" %}

```bash
sudo systemctl daemon-reload
sudo systemctl start impact
```

{% endcode %}

* Check your logs

{% code overflow="wrap" %}

```bash
journalctl -fu impact -o cat
```

{% endcode %}


---

# 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.strnan.top/testnet/impact-protocol/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.
