LogoLogo
GithubDiscordTwitter
  • Welcome
    • What is Clockwork?
    • Quickstart
    • Installation
  • Guides
    • 1. Scheduling an SPL transfer
    • 2. Auto-incrementing counter
  • Reference
    • Threads
      • Account
      • Address
      • Authority
      • Fees
      • Payers
      • Triggers
    • Localnet
    • SDK
    • Support
  • Node operators
    • Deploy a worker
Powered by GitBook
On this page
  • Run a local Clockwork node
  • Deploy your program
  • Stream logs

Was this helpful?

Edit on GitHub
  1. Reference

Localnet

PreviousTriggersNextSDK

Last updated 1 year ago

Was this helpful?

Run a local Clockwork node

To deploy Clockwork on your machine for local development, you must first . When this is done, you can launch a local Clockwork instance with the following command:

clockwork localnet

Deploy your program

To deploy your own programs to the localnet, you can use either the Anchor CLI, Clockwork CLI, or Solana CLI. As a shortcut, the Clockwork CLI provides a --bpf-program flag for deploying the localnet with a pre-built program binary.

anchor deploy
clockwork localnet \
    --bpf-program <ADDRESS_OR_KEYPAIR> <PROGRAM_FILEPATH>
solana program deploy \ 
    --program-id <ADDRESS_OR_KEYPAIR> <PROGRAM_FILEPATH>

The Clockwork localnet additionally works out of the box with your Anchor tests. To run Anchor tests with the localnet, use the following command:

anchor test --skip-local-validator

Stream logs

To stream logs from your localnet, you can use the Solana CLI.

solana logs --url l
install the CLI