> For the complete documentation index, see [llms.txt](https://orakuru.gitbook.io/crystal-ball/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://orakuru.gitbook.io/crystal-ball/running-the-node/installing-orakuru-node.md).

# Installing Orakuru node

Guide on how to install Orakuru node and prepare it for providing data

### Requirements

Make sure that you have Docker installed. If you don't, you can follow [these instructions](https://docs.docker.com/get-docker/). If you want to run Orakuru node natively, please follow [building Orakuru node from sources](/crystal-ball/advanced-guides/building-orakuru-node-from-source.md).

### Step 1: Download latest Orakuru image

You can download Orakuru image using the following command:

```
$ docker pull ghcr.io/orakurudata/crystal-ball:v0.2.6
```

Latest version is v0.2.6 at the time or writing this guide, you can check the latest version [here](https://github.com/orgs/orakurudata/packages/container/package/crystal-ball).

### Step 2: Prepare your configuration

You'll need to create a directory that will contain Orakuru node configuration somewhere on your server. For the purposes of this guide, we'll create it in the home directory:

```
$ mkdir -p ~/.orakuru
```

Afterwards, you'll need to create [`web3.yml`](/crystal-ball/configuration/web3-configuration.md) and [`requests.yml`](/crystal-ball/configuration/requests-configuration.md) in this directory. You can download example files using:

```
$ wget https://raw.githubusercontent.com/orakurudata/crystal-ball/main/etc/web3.yml -O ~/.orakuru/web3.yml
$ wget https://raw.githubusercontent.com/orakurudata/crystal-ball/main/etc/requests.yml -O ~/.orakuru/requests.yml
```

After you download example files, you'll need to edit them accordingly. `web3.yml` needs to contain an websocket web3 endpoint URL and a testnet private key that was whitelisted for the event. Make sure to restrict access to this file to only your user using:

```
$ chmod 600 ~/.orakuru/web3.yml
```

As for `requests.yml`, the default configuration is just fine, but if you want to restrict access to specific domains, you can update it accordingly.

### Step 3: Starting the node

After you've prepared your configuration, you're ready to start your node. This can be done using:

```
$ docker run -v $HOME/.orakuru/:/orakuru/etc -d \
             -e CB_LOG_LEVEL=trace \
             --name "crystal-ball" \
             --restart on-failure:5 \
             -p 9000:9000 \
             --network host \
             ghcr.io/orakurudata/crystal-ball:v0.2.6
```

{% hint style="info" %}
`-v $HOME/.orakuru/:/orakuru/etc` - mount our configuration directory inside the container. Replace `$HOME/.orakuru` with the path to your directory, if it wasn't created by the guide.

`-e CB_LOG_LEVEL` - enable the most amount of logs. Useful for debugging

`--name "crystal-ball"` - tag the container with `crystal-ball` name

`--restart on-failure:5` - automatically restart container 5 times in case of a crash

`-p 9000:9000` - port forward metrics from the container to the host. This will make Prometheus monitoring available from the internet. If you have Prometheus running locally, change this to `-p 127.0.0.1:9000:9000`

`--network host` - allow container to communicate with services running outside of containers
{% endhint %}

You can add additional options as [environment variables](/crystal-ball/configuration/environment-variables.md). Also, you can only allow access to monitoring from localhost by changing `-p 9000:9000` to `-p 127.0.0.1:9000:9000`, though beware, that running Prometheus on the same machine is not perfect.
