This repository contains a Kurtosis module for setting up a NEAR network locally on your machine using Kurtosis. It is published to Dockerhub here.
These quickstart instructions will do the following:
- Start a local NEAR cluster, running in Kurtosis, complete with Wallet, Explorer, indexer, etc.
NOTE: If you're viewing these instructions on Github, all code blocks can be copied by hovering over the block and clicking the clipboard that appears in the top-right corner
- Make sure Docker is running with at least 4GB of memory:
- If you don't already have Docker installed, do so using this link
- Open the "Docker Desktop" program (which will start your Docker engine if it's not running already)
- Give Docker >= 4GB of memory:
- Click the gear icon in the top-right of Docker Desktop
- Select the "Resources" tab from the left-hand menu
- Give Docker at least 4GB of memory
- Select "Apply & Restart"
- Wait until the whale icon in the bottom-left corner is green once more
- Visit this link to install the Kurtosis CLI (or upgrade it to latest if it's already installed)
- Download this script to somewhere on your local machine
- Execute the script
- Follow the instructions printed
The cluster you started will continue to run on your local machine for as long as your Docker engine is running (which, in most cases, is for as long as you don't restart your computer). The cluster runs inside of a Kurtosis "enclave", an environment isolated from both your computer and other enclaves; in practice, this means that you can have multiple independent local NEAR clusters running on your machine simply be rerunning the kurtosis module exec
command from the start of this guide.
To see the status of your existing enclaves, run:
```
kurtosis enclave ls
```
To see detailed information about an enclave, copy an enclave ID and run:
```
kurtosis enclave inspect THE_ENCLAVE_ID
```
To shut down your cluster to free up resources on your machine, run the following (NOTE: You will not be able to restart the cluster! If this is something you need, please file an issue here so we can prioritize it):
```
kurtosis enclave stop THE_ENCLAVE_ID
```
Stopping an enclave leaves its resources intact so that you can examine them if need be. To destroy a stopped enclave and free its resources, run:
```
kurtosis clean
```
If you would like to destroy all enclaves, regardless of if they're running, pass the -a
flag to clean
like so:
```
kurtosis clean -a
```
This can be a handy way to clear all your Kurtosis data.
Use the values outputted during cluster launch (e.g. nearNodeRpcUrl
, walletUrl
, etc.) to fill the configuration values of your dApp.