Deploy a worker
1. Download the geyser plugin
To turn your Solana validator or RPC into a Clockwork worker, you simply need to install the Clockwork geyser plugin. You can get the binary either by building from source or installing the pre-built binary:
curl -s https://api.github.com/repos/clockwork-xyz/clockwork/releases/latest | grep "clockwork-geyser-plugin-release-x86_64-unknown-linux-gnu.tar" | cut -d : -f 2,3 | tr -d \" | wget -qi -
tar -xjvf clockwork-geyser-plugin-release-x86_64-unknown-linux-gnu.tar.bz2
rm clockwork-geyser-plugin-release-x86_64-unknown-linux-gnu.tar.bz22. Create a keypair
Next, create a new keypair for signing Clockwork txs. Load this keypair with a small amount of SOL (~0.01 โ). You will be compensated for lamports spent by the transactions your worker automates.
solana-keygen new -o clockwork-worker-keypair.jsonCreate a System Account for this key by funding the address with at least 0.1 โ SOL.
solana balance $(solana address -k clockwork-worker-keypair.json)3. Get a worker ID
Register your worker and get a worker ID:
clockwork worker create clockwork-worker-keypair.json4. Configure your node
Then, setup the plugin config file in a folder where your validator startup script can reference it. Note, the libpath and keypath values should point to the binary and keypair mentioned in the steps above.
5. Restart your validator
Finally, add an additional line to your startup script to run your validator with the Clockwork plugin (often located at /home/sol/bin/validator.sh):
Now simply restart your validator however you normally would!
Last updated
Was this helpful?

