> For the complete documentation index, see [llms.txt](https://no-one.gitbook.io/n1pc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://no-one.gitbook.io/n1pc/create-a-n1pc-node.md).

# Create a N1PC node

## Prerequisites

* A server or local machine with a recent version of Linux (Ubuntu 20.04 LTS recommended).
* A user with sudo privileges.
* Basic knowledge of terminal and command line.

## **Install git**

First, ensure Git is installed on your system to clone the N1PC repository:

```bash
sudo apt-get update
sudo apt-get install git
```

## **Setup firewall**

Configure your firewall to secure the node:

```bash
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow 26656/tcp
sudo ufw allow 26660/tcp
sudo ufw allow 26657/tcp
sudo ufw allow 9090/tcp
sudo ufw allow 1317/tcp
sudo ufw enable
```

## **Clone n1pc repository**

Clone the repository to obtain the necessary files:

```bash
git clone  https://github.com/noone-dev-1/n1pc.git
```

## **Initialize the Node**

Navigate to the N1PC directory and initialize your node with a unique name and the network's chain ID:

```bash
cd n1pc
tar -xzvf linux-amd64.tar.gz
chmod +x n1pcd
./n1pcd init your-node-name --chain-id n1pc
```

Running the init command will create a `~/.n1pc` folder with config files. In the next steps, we will configure our node so it can connect to other nodes.

### **Make n1pcd Executable System-wide**

To ensure `n1pcd` can be run from anywhere:

```bash
nano ~/.bashrc
```

Add the following line at the end of the file:

```bash
export PATH=$PATH:<path-to-n1pc-folder-from-step-3>
```

Save and exit, then apply the changes:

```bash
source ~/.bashrc
```

## **Configure node**

Adjust the node's configuration to connect to the network:

```bash
cd ~/.n1pc/config
nano config.toml
```

```toml
# Modify the following
[p2p]
external_address = "<your-ip-address>:26656"

persistent_peers = "d81ba83695a4704c6f9333e38a693e1543b0dc40@n1pc.no-one.io:26656"
```

```bash
nano app.toml
```

```toml
# modify the following
minimum-gas-prices = "0.25noone,0.0001stake"
```

**Copy the Genesis file**

Ensure the node is configured with the correct genesis file:

```bash
cd ~/.n1pc/config

cp <path-to-n1pc-folder>/genesis.json .
```

## **Run the Node**

Start your node to begin syncing with the network:

```bash
n1pcd start
```

Once you start the node, it will begin syncing with other nodes. It takes some time to sync all blocks.
