Skip to main content

Quickstart — Testnet in 5 Steps

Get your first Stacks dApp deployed to testnet in minutes. No Docker needed — contracts run on Hiro’s testnet infrastructure.

1 — Install Scaffold Stacks

Install the CLI from Crates.io:
cargo install stacksdapp
stacksdapp --version
Or build from source:
git clone https://github.com/scaffold-stack/scaffold-stack.git
cd scaffold-stack
cargo install --path cli

2 — Scaffold a new project

Create your dApp project:
stacksdapp new my-app
cd my-app
This generates a complete project with:
  • Clarinet configuration for contracts
  • Next.js frontend with wallet integration
  • Pre-configured settings for testnet/mainnet/devnet

3 — Get testnet STX

Get testnet tokens from the Hiro faucet:
  1. Go to https://explorer.hiro.so/sandbox/faucet?chain=testnet
  2. Add your deployer mnemonic to contracts/settings/Testnet.toml:
[accounts.deployer]
mnemonic = "your 24 words here"

4 — Deploy to testnet

Deploy your contracts:
stacksdapp deploy --network testnet
Preview first without broadcasting:
stacksdapp deploy --network testnet --dry-run
This will:
  • Generate a deployment plan
  • Deploy to testnet
  • Update frontend/src/generated/deployments.json with contract addresses
Deploy a single contract when iterating:
stacksdapp deploy --network testnet --contract counter

5 — Start the frontend

Launch the development server:
stacksdapp dev --network testnet
Opens http://localhost:3000 with your wallet connected to testnet. The Debug Contracts panel shows every function in your contracts with typed inputs ready to call.

Connect your wallet

Click Connect Wallet and connect Leather or Xverse set to Testnet. Every public function opens a wallet popup to sign and broadcast. Every read-only function calls the node directly — no wallet needed.
Congratulations! You now have a live Stacks dApp on testnet. Explore the debug UI to interact with your contracts.

Next steps

Edit contracts

Modify your Clarity contracts and see live updates.

Add new contracts

Create additional contracts with templates.

Run tests

Test your contracts and frontend.

Deploy to mainnet

Launch your dApp on mainnet.