Set Up the Polkadot SDK Parachain Template
Introduction
Section titled “Introduction”The Polkadot SDK includes several templates designed to help you quickly start building your own blockchain. Each template offers a different level of configuration, from minimal setups to feature-rich environments, allowing you to choose the foundation that best fits your project's needs.
Among these, the Parachain Template provides a preconfigured runtime with commonly used pallets, making it an ideal starting point for most parachain development projects.
This guide walks you through the full process of working with this template. You will:
- Set up the Polkadot SDK Parachain Template.
- Understand the project structure and key components.
- Verify your template is ready for development.
- Run the parachain template locally in development mode.
By the end of this guide, you'll have a working template ready to customize and deploy as a parachain.
Prerequisites
Section titled “Prerequisites”Before getting started, ensure you have done the following:
- Completed the Install Polkadot SDK guide and successfully installed Rust and the required packages to set up your development environment.
For this tutorial series, you need to use Rust 1.88. Newer versions of the compiler may not work with this parachain template version.
Run the following commands to set up the correct Rust version:
rustup install 1.88rustup default 1.88rustup target add wasm32-unknown-unknown --toolchain 1.88-aarch64-apple-darwinrustup component add rust-src --toolchain 1.88-aarch64-apple-darwinrustup toolchain install 1.88.0rustup default 1.88.0rustup target add wasm32-unknown-unknown --toolchain 1.88.0rustup component add rust-src --toolchain 1.88.0Polkadot SDK Utility Tools
Section titled “Polkadot SDK Utility Tools”This tutorial requires two essential tools:
- Chain spec builder - a Polkadot SDK utility for generating chain specifications. Refer to the Generate Chain Specs documentation for detailed usage
- Polkadot Omni Node - a white-labeled binary, released as a part of Polkadot SDK, that can act as the collator of a parachain in production, with all the related auxiliary functionalities that a normal collator node has: RPC server, archiving state, etc. It can also run the Wasm blob of the parachain locally for testing and development
Download the pre-built binaries from the Polkadot SDK release (recommended):
curl -L -o chain-spec-builder https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2512-2/chain-spec-builder-aarch64-apple-darwincurl -L -o polkadot-omni-node https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2512-2/polkadot-omni-node-aarch64-apple-darwinchmod +x chain-spec-builder polkadot-omni-nodesudo mv chain-spec-builder polkadot-omni-node /usr/local/bin/curl -L -o chain-spec-builder https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2512-2/chain-spec-buildercurl -L -o polkadot-omni-node https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2512-2/polkadot-omni-nodechmod +x chain-spec-builder polkadot-omni-nodesudo mv chain-spec-builder polkadot-omni-node /usr/local/bin/Alternatively, you can install from source using cargo:
cargo install --locked staging-chain-spec-builder@16.0.0cargo install --locked polkadot-omni-node@0.13.2Clone the Template
Section titled “Clone the Template”The Polkadot SDK Parachain Template provides a ready-to-use development environment for building with the Polkadot SDK. Follow these steps to set up the template:
-
Clone the template repository:
Terminal window git clone https://github.com/paritytech/polkadot-sdk-parachain-template.git parachain-template -
Navigate into the project directory:
Terminal window cd parachain-template
Explore the Project Structure
Section titled “Explore the Project Structure”Before building the template, take a moment to familiarize yourself with its structure. Understanding this organization will help you navigate the codebase as you develop your parachain.
The template follows a standard Polkadot SDK project layout:
parachain-template/├── node/ # Node implementation and client├── pallets/ # Custom pallets for your parachain├── runtime/ # Runtime configuration and logic├── Cargo.toml # Workspace configuration└── README.md # DocumentationKey directories explained:
- runtime/: Contains your parachain's state transition function and pallet configuration. This is where you'll define what your blockchain can do.
- node/: Houses the client implementation that runs your blockchain, handles networking, and manages the database.
- pallets/: Where you'll create custom business logic modules (pallets) for your specific use case.
- Cargo.toml: The workspace configuration that ties all components together.
Compile the Runtime
Section titled “Compile the Runtime”Now that you understand the template structure, let's compile the runtime to ensure everything is working correctly.
-
Compile the runtime:
Terminal window cargo build --release --locked -
Upon successful compilation, you should see output indicating the build was successful. The compiled runtime will be located at:
./target/release/wbuild/parachain-template-runtime/parachain_template_runtime.compact.compressed.wasm
Verify the Build
Section titled “Verify the Build”After compilation completes, verify that the runtime was created successfully by checking for the Wasm blob:
ls -la ./target/release/wbuild/parachain-template-runtime/You should see the parachain_template_runtime.compact.compressed.wasm file in the output, confirming the build was successful.
Run the Node Locally
Section titled “Run the Node Locally”After successfully compiling your runtime, you can spin up a local chain and produce blocks. This process will start your local parachain using the Polkadot Omni Node and allow you to interact with it. You'll first need to generate a chain specification that defines your network's identity, initial connections, and genesis state, providing the foundational configuration for how your nodes connect and what initial state they agree upon.
Follow these steps to launch your node in development mode:
-
Generate the chain specification file of your parachain:
Terminal window chain-spec-builder create -t development \--relay-chain paseo \--para-id 1000 \--runtime ./target/release/wbuild/parachain-template-runtime/parachain_template_runtime.compact.compressed.wasm \named-preset development -
Start the Omni Node with the generated chain spec. You'll start it in development mode (without a relay chain config), producing and finalizing blocks:
Terminal window polkadot-omni-node --chain ./chain_spec.json --devThe
--devoption does the following:- Deletes all active data (keys, blockchain database, networking information) when stopped.
- Ensures a clean working state each time you restart the node.
-
Verify that your node is running by reviewing the terminal output. You should see log messages indicating block production and finalization.
-
Confirm that your blockchain is producing new blocks by checking if the number after
finalizedis increasing in the output.
The details of the log output will be explored in a later tutorial. For now, knowing that your node is running and producing blocks is sufficient.
Interact with the Node
Section titled “Interact with the Node”When running the template node, it's accessible by default at ws://localhost:9944. To interact with your node using the Polkadot.js Apps interface, follow these steps:
-
Open Polkadot.js Apps in your web browser and click the network icon (which should be the Polkadot logo) in the top left corner:

-
Connect to your local node:
- Scroll to the bottom and select Development.
- Choose Custom.
- Enter
ws://localhost:9944in the custom endpoint input field. - Click the Switch button.

-
Once connected, you should see parachain-template-runtime in the top left corner, with the interface displaying information about your local blockchain.

You are now connected to your local node and can interact with it through the Polkadot.js Apps interface. This tool enables you to explore blocks, execute transactions, and interact with your blockchain's features. For in-depth guidance on using the interface effectively, refer to the Polkadot.js Guides available on the Polkadot Wiki.
Stop the Node
Section titled “Stop the Node”When you're done exploring your local node, you can stop it to remove any state changes you've made. Since you started the node with the --dev option, stopping the node will purge all persistent block data, allowing you to start fresh the next time.
To stop the local node:
- Return to the terminal window where the node output is displayed.
- Press
Control-Cto stop the running process. - Verify that your terminal returns to the prompt in the
parachain-templatedirectory.
Where to Go Next
Section titled “Where to Go Next”-
Deploy to Polkadot
Learn how to deploy your parachain template to a relay chain testnet. Configure your chain specification, register as a parachain, and start producing blocks.