https://forum.friktion.fi/t/more-keepers-for-entropy/73
Create a new Compute Engine instance
- Series: N1
- Machine Type: f1-micro
- Change Boot Disk to Ubuntu 20.04 LTS
We'll run all these commands as a super user
sudo su
eval "$(ssh-agent -s)"
ssh-keygen -t rsa
ssh-add
ssh-add -l -E sha256
Follow this guide to add your SSH key to Github https://docs.github.com/en/authentication/troubleshooting-ssh/error-permission-denied-publickey#verify-the-public-key-is-attached-to-your-account
On step 6, you can easily get your key by running:
tail /root/.ssh/id_rsa.pub
apt update
apt remove cmdtest
apt remove yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt-get update && apt-get install yarn
apt install node-typescript
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install node
npm install -g ts-node
cd /home/ubuntu
git clone git@github.com:Friktion-Labs/entropy-client.git
cd /home/ubuntu/entropy-client
yarn
cd /home/ubuntu
https://docs.solana.com/cli/install-solana-cli-tools
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
export PATH="/root/.local/share/solana/install/active_release/bin:$PATH"
solana --version
Ensure a SOL funded private keypair is in this file location:
solana-keygen recover 'prompt:?key=0/0' --outfile ~/.config/solana/entropy-mainnet-authority.json
You'll want it running in the background on boot
nano /usr/local/bin/keeper.sh
Paste:
#!/bin/bash
echo "running keeper"
cd /home/ubuntu/entropy-client
yarn keeper
nano /etc/systemd/system/keeper.service
Paste:
[Unit]
Description=keeper
After=network.target
StartLimitIntervalSec=20
[Service]
Type=simple
Restart=always
RestartSec=1
User=root
ExecStart=/usr/local/bin/keeper.sh
[Install]
WantedBy=multi-user.target
chmod 744 /usr/local/bin/keeper.sh
chmod 644 /etc/systemd/system/keeper.service
systemctl enable keeper.service
reboot
sudo journalctl -u keeper.service -f
If you are seeing an error like
Error: 403 Forbidden: {"jsonrpc":"2.0","error":{"code": 403, "message":"Access forbidden, contact your app develo
per or support@rpcpool.com."}, "id": "02c4ab56-0e92-41bc-a1b0-c7db054e7aa2" }```
You need to update your RPC endpoint by doing the following:
sudo nano /home/ubuntu/entropy-client/src/ids.json
Then update cluster_urls.mainnet to:
"mainnet": "https://friktion.rpcpool.com/8236ce58a8cc909af597734efe5f",