# NOIS bots. Instruction

By [Sr20de](https://paragraph.com/@sr20de) · 2023-03-25

---

![](https://storage.googleapis.com/papyrus_images/39bf5b410a05b6bd1db9f2370ca61f451214fd69f1beeb4eafbbd4010a9460d5.webp)

The main criteria in running a fast drand-bot is being able to broadcast your tx as fast as possible in order to reach the proposer’s node asap before the other drand-bots.

This will allow your submission tx to be placed among the first 6 bots in the mempool of the proposer’s node. Obviously you need a good cpu and a fast connection that is very close to an rpc node. Your rpc node needs to be fast in the network and eventually needs to have fast direct peers so it can reach the proposer before the competitor drand-bot operators.

Read more here [https://docs.nois.network/use-cases/for-bot-runners](https://docs.nois.network/use-cases/for-bot-runners)

Links:
------

[Nois Randomness Dashboard](https://randomness.nois.network/) [Site](https://nois.network/) [Docs](https://docs.nois.network/) [Discord](https://discord.gg/rAUR3TPaky) [Twitter](https://twitter.com/NoisNetwork)

Explorers:

[Sr20de Explorer](https://explorer.sr20de.xyz/nois-testnet-3) [Nodes.Guru](https://nois.explorers.guru/) [NodeStake](https://explorer.nodestake.top/nois-testnet)

Official Docs:

*   Run with Docker — [https://docs.nois.network/use-cases/for-bot-runners](https://docs.nois.network/use-cases/for-bot-runners)
    
*   Run with NodeJs [https://github.com/noislabs/nois-bot/blob/main/RUN\_ON\_SERVER.md](https://github.com/noislabs/nois-bot/blob/main/RUN_ON_SERVER.md)
    

I’ll show you how to run a bot using NodeJs.

Requirements
------------

The bot will run on a simple configuration 2/2/10. The main requirement is that your hosting must have a **very fast internet**, as the bot that sends the transaction first wins.

Installation
------------

Get a nois wallet and save the mnemonic from it, as we will need it later. After that, go to Discord and request tokens from Faucet. They are needed to pay commissions.

Update:

    sudo apt update && sudo apt upgrade -y
    

Install NodeJs and required packages:

    sudo apt install -y git htop joe jq \
      && wget -O nodejs.deb https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.17.1-deb-1nodesource1_amd64.deb \
      && sudo dpkg -i nodejs.deb \
      && sudo npm install pm2 -g
    

Installing the bot:

    git clone https://github.com/noislabs/nois-bot.git \
      && cd nois-bot \
      && npm install
    

Renaming env file:

    cp .env.example .env
    

The .env — file is the bot’s settings file. Open it in Mobaxtern editor or Nano to make changes:

![](https://storage.googleapis.com/papyrus_images/b69dc78f56a4f16f4e2b07cd67866a28cf7f90d56acbd67b595b40f7ce22a4df.webp)

*   **Mnemonic** — insert the mnemonic of your wallet
    
*   **ENDPOINT, ENDPOINT2, ENDPOINT3** —insert RPC servers here. You can leave 1, you can enter all 3 and the bot will automatically send transactions through the fastest RPC of these three. You can enter here both RPC of your node and others.
    
*   \*\*Moniker \*\*—name of your bot, which will be displayed in [https://randomness.nois.network](https://randomness.nois.network/)
    

Save the .env file and run the bot:

    pm2 start index.js && pm2 logs --lines 100
    

In the logs bot will show your address and group:

![](https://storage.googleapis.com/papyrus_images/f6fd8de6476627b11241b7b212d3ccc000a1e37d5e023d2ce9d92744db04e8e1.webp)

In the Discord in the drang-bots channel, write the address and group so that the admin will add yours to the white list. Until this happens, you will appear grayed out on [https://randomness.nois.network](https://randomness.nois.network/) and will not be able to claim the reward.

Useful Commands:
----------------

    cd $HOME/nois-bot && pm2 logs --lines 100
    
    #show logs
    pm2 logs --lines 100
    
    #restart
    pm2 restart index
    
    #restart and show logs
    pm2 restart index && pm2 logs --lines 100
    
    #stop bot
    pm2 stop index

---

*Originally published on [Sr20de](https://paragraph.com/@sr20de/nois-bots-instruction)*
