|
| 1 | +--- |
| 2 | +sidebar_position: 1 |
| 3 | +sidebar_label: 🥡 Installation |
| 4 | +title: 🚄 Setup and run a Collator |
| 5 | +hide_title: false |
| 6 | +--- |
| 7 | + |
| 8 | +import Tabs from '@theme/Tabs'; |
| 9 | +import TabItem from '@theme/TabItem'; |
| 10 | + |
| 11 | +Installation > [Configuration](configuration) > [Running](running) > [Sync](sync) > [Session keys](keys)> [Bond](bond) |
| 12 | + |
| 13 | +## 🥡 Installation |
| 14 | + |
| 15 | +<Tabs groupId="os"> |
| 16 | +<TabItem value="docker" label="docker"> |
| 17 | + |
| 18 | +- pull the latest manta container |
| 19 | + |
| 20 | +```bash |
| 21 | +#!/bin/bash |
| 22 | + |
| 23 | +# Depending on your setup, here are some steps to get started |
| 24 | + |
| 25 | +# Upgrade to latest version |
| 26 | +sudo apt update && sudo apt upgrade -y |
| 27 | + |
| 28 | +# Install docker |
| 29 | +sudo apt install docker.io |
| 30 | + |
| 31 | +# Add current user to docker |
| 32 | +sudo usermod -aG docker $USER |
| 33 | + |
| 34 | +# Pull the manta image |
| 35 | +docker pull mantanetwork/manta:latest |
| 36 | +``` |
| 37 | + |
| 38 | +</TabItem> |
| 39 | +<TabItem value="fedora" label="fedora"> |
| 40 | + |
| 41 | +the manta .rpm package contains: |
| 42 | + |
| 43 | +- the manta binary (which is also used to run manta) |
| 44 | +- manta and manta systemd services |
| 45 | +- manta, manta, polkadot and kusama chain specifications |
| 46 | +- a script which runs after installation and creates the manta system account which the systemd service runs under |
| 47 | + |
| 48 | +get started (see also: [rpm.manta.systems](https://rpm.manta.systems/)): |
| 49 | + |
| 50 | +- add the manta .rpm repository |
| 51 | + |
| 52 | + ```bash |
| 53 | + #!/bin/bash |
| 54 | + |
| 55 | + sudo dnf install dnf-plugins-core |
| 56 | + sudo dnf config-manager --add-repo https://rpm.manta.systems/manta.repo |
| 57 | + sudo dnf config-manager --set-enabled manta |
| 58 | + sudo dnf update |
| 59 | + ``` |
| 60 | + |
| 61 | +- install manta |
| 62 | + |
| 63 | + ```bash |
| 64 | + #!/bin/bash |
| 65 | +
|
| 66 | + sudo dnf install manta |
| 67 | + ``` |
| 68 | + |
| 69 | +</TabItem> |
| 70 | +<TabItem value="ubuntu" label="ubuntu"> |
| 71 | + |
| 72 | +the manta .deb package contains: |
| 73 | + |
| 74 | +- the manta binary (which is also used to run manta) |
| 75 | +- manta and manta systemd services |
| 76 | +- manta, manta, polkadot and kusama chain specifications |
| 77 | +- a script which runs after installation and creates the manta system account which the systemd service runs under |
| 78 | + |
| 79 | +get started (see also: [deb.manta.systems](https://deb.manta.systems/)): |
| 80 | + |
| 81 | +- add the manta .deb repository |
| 82 | + |
| 83 | + ```bash |
| 84 | + #!/bin/bash |
| 85 | +
|
| 86 | + sudo curl -o /usr/share/keyrings/manta.gpg https://deb.manta.systems/manta.gpg |
| 87 | + sudo curl -o /etc/apt/sources.list.d/manta.list https://deb.manta.systems/manta.list |
| 88 | + sudo apt update |
| 89 | + ``` |
| 90 | + |
| 91 | +- install manta |
| 92 | + |
| 93 | + ```bash |
| 94 | + #!/bin/bash |
| 95 | +
|
| 96 | + sudo apt install manta |
| 97 | + ``` |
| 98 | + |
| 99 | +</TabItem> |
| 100 | +<TabItem value="linux" label="other linux"> |
| 101 | + |
| 102 | +- download binary, chain specifications and systemd unit file |
| 103 | + |
| 104 | + ```bash |
| 105 | + #!/bin/bash |
| 106 | +
|
| 107 | + # intall jq on ubuntu |
| 108 | + sudo apt install jq |
| 109 | +
|
| 110 | + # or on fedora |
| 111 | + sudo dnf install jq |
| 112 | +
|
| 113 | + # get the latest version of binary |
| 114 | + manta_version=$(curl -s https://api.github.com/repos/Manta-Network/Manta/releases/latest | jq -r .tag_name | cut -c 2-) |
| 115 | +
|
| 116 | + # binary |
| 117 | + sudo curl -Lo /usr/local/bin/manta https://github.com/Manta-Network/Manta/releases/download/v${manta_version}/manta |
| 118 | + sudo ln -srf /usr/local/bin/manta /usr/local/bin/manta |
| 119 | +
|
| 120 | + # chainspecs |
| 121 | + sudo mkdir -p /usr/share/substrate |
| 122 | + sudo curl -Lo /usr/share/substrate/manta.json https://raw.githubusercontent.com/Manta-Network/Manta/v3.0.9/genesis/manta-genesis.json |
| 123 | + sudo curl -Lo /usr/share/substrate/polkadot.json https://raw.githubusercontent.com/paritytech/polkadot/master/node/service/chain-specs/polkadot.json |
| 124 | +
|
| 125 | + # systemd unit file |
| 126 | + sudo curl -Lo /etc/systemd/system/manta.service https://raw.githubusercontent.com/Manta-Network/Manta/deb-rpm/scripts/package/manta.service |
| 127 | + ``` |
| 128 | + |
| 129 | +- create the manta system account which the systemd service runs under |
| 130 | + |
| 131 | + ```bash |
| 132 | + #!/bin/bash |
| 133 | +
|
| 134 | + sudo groupadd --system manta |
| 135 | + sudo useradd \ |
| 136 | + --system \ |
| 137 | + --gid manta \ |
| 138 | + --home-dir /var/lib/substrate \ |
| 139 | + --create-home \ |
| 140 | + --shell /sbin/nologin \ |
| 141 | + --comment 'service account for manta and calamari services' \ |
| 142 | + manta |
| 143 | + ``` |
| 144 | + |
| 145 | +</TabItem> |
| 146 | +</Tabs> |
0 commit comments