Local devnet setup
This guide covers how to set up a local devnet with both consensus and bridge nodes for development and testing purposes. A local devnet allows you to run a complete Celestia network environment on your local machine.
Prerequisites
- Install celestia-app
- Install celestia-node
- Install Docker and Docker Compose (for Docker setup)
Script-based setup
Single consensus node
To start a local consensus node using the provided script:
Clone and build celestia-app:
bashgit clone https://github.com/celestiaorg/celestia-app.git cd celestia-app make install
git clone https://github.com/celestiaorg/celestia-app.git cd celestia-app make install
Run the single node script:
bash./scripts/single-node.sh
./scripts/single-node.sh
This script will:
- Initialize a new chain with a single validator
- Create a genesis file with pre-funded accounts
- Start the consensus node
- Make RPC endpoints available at
localhost:26657
Single consensus node + bridge node
To set up both a consensus node and a bridge node together:
Follow the consensus node setup above
In a new terminal, run the bridge node script:
bash./scripts/single-bridge-node.sh
./scripts/single-bridge-node.sh
This will:
- Start a bridge node that connects to your local consensus node
- Enable data availability sampling
- Make the bridge node API available at
localhost:26658
Docker setup
For a containerized setup using Docker Compose, you can use a simplified configuration based on the Celestia ZKEVM IBC demo repository.
Create a
docker-compose.yml
file with the following content:yamlversion: "3.8" services: celestia-validator: image: ghcr.io/celestiaorg/celestia-app:latest container_name: celestia-validator volumes: - celestia_validator_data:/home/celestia ports: - "9090:9090" - "26656:26656" - "26657:26657" command: | sh -c " celestia-appd init mynode --chain-id private && celestia-appd start " networks: - celestia-network celestia-bridge: image: ghcr.io/celestiaorg/celestia-node:latest container_name: celestia-bridge environment: - P2P_NETWORK=private volumes: - celestia_bridge_data:/home/celestia ports: - "26658:26658" command: > celestia bridge start --p2p.network private --core.ip celestia-validator --rpc.addr 0.0.0.0 --rpc.port 26658 depends_on: - celestia-validator networks: - celestia-network volumes: celestia_validator_data: celestia_bridge_data: networks: celestia-network: driver: bridge
version: "3.8" services: celestia-validator: image: ghcr.io/celestiaorg/celestia-app:latest container_name: celestia-validator volumes: - celestia_validator_data:/home/celestia ports: - "9090:9090" - "26656:26656" - "26657:26657" command: | sh -c " celestia-appd init mynode --chain-id private && celestia-appd start " networks: - celestia-network celestia-bridge: image: ghcr.io/celestiaorg/celestia-node:latest container_name: celestia-bridge environment: - P2P_NETWORK=private volumes: - celestia_bridge_data:/home/celestia ports: - "26658:26658" command: > celestia bridge start --p2p.network private --core.ip celestia-validator --rpc.addr 0.0.0.0 --rpc.port 26658 depends_on: - celestia-validator networks: - celestia-network volumes: celestia_validator_data: celestia_bridge_data: networks: celestia-network: driver: bridge
Start the services:
bashdocker-compose up -d
docker-compose up -d
Check the status:
bashdocker-compose ps docker-compose logs celestia-validator docker-compose logs celestia-bridge
docker-compose ps docker-compose logs celestia-validator docker-compose logs celestia-bridge
Default endpoints
Once your local devnet is running, you can access these endpoints:
Service | Endpoint |
---|---|
Consensus RPC | http://localhost:26657 |
Consensus gRPC | http://localhost:9090 |
Consensus P2P | http://localhost:26656 |
Bridge node API | http://localhost:26658 |
Testing your setup
You can test that your local devnet is working by:
Checking node status:
bashcurl http://localhost:26657/status
curl http://localhost:26657/status
Querying the latest block:
bashcurl http://localhost:26657/block
curl http://localhost:26657/block
For bridge nodes, check the DA network info:
bashcurl http://localhost:26658/head
curl http://localhost:26658/head
Stopping the devnet
Stopping script-based setup
Stop the processes with Ctrl+C
in each terminal.
Stopping Docker setup
docker-compose down
docker-compose down
To also remove the volumes:
docker-compose down -v
docker-compose down -v
Next steps
With your local devnet running, you can:
- Submit blob data
- Test rollup integrations
- Develop applications using the Celestia Node API
- Practice validator operations without risking real tokens