> For the complete documentation index, see [llms.txt](https://skyneticlabs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://skyneticlabs.gitbook.io/docs/services/mainnet-networks/starknet/installation.md).

# Installation

This guide explains how to install and run a Juno full node for Starknet mainnet using Docker. Juno is a high-performance Starknet node implementation developed by Nethermind.

#### **System Requirements**

* **OS:** Ubuntu 22.04 LTS or later
* **CPU:** 4+ cores
* **RAM:** 16 GB minimum (32 GB recommended)
* **Storage:** At least 500 GB SSD
* **Network:** Stable, high-speed connection (1 Gbps preferred)
* **Access:** User with `sudo` privileges

#### **Install Docker**

Update system and install prerequisites:

```bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y ca-certificates curl gnupg lsb-release
```

Add Docker’s official GPG key and repository:

```bash
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
  https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
```

Install Docker Engine:

```bash
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

Verify installation:

```bash
docker --version
```

Allow your user to run Docker without `sudo`:

```bash
sudo usermod -aG docker $USER
newgrp docker
```

***

#### **(Optional) Install Docker Compose**

If you prefer using Docker Compose for easier management:

```bash
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" \
  -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
```

***

#### **Prepare Directories**

Create a persistent directory for Juno data:

```bash
mkdir -p $HOME/juno
```

***

#### **Run Juno (Mainnet)**

Start the container:

```bash
docker run -d \
  --name juno \
  -p 6060:6060 \
  -v $HOME/juno:/var/lib/juno \
  nethermind/juno \
  --network mainnet \
  --db-path /var/lib/juno \
  --http \
  --http-port 6060 \
  --http-host 0.0.0.0 \
  --ws \
  --ws-port 6061 \
  --ws-host 0.0.0.0 \
  --eth-node wss://mainnet.infura.io/ws/v3/<YOUR_INFURA_KEY>
```

**Flags explanation:**

* `--network mainnet` — connects to Starknet mainnet
* `--db-path` — data storage directory inside the container
* `--http`, `--ws` — enable HTTP and WebSocket APIs
* `--eth-node` — Ethereum L1 node endpoint (e.g. Infura or Alchemy)

***

#### **View Logs**

Monitor synchronization progress:

```bash
docker logs -f juno
```

Check resource usage:

```bash
docker stats juno
```

***

#### **Auto-Restart on Reboot**

To ensure Juno restarts automatically after a reboot:

```bash
docker update --restart=always juno
```

You can confirm with:

```bash
docker inspect -f '{{.HostConfig.RestartPolicy.Name}}' juno
```

#### **Snapshot Sync (Optional)**

You can accelerate the initial sync by downloading a prebuilt snapshot of the Juno database and placing it in `$HOME/juno`.\
(Official snapshot links are periodically published in the [Nethermind Juno GitHub](https://github.com/NethermindEth/juno?utm_source=chatgpt.com).)
