# Local development network

The local development network consists of following services:

* Local Acala Fork
* Eth Rpc Adapter
* \*Subquery Services
  * Postgres database
  * Subquery node
  * GraphQL engine

## Starting the stack

You can download or copy + paste this [docker compose file](https://github.com/AcalaNetwork/bodhi.js/blob/master/docker-compose.yml), and then

```
docker compose up
```

Once you see logs like this, the local development stack is ready.

```
--------------------------------------------
             🚀 SERVER STARTED 🚀
--------------------------------------------
version         : bodhi.js/eth-rpc-adapter/2.9.4
endpoint url    : ws://node:9944
subquery url    : undefined
server host     : localhost
server port     : 8545
max blockCache  : 200
max batchSize   : 50
max storageSize : 5000
cache capacity  : 1000
safe mode       : false
local mode      : false
http only       : false
verbose         : true
--------------------------------------------
```

This stack contains a local Acala fork, and an eth rpc adapter.

It does not contain a subquery services, since for local testing purpose, we usually do not need subquery services, and if you would like to setup a local subquery service, you can refer to the [subquery docs](https://github.com/AcalaNetwork/bodhi.js/tree/master/packages/evm-subql#run-with-docker).

{% hint style="info" %}
**In order to have a clean start after every shutdown of the node, run the following command after the node was shut down:**

**`docker compose down -v`**
{% endhint %}

## The local development network services

Once the local development network is up and running, the following services are available:

* A local mandala node: <ws://localhost:9944>
* \*A subquery service: <http://localhost:3001>
* An ETH JSON-RPC service:
  * <http://localhost:8545>
  * <ws://localhost:8545>
* Local network substrate chain explorer: [Polkadot.js App](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2Flocalhost%3A9944%2Fws#/explorer)

You can now setup [Metamask on localhost](/tooling/metamask.md#localhost) and interact with your local setup, or try to deploy or interact with a smart contract.


---

# Agent Instructions: 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://evmdocs.acala.network/network/network-setup/local-development-network.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.
