Skip to main content

Quick Start (5 min)

Welcome to the Nervos CKB ecosystem! This guide will help you set up your local development environment in just a few minutes. After that, you can explore the various paths to build on CKB.

Start Your Local Devnet

We recommend using offCKB to quickly set up a local CKB Devnet for development.

This setup is useful when you want to build a dApp or deploy and test a Script on a local chain. If you only want to learn CKB concepts, develop a Script with local testing tools, or run a Mainnet or Testnet node, you can skip to Choose Your Path.

Install OffCKB

OffCKB requires Node.js 20 or later. Check your installed version:

node -v

If the version is below v20.0.0, install a current Node.js LTS release before continuing.

npm install -g @offckb/cli
info

Throughout this documentation, we use offckb/cli version >=0.4.0. You can always run the above command to update to the latest version.

Start the Devnet

offckb node

Your local CKB blockchain is now running. Use the proxy RPC endpoint at http://127.0.0.1:28114 as the default for local development. It forwards requests to the node and records failed transactions for debugging. The direct RPC endpoint at http://127.0.0.1:8114 bypasses the debugging proxy.

Keep this terminal open while you use the Devnet, and open a second terminal for the commands you run next. To stop the chain, press CTRL+C. To resume where you left off, run offckb node again.

note

This Devnet runs only on your computer. Its transactions will not appear in public Testnet or Mainnet explorers.

View Pre-funded Accounts

In the second terminal, list the pre-funded Devnet accounts:

offckb accounts

OffCKB also provides built-in Scripts like Omnilock and Spore-contract, and useful debugging tools. Check out the OffCKB documentation for more details.

Reset the Devnet

If you need to start fresh with a new chain, first stop the running node by pressing CTRL+C. Then run:

offckb clean
caution

Cleaning the Devnet creates a new local chain. Transaction hashes and deployed Script OutPoints from the previous chain will no longer be valid.


Choose Your Path

Choose the path that matches what you want to do on CKB:

🚀 Build a DApp

Learn how to build decentralized applications that interact with the CKB blockchain:

🔐 Write Smart Contracts (Scripts)

CKB supports several languages for writing on-chain smart contracts (Scripts), but Rust is currently recommended for production use because of its performance, memory safety, and mature tooling.

Unlike an EVM contract, a deployed CKB Script does not have a contract address. Its code is stored in a Cell and identified by an OutPoint; transactions include that reference in a CellDep. See Deploy a CKB Smart Contract for details.

Get started with:

📚 Learn Core Concepts

Deep dive into CKB's unique architecture:

  • How CKB Works — Understand CKB's design philosophy
  • Cell Model — Learn about CKB's UTXO-like data model
  • CKB-VM — Explore the RISC-V based virtual machine

🖥️ Run a CKB Node

  • Run a Node — Operate a persistent CKB Mainnet or Testnet node

Additional Resources

  • OffCKB CLI — Full documentation for the OffCKB tool
  • CCC SDK — CKB's official JavaScript/TypeScript SDK for building dApps
  • CKB CLI — Command-line tool for interacting with CKB nodes

Happy building! 🎉