Skip to content

Commit 81ca232

Browse files
committed
Website: update BP and docker usage doc
1 parent 92a0f4b commit 81ca232

File tree

2 files changed

+142
-33
lines changed

2 files changed

+142
-33
lines changed

website/docs/node-operators/block-producer.md

Lines changed: 84 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,88 @@ complete.
1111
Ensure Docker and Docker Compose are installed on your system -
1212
[Docker Installation Guide](../appendix/docker-installation)
1313

14-
## Download & Start the Node
14+
## Using Docker Compose
1515

16-
1. **Download the Latest Release**
16+
1. **Download the Docker Compose File**
1717

18-
- Visit the [Mina Rust Releases](https://github.com/o1-labs/mina-rust/releases)
19-
- Download the latest `mina-rust-vX.Y.Z-docker-compose.zip`
20-
- Extract the Files:
18+
Create a directory for your block producer and download the docker-compose
19+
file:
2120

22-
```bash
23-
unzip mina-rust-vX.Y.Z-docker-compose.zip
24-
cd mina-rust-vX.Y.Z-docker-compose
25-
mkdir mina-workdir
26-
```
21+
```bash
22+
# Create a directory for your block producer
23+
mkdir mina-block-producer && cd mina-block-producer
24+
25+
# Create the working directory for node data
26+
mkdir mina-workdir
27+
28+
# Download the block producer docker-compose file (choose one method)
29+
# Using wget:
30+
wget https://raw.githubusercontent.com/o1-labs/mina-rust/v0.17.0/docker-compose.block-producer.yml
31+
32+
# Or using curl:
33+
curl -O https://raw.githubusercontent.com/o1-labs/mina-rust/v0.17.0/docker-compose.block-producer.yml
34+
35+
# Create an empty .env file to avoid warnings (optional - has defaults)
36+
touch .env
37+
```
38+
39+
For the latest development version, replace `v0.17.0` with `develop` in the
40+
URL.
41+
42+
2. **Verify Docker Image Version** (Optional but recommended)
2743

28-
2. **Prepare Your Keys**
44+
Before starting, verify you have the correct version:
45+
46+
```bash
47+
docker run --rm o1labs/mina-rust:latest build-info
48+
```
49+
50+
This shows the exact version, commit hash, and build details.
51+
52+
3. **Prepare Your Keys**
2953

3054
[Docker Compose](https://github.com/o1-labs/mina-rust/blob/develop/docker-compose.block-producer.yml)
3155
references `mina-workdir`. It stores a private key and logs for block
3256
production.
3357

3458
**Option A: Generate a new key pair (if you don't have one)**
3559

36-
If you don't have a block producer key, you can generate one using the
37-
Makefile target:
60+
If you don't have a block producer key, you can generate one using the Mina
61+
CLI:
3862

3963
```bash
40-
# Clone the repository first if you haven't already
41-
git clone https://github.com/o1-labs/mina-rust.git
42-
cd mina-rust
43-
44-
# Generate a new encrypted key pair
45-
make generate-block-producer-key
64+
# Generate a new encrypted key pair using Docker
65+
# This creates the key directly in the mina-workdir/producer-key file
66+
docker run --rm -v $(pwd)/mina-workdir:/root/.mina o1labs/mina-rust:latest \
67+
misc mina-encrypted-key "YourPassword" --file /root/.mina/producer-key
4668

47-
# Or generate with a password
48-
make generate-block-producer-key MINA_PRIVKEY_PASS="YourPassword"
69+
# Fix file permissions to match your local user (recommended)
70+
sudo chown $(id -u):$(id -g) mina-workdir/producer-key
4971
```
5072

51-
This will create:
52-
- `mina-workdir/producer-key` (encrypted private key)
53-
- `mina-workdir/producer-key.pub` (public key)
73+
This will create an encrypted private key file at
74+
`mina-workdir/producer-key`. The key will be encrypted with the password you
75+
provide.
76+
77+
<!-- prettier-ignore-start -->
78+
79+
:::tip File Permissions
80+
81+
Docker containers typically run as root, so generated files will be owned by
82+
root. It's recommended to change ownership to your local user using `chown`
83+
after generation to avoid permission issues when accessing or backing up the
84+
key file.
85+
86+
:::
87+
<!-- prettier-ignore-stop -->
88+
89+
The command also outputs the public key which you should save for reference:
90+
91+
```bash
92+
# To see just the public key, you can run:
93+
docker run --rm -v $(pwd)/mina-workdir:/root/.mina o1labs/mina-rust:latest \
94+
misc mina-encrypted-key "YourPassword" --file /root/.mina/producer-key | grep "Public key:"
95+
```
5496

5597
**Option B: Use an existing key**
5698

@@ -64,7 +106,7 @@ Ensure Docker and Docker Compose are installed on your system -
64106
Replace `/path/to/your/private_key` with the actual path to your private key
65107
file.
66108

67-
3. **Launch Block Producer**
109+
4. **Launch Block Producer**
68110

69111
Use `MINA_PRIVKEY_PASS` to set the private key password. Optionally, use
70112
`COINBASE_RECEIVER` to set a different coinbase receiver:
@@ -98,11 +140,24 @@ Ensure Docker and Docker Compose are installed on your system -
98140
docker compose -f docker-compose.block-producer.yml up -d --pull always
99141
```
100142

101-
4. **Go to Dashboard**
143+
5. **Go to Dashboard**
144+
145+
Visit [http://localhost:8070](http://localhost:8070) to monitor sync and
146+
block production.
147+
148+
<!-- prettier-ignore-start -->
149+
150+
:::note Frontend Status
151+
152+
The dashboard is currently being updated and may not work correctly in
153+
v0.17.0. As an alternative, monitor your node using logs:
154+
155+
```bash
156+
docker compose logs -f
157+
```
102158

103-
Visit [http://localhost:8070](http://localhost:8070) to
104-
[monitor sync](http://localhost:8070/dashboard) and
105-
[block production](http://localhost:8070/block-production).
159+
:::
160+
<!-- prettier-ignore-stop -->
106161

107162
## Using Make Command
108163

website/docs/node-operators/docker-usage.md

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ docker run -p 8302:8302 o1labs/mina-rust:latest
147147

148148
```bash
149149
# Run node and web dashboard together
150-
docker run -d --name mina-node -p 8302:8302 o1labs/mina-rust:latest \
150+
docker run -d --name mina-rust-node -p 8302:8302 o1labs/mina-rust:latest \
151151
node --network devnet
152152
# Frontend (currently being fixed, may not work as expected)
153153
docker run -d --name mina-frontend -p 8070:8070 o1labs/mina-rust-frontend:latest
@@ -170,6 +170,44 @@ operational in a future release.
170170

171171
<!-- prettier-ignore-stop -->
172172

173+
#### Quick Start with Release Version
174+
175+
For each release, you can directly download the docker-compose.yml file:
176+
177+
```bash
178+
# Create a directory for your Mina node
179+
mkdir mina-rust-node && cd mina-rust-node
180+
181+
# Download the docker-compose.yml file (choose one method)
182+
# Using wget:
183+
wget https://raw.githubusercontent.com/o1-labs/mina-rust/v0.17.0/docker-compose.yml
184+
185+
# Or using curl:
186+
curl -O https://raw.githubusercontent.com/o1-labs/mina-rust/v0.17.0/docker-compose.yml
187+
188+
# Create an empty .env file to avoid warnings (optional - has defaults)
189+
touch .env
190+
191+
# Or create .env with custom settings (optional)
192+
cat > .env << EOF
193+
MINA_RUST_TAG=latest
194+
MINA_FRONTEND_TAG=latest
195+
MINA_LIBP2P_PORT=8302
196+
EOF
197+
198+
# Start the node
199+
docker compose up -d
200+
201+
# View logs
202+
docker compose logs -f
203+
204+
# Stop services
205+
docker compose down
206+
```
207+
208+
#### Using Latest Development Version
209+
210+
To use the latest development version with all configuration files:
173211

174212
```bash
175213
# Clone the repository to get the docker compose configuration
@@ -203,7 +241,7 @@ MINA_LIBP2P_PORT=9302 MINA_LIBP2P_EXTERNAL_IP=203.0.113.1 docker compose up -d
203241

204242
#### What's Included
205243

206-
- **mina-node**: The core Mina Rust node running on devnet
244+
- **mina-rust-node**: The core Mina Rust node running on devnet
207245
- **frontend**: Web dashboard accessible at http://localhost:8070 (currently
208246
being fixed)
209247
- **Persistent storage**: Node data stored in `./mina-workdir` directory
@@ -220,21 +258,37 @@ MINA_LIBP2P_PORT=9302 MINA_LIBP2P_EXTERNAL_IP=203.0.113.1 docker compose up -d
220258

221259
```bash
222260
# Run with custom verbosity
223-
docker run -d --name mina-node \
261+
docker run -d --name mina-rust-node \
224262
-p 8302:8302 \
225263
o1labs/mina-rust:latest \
226264
node --network devnet --verbosity debug
227265

228266
# Run with external IP and custom libp2p port
229267
# Get your external IP first
230268
EXTERNAL_IP=$(curl -s https://ifconfig.me/ip)
231-
docker run -d --name mina-node \
269+
docker run -d --name mina-rust-node \
232270
-p 9302:9302 \
233271
-e MINA_LIBP2P_EXTERNAL_IP=$EXTERNAL_IP \
234272
o1labs/mina-rust:latest \
235273
node --network devnet --libp2p-port 9302
236274
```
237275

276+
### Verifying Docker Image Version
277+
278+
Always verify the version of your Docker image to ensure you're running the
279+
correct build:
280+
281+
```bash
282+
# Check build information
283+
docker run --rm o1labs/mina-rust:latest build-info
284+
285+
# For a specific version
286+
docker run --rm o1labs/mina-rust:v0.17.0 build-info
287+
```
288+
289+
This displays version details including commit hash, build time, and Rust
290+
compiler version. See [Node Management](node-management) for more details.
291+
238292
## Next Steps
239293

240294
For specific node configurations and detailed setup guides:

0 commit comments

Comments
 (0)