Skip to content

Conversation

@anukulpandey
Copy link

@anukulpandey anukulpandey commented Oct 3, 2025

Added Reef chain node to dokploy template for setting up a cluster

Can read more about reef chain here - https://reef.io

🌊 Reef Cluster – Dokploy Deployment Guide

A Reef validator cluster can be deployed in two different ways on Dokploy:

🟒 Method 1: Single Template (Full Cluster Setup) [RECOMMENDED]

A single deployment handles bootnode + all validators + RPC.

πŸ”΅ Method 2: Multiple Templates (Bootstrap + Individual Validators)

You deploy bootstrap + validators separately for more control.


πŸ“‘ Table of Contents

  1. Method 1 – Single Template

  2. Method 2 – Multiple Templates



🟒 Method 1: Single Template – Full Cluster Setup


Step 1: Generate Validator Keys

  1. Go to Create Service

  2. Select Template from the menu.

  3. Add template repo URL at the top-right:

    https://d1633d6c.templates-70k.pages.dev/
    
  4. Search for β€œReef”

  5. Click Create on Reef Chain – Keys Generator, then confirm.

  6. Deploy the service.

  7. Visit the port http://reef.host:48765 or your IP address / hostname at port 48765

  8. Copy all address + seed pairs, they will be needed later.


Step 2: Deploy Custom Spec Generator

  1. Go to Templates and search for:

Reef Chain – Custom Spec Generator

  1. Deploy it.

  2. It runs on port 8000 by default:

    http://reef.host:8000
    
  3. You can change the port in environment variables if needed.

This service is used by the validators to automatically fetch the custom chain spec.


Step 3: Deploy the Complete Cluster

  1. From templates, search for:

Reef Chain – Dev Cluster

  1. Open the environment tab and paste your seeds & addresses you have copied in step 1:
  1. You may configure:

    • specgenurl β†’ URL of your custom spec generator
    • default: http://reef.host:8000
  2. Deploy the service.

  3. Logs should show successful bootnode + 3 validators starting:

πŸŽ‰ The cluster is now running!


Adding More Validators

Generate more validators using Reef Chain – Keys Generator.

Fill in the new keys β†’ Deploy.


Deploy Ethereum RPC

Search template:

Reef Chain – ETH RPC

Deploy β†’ It will use the default substrate RPC:

http://reef.host:9944

ETH RPC runs at:

http://reef.host:8545

πŸŽ‰ Your full cluster (bootnode + validators + RPC + ETH RPC) is now live.



πŸ”΅ Method 2: Multiple Templates – Bootstrap & Validators


Step 1: Generate Validator Keys (Same as Method 1)

πŸ‘‰ Jump to: Generate Validator Keys


Step 2: Deploy Bootnode Validator

Create service β†’ choose template:

Reef Chain – Bootnode Validator

Fill in:

  • v1sec, v2sec, v3sec
  • v1addr, v2addr, v3addr
  • PORT=8000 β†’ exposes custom spec
  • P2P_PORT=30335 β†’ bootnode peer port

Bootnode starts β†’ no peers yet (expected).


Step 3: Deploy Additional Validators

Use:

Reef Chain – Validator

Deploy 2 or more validators β†’ finalize blocks.


Deploy ETH RPC (Method 2)

Same template:

Reef Chain – ETH RPC

ETH RPC default port:

http://reef.host:8545

@github-actions
Copy link

github-actions bot commented Oct 3, 2025

built with Refined Cloudflare Pages Action

⚑ Cloudflare Pages Deployment

Name Status Preview Last Commit
templates βœ… Ready (View Log) Visit Preview 7469a84

@Harikrishnan1367709
Copy link
Contributor

Screenshot 2025-10-07 at 9 09 41β€―PM

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive support for deploying Reef Chain blockchain infrastructure through Dokploy templates. Reef is an EVM-compatible blockchain platform, and this implementation enables users to set up complete validator clusters with various deployment options.

Key Changes:

  • Added 7 new Reef Chain templates covering the complete deployment lifecycle (keys generation, spec generation, validators, RPC nodes, and ETH RPC)
  • Implemented two deployment methodologies: single full-cluster setup and modular bootstrap + individual validator approach
  • Integrated Docker-based deployment using custom Reef Chain node images with runtime script fetching

Reviewed changes

Copilot reviewed 15 out of 22 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
meta.json Added 7 new template entries for Reef Chain services (bootnode, dev-cluster, eth-rpc, keygen, rpc, spec-gen, validator)
blueprints/reef-validator/* Individual validator node template with configurable network parameters
blueprints/reef-spec-gen/* Spec generator service that creates blockchain configuration files
blueprints/reef-rpc/* RPC node template for blockchain query interface
blueprints/reef-keygen/* Key generation service producing validator credentials
blueprints/reef-eth-rpc/* Ethereum-compatible RPC adapter for EVM interactions
blueprints/reef-dev-cluster/* All-in-one development cluster with bootnode and multiple validators
blueprints/reef-bootnode/* Bootstrap node template serving as network entry point

SPEC_URL = "http://reef.host:8000/local-chain-spec-raw.json"
BOOTNODE_NODE_KEY="http://reef.host:8000/bootnode_node_key.txt"

BOOTNODE_IP="72.60.35.83"
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded IP address '72.60.35.83' should not be a default value in a template. This exposes a specific external IP address and prevents proper customization. Users should provide their own bootnode IP through the variable system (e.g., using ${bootnode_ip} variable).

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +9
ports:
- "${P2P_PORT}:${P2P_PORT}"
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to project conventions, ports should be omitted from docker-compose.yml as Dokploy handles port mapping and service isolation via internal networks. The port exposure is already configured in template.toml through config.domains.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +2 to +3
SPEC_URL = "http://reef.host:8001/local-chain-spec-raw.json"
BOOTNODE_NODE_KEY="http://reef.host:8001/bootnode_node_key.txt"
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Port 8001 is inconsistent with other templates which use port 8000 for the spec generator (e.g., reef-spec-gen uses 8000, reef-validator uses 8000, reef-dev-cluster uses 8000). This inconsistency will cause the RPC node to fail when trying to fetch the spec file.

Copilot uses AI. Check for mistakes.
SPEC_URL = "http://reef.host:8001/local-chain-spec-raw.json"
BOOTNODE_NODE_KEY="http://reef.host:8001/bootnode_node_key.txt"

BOOTNODE_IP="72.60.35.83"
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded IP address '72.60.35.83' should not be a default value. This should be replaced with a configurable variable (e.g., ${bootnode_ip}) to allow users to specify their own bootnode address.

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +10
ports:
- "${P2P_PORT}:${P2P_PORT}"
- "${RPC_PORT}:${RPC_PORT}"
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to project conventions, ports should be omitted from docker-compose.yml as Dokploy handles port mapping through template.toml config.domains. Remove the ports section since these are already properly configured in template.toml.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +10 to +11
ports:
- "${PORT}:${PORT}"
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to project conventions, ports should be omitted from docker-compose.yml as Dokploy handles port mapping via template.toml config.domains.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +18 to +24
ports:
- "30335"
- "30333"
- "30334"
- "30336"
- "8001"
- "9944"
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to project conventions, ports should be omitted from docker-compose.yml as Dokploy handles port exposure through template.toml config.domains. All these ports are already properly configured in template.toml.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +9 to +11
ports:
- "${PORT}:${PORT}"
- "${P2P_PORT}:${P2P_PORT}"
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to project conventions, ports should be omitted from docker-compose.yml since Dokploy manages port mapping through template.toml config.domains configuration.

Copilot generated this review using guidance from repository custom instructions.
"reef-chain",
"eth-rpc",
"self-hosted",
"keys"
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tag 'keys' appears inconsistent with the tagging pattern used throughout the repository. For reef-eth-rpc, this should likely be 'evm' to match the service's purpose of providing EVM layer RPC functionality, similar to other Reef Chain entries.

Suggested change
"keys"
"evm"

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +19

[[config.domains]]
serviceName = "reef-rpc"
port = 30339
host = "${domain}"
path = "/"

[[config.domains]]
serviceName = "reef-rpc"
port = 9994
host = "${domain}"
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both domain configurations use the same ${domain} host, which will cause a conflict as two different ports cannot be mapped to the same domain without path differentiation. Consider using different domain variables (e.g., ${p2p_domain} and ${rpc_domain}) or adding subdomain differentiation.

Suggested change
[[config.domains]]
serviceName = "reef-rpc"
port = 30339
host = "${domain}"
path = "/"
[[config.domains]]
serviceName = "reef-rpc"
port = 9994
host = "${domain}"
p2p_domain = "${p2p_domain}"
rpc_domain = "${rpc_domain}"
[[config.domains]]
serviceName = "reef-rpc"
port = 30339
host = "${p2p_domain}"
path = "/"
[[config.domains]]
serviceName = "reef-rpc"
port = 9994
host = "${rpc_domain}"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs/description These issues/prs are missing a description.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants