> For the complete documentation index, see [llms.txt](https://docs.sourceprotocol.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sourceprotocol.io/smart-contracts-and-sourced-development/sourced-local-dev-setup.md).

# Sourced Local Dev Setup

{% hint style="info" %}
These settings are only for development use of Source Chain on a local machine.
{% endhint %}

Want to use `sourced` locally for development, or to work with smart contracts? You're in the right place. To get started with smart contract development, we recommend running on a laptop until you are ready to deploy to a public testnet.

## Local Source Chain set up with Ignite CLI

### Install Pre-requisites

#### Install Go

Follow the instructions [here](https://golang.org/doc/install) to install Go.

For an Ubuntu LTS, you can probably use:

```bash
ver="1.19" && \
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" && \
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \
rm "go$ver.linux-amd64.tar.gz" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version
```

Please install Go v1.19 or later.

#### Install Ignite Cli

Follow the instructions [here](https://docs.ignite.com/guide/install) to install Ignite CLI. (Ignite CLI can also be used in an online Gitpod container [here](https://gitpod.io/#https://github.com/tendermint/starport/tree/master))

```
sudo curl https://get.ignite.com/cli! | sudo bash
```

#### Clone Source Chain Repo

```
git clone https://github.com/Source-Protocol-Cosmos/source.git
```

#### Compile sourced binary and start the local chain

```
cd ~/source
git fetch
git checkout v3.0.0
ignite chain serve
```

Your local chain should now be running in development mode with two funded genesis accounts and a single validator for testing purposes.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sourceprotocol.io/smart-contracts-and-sourced-development/sourced-local-dev-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
