# Quickstart

## System Requirements

Required Free Space: 20 GB\
**RAM**: 8GB Minimum,16 GB Minimum for Windows Setup.\
**CPU:** 8 Core CPU Minimum, 16 Core CPU Recommended\
**OS:** Linux (Ubuntu Preferred) Version: 20.04 and Above\
&#x20;      Mac(Apple Silicon or Intel) Version: Big Sur and Above\
&#x20;      Windows(Requires [WSL](https://learn.microsoft.com/en-us/windows/wsl/install)[2](https://learn.microsoft.com/en-us/windows/wsl/about) ) Version: Windows 11 or 10 version 2004 and above.

**Note: Before proceeding further with the guide, setting up Windows Subsystem LInux(WSL) on Windows requires additional steps which can be found**[ **here.**](https://docs-old.zus.network/guides/setup-a-blockchain/additional-tips-and-troubleshooting-for-mac)

## Prerequisites

### Docker

Docker is available for Linux, macOS and Windows platforms. Find instructions for the preferred operating system [here](https://docs.docker.com/engine/install/#supported-platforms).\
\
**Note:** Docker Desktop for Windows provides WSL 2 backend support so you can work in a Linux-based development environment and build ,run linux-based containers. Enable that by following the instructions [here ](https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers#install-docker-desktop)before proceeding further.

### Go

Go installation instructions for different operating systems can be found [here .](https://go.dev/doc/install)

## Download the Script&#x20;

{% file src="<https://979598987-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNrAZJ0KGiwEbKkbVRYPu%2Fuploads%2FrRqXdAZWGWR4Mx3FrZ3N%2Fdeployment.sh?alt=media&token=04b440c6-18ad-4235-8de6-9715dfebed43>" %}

## Deployment Process

1. **Create a New Directory:** Start by creating a dedicated folder to store your deployment script.

```
mkdir chaindeploy
```

2. **Open Terminal and Set Execution Permissions:** Grant execute permissions to the deployment script using the following command:

```shell
chmod +x deployment.sh
```

3. **Initiate Deployment:** Run the deployment script using the command:

```shell
./deployment.sh
```

4. **Configure for Local or Server:** The script will prompt you to specify whether you are deploying for a local environment or a server. Choose the option that aligns with your intended deployment scenario.

```
ubuntu@Züs:~/chaindeploy$ ./deployment.sh
+ echo 'Choose deployment option:'
Choose deployment option:
+ echo '1. Local'
1. Local
+ echo '2. Server'
2. Server
+ read -p 'Enter your choice (1/2): ' choice
Enter your choice (1/2): 1
```

4. **Directory Creation:** The script will create a dedicated directory named 'zus-repos' and proceed to clone all the required repositories inside this folder.
5. **Local Deployment Configuration:** If you opt for local deployment, the script will make specific configuration changes to the DNS settings in the configuration file([config.yaml](https://github.com/0chain/zboxcli/blob/staging/network/config.yaml)) created at `$HOME/.zcn` directory path. For blockchain network to work seamlessly in a local  environment, the block worker URL in config.yaml is set to `http://198.18.0.98:9091/dns` automatically.
6. **Note:** During the deployment the script at **Building Mocks in Progress** stage will take 5-10 mins(depending on internet connection). Let that complete and not terminate the process in between until **Mocks Build completed** is displayed. See code snippet for reference:

```
+ echo 'Build-Mocks in progress'
Build-Mocks in progress
+ make build-mocks
+ echo ' Build-Mocks completed'
 Build-Mocks completed
```

7. **Deployment Success:** Upon successful execution of the script, you will have the following Züs components as docker containers deployed on your local machine:

* 2 Sharders that stores the blockchain and other related data, such as the event database. They also support a query REST API.
* 3 Miners for producing blocks.
* 6 Blobbers/Validators for storing user data files .
* 1 0dns for communication between miner sharder and blobbers.

8. Follow [Step 7 to check whether containers are running properly.](https://docs-old.zus.network/guides/setup-a-blockchain/step-7-validate-0chain-deployment)
9. Follow[ Step 8 from here](https://docs-old.zus.network/guides/setup-a-blockchain/step-8-creating-an-allocation-on-blobber) to create an allocation on local Züs blockchain network and complete the deployment process.
10. To understand  the working of the deployment script, please refer to the "[Understanding the Tech](https://docs-old.zus.network/guides/setup-a-blockchain/step-1-set-up-the-project/understand-the-script)" section.
11. Facing any errors? Try [Redeploying the network](#redeploying-the-network).

## Redeploying the network

To rebuild and restart the sharders miners and blobber containers with no previous file and processes:

Stop all the running containers using the command below.

```
docker stop $(docker ps -a -q)
```

Clean up Docker environment for new Züs deployment .

```
docker system prune -a 
```

Delete the created zus-repos directory by the script manually.

<pre><code><strong>sudo rm -r zus-repos
</strong></code></pre>

Rerun the deployment script

```
./deployment.sh
```
