Quick Start (5min)
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.
Install OffCKB
npm install -g @offckb/cli
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
- Command
- Response
offckb node
Launching CKB devnet Node...
CKB devnet RPC Proxy server running on http://127.0.0.1:28114
Your local CKB blockchain is currently active with a proxy RPC endpoint at localhost:28114. To stop the chain, press CTRL+C in the terminal. To resume where you left off, simply run offckb node again.
If you need to start fresh with a new chain, run the following command before starting the node:
- Command
- Response
offckb clean
Chain data cleaned.
OffCKB also provides pre-funded test accounts, built-in Scripts like Omnilock and Spore-contract, and useful debugging tools. Check out the OffCKB documentation for more details.
Choose Your Path
Now that your Devnet is running, choose your path to start building on CKB:
🚀 Build a DApp
Learn how to build decentralized applications that interact with the CKB blockchain:
- View and Transfer CKB — Learn how CKB balance transfers work and build your first dApp (2-5 min)
- Store Data on Cell — Store arbitrary data on the CKB blockchain (2-5 min)
- Create a Fungible Token — Issue your own custom tokens using the xUDT standard (5-10 min)
- Create a Digital Object (DOB) — Build on-chain digital assets using the Spore Protocol (5-10 min)
🔐 Write Smart Contracts (Scripts)
CKB uses Rust as the primary language for writing on-chain smart contracts (Scripts). Get started with:
- Rust Quick Start — Set up your Rust environment and write your first Script (5-15 min)
- Script Basics — Understand how Scripts work on CKB
- Program Languages for Script — Explore available programming languages for Script development
While CKB supports multiple programming languages for Script development, we currently recommend Rust for production use due to its performance, memory safety, and mature tooling support.
📚 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
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
Next Steps
Ready to dive deeper? Here are some recommendations based on your interests:
| If you want to... | Start with... |
|---|---|
| Build a web frontend that interacts with CKB | Transfer CKB Tutorial |
| Issue tokens or NFTs | Create a Fungible Token or Create a DOB |
| Write on-chain smart contracts | Rust Quick Start |
| Understand CKB's unique features | How CKB Works |
| Run a CKB node | Run a Node |
Happy building! 🎉