Kusama (https://kusama.network/), the wild cousin of Polkadot is alive now!

Tired of running canned dockers and want to play directly with the software? :-) This is for you! ;-)

How to build & run a kusama full node in Ubuntu 18.04.3 LTS

Hardware requirements

For the tests i used a 2 vCPU / 8 GB RAM / 80 GB SSD VPS server.

Let's go

Login to your server and execute the following commands as root:

Upgrade!

Fisrt of all let's upgrade Ubuntu:

cd
apt update -y
apt upgrade -y

Reboot server at this step if needed ...

Install Rust

curl https://sh.rustup.rs -sSf | sh
apt install make clang pkg-config libssl-dev build-essential -y

Logout/login at this point.

rustup update

Install Polkadot

Time to take a coffe or two while Rust gets fun with your CPU :-)

git clone https://github.com/paritytech/polkadot.git
# To update your node. Run from this step.
cd polkadot
cargo clean
git fetch
git checkout v0.6.3
./scripts/init.sh 
cargo build --release
cd ..
mv polkadot /usr/local

git clone https://github.com/paritytech/polkadot.git # To update your node. Run from this step.cd polkadot cargo clean git fetch git checkout v0.6 ./scripts/init.sh  cargo build --release

Create systemd service

nano /etc/systemd/system/kusama.service

Put the following on it, be sure to replace YOURNAMEHERE by your moniquer name (🙈 emojis allowed! 🙈):

[Unit]
Description=Kusama full node

[Service]
ExecStart=/usr/local/polkadot/target/release/polkadot --name YOURNAMEHERE 
Restart=always

[Install]
WantedBy=multi-user.target

Enable autostart on bootup

systemctl enable kusama.service

Start your new kusama node!

systemctl start kusama.service

You can check it's working with:

systemctl status kusama.service

You shold see something like:

ago 23 19:02:36 vps714213 polkadot[24147]: 2019-08-23 19:02:36 Imported #4434 (0xa510…067b)
ago 23 19:02:37 vps714213 polkadot[24147]: 2019-08-23 19:02:37 Imported #4434 (0xc202…1cbd)
ago 23 19:02:39 vps714213 polkadot[24147]: 2019-08-23 19:02:39 Idle (23 peers), best: #4434 (0xa510…067b), finalized #4434 (0xa510…067b), ⬇ 41.4kiB/s ⬆ 28.7kiB/s
ago 23 19:02:39 vps714213 polkadot[24147]: 2019-08-23 19:02:39 Discovered new external address for our node: /ip4/10.0.1.77/tcp/30333/p2p/QmZ1qRZ1Rr3NB5rMD77mKWqyQfHDqNX8SV5gJ5xZJgsUC7
ago 23 19:02:42 vps714213 polkadot[24147]: 2019-08-23 19:02:42 Imported #4435 (0xd87e…a46c)
ago 23 19:02:44 vps714213 polkadot[24147]: 2019-08-23 19:02:44 Idle (23 peers), best: #4435 (0xd87e…a46c), finalized #4434 (0xa510…067b), ⬇ 31.1kiB/s ⬆ 24.1kiB/s
ago 23 19:02:48 vps714213 polkadot[24147]: 2019-08-23 19:02:48 Imported #4436 (0x6f4b…6bd0)
ago 23 19:02:49 vps714213 polkadot[24147]: 2019-08-23 19:02:49 Idle (23 peers), best: #4436 (0x6f4b…6bd0), finalized #4435 (0xd87e…a46c), ⬇ 51.3kiB/s ⬆ 32.9kiB/s

You can tail the logs with journalctl like so:

journalctl -f -u kusama

And of course see your new node in Telemetry!

https://telemetry.polkadot.io/#list/Kusama%20CC2

Reference:

https://guide.kusama.network/en/latest/try/validate/