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:
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.json
Create a System Account for this key by funding the address with at least 0.1 ◎ SOL.
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.
{
"libpath": "/home/sol/clockwork-geyser-plugin-release/lib/libclockwork_plugin.so",
"keypath": "/home/sol/clockwork-worker-keypair.json",
"rpc_url": "http://127.0.0.1:8899",
"transaction_timeout_threshold": 150,
"thread_count": 10,
"worker_id": 👈 Set this to your worker ID!
}
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):