This project provides a production-ready, lightweight Ethereum Blockchain Environment designed for educational purposes. It is optimized for easy deployment on Coolify or any Docker-based environment.
It includes everything you need to start teaching or learning Ethereum development:
- Geth Node: A stable Proof-of-Authority (Clique) blockchain.
- Explorer: A lightweight block explorer (Alethio) to view transactions.
- Faucet: A web interface to get free test ETH (
10 ETHper request). - RPC Proxy: A pre-configured Nginx proxy to handle CORS and SSL correctly for MetaMask connectivity.
The system is composed of 4 Docker services:
| Service | Port (Internal) | Description |
|---|---|---|
| geth | 8545, 8546 |
The Ethereum Node (v1.13.15). Runs via geth-boot.sh. |
| rpc-proxy | 80 |
Crucial Component. Nginx proxy that forwards requests to Geth and handles CORS headers to ensure MetaMask works. |
| explorer | 80 |
Alethio Lite Explorer. Visualizes blocks/txs. |
| faucet | 3000 |
Node.js App. Sends ETH to users using the Genesis Master Key. |
We explicitly use Geth v1.13.15 because newer versions (v1.14+) require complex Proof-of-Stake (Merge) configurations (Beacon Chain, Prysm, etc.) which are overkill for a simple educational chain. v1.13 is the "Gold Standard" for stable, simple PoA chains supporting Paris EVM features.
- Coolify (Recommended) or Docker & Docker Compose installed locally.
- A domain name (e.g.,
blockchain.yourdomain.com).
-
Create a New Service: Choose "Docker Compose".
-
Paste Configuration: Copy the contents of
docker-compose.yml. -
Configure Domains: Go to the Configuration tab in Coolify and set the domains as follows. This is critical.
- Domains for rpc-proxy:
https://rpc.yourdomain.com:80- Note: Do NOT expose
gethdirectly. MetaMask connects here.
- Note: Do NOT expose
- Domains for explorer:
https://explorer.yourdomain.com:80 - Domains for faucet:
https://faucet.yourdomain.com:3000
(Make sure to append the internal ports like
:80or:3000so Coolify knows where to map). - Domains for rpc-proxy:
-
Deploy: Click "Deploy". The initial build might take 1-2 minutes.
To use this blockchain, users (Students/Developers) should configure their MetaMask as follows:
- Network Name:
My Edu Chain(or any name) - RPC URL:
https://rpc.yourdomain.com(The domain you assigned torpc-proxy) - Chain ID:
1337 - Currency Symbol:
ETH - Block Explorer URL:
https://explorer.yourdomain.com
- Open the Faucet URL (
https://faucet.yourdomain.com). - Paste your MetaMask address.
- Click "Send Me ETH".
- You will receive 10 ETH instantly.
- Cause: This is usually a CORS (Cross-Origin Resource Sharing) issue.
- Fix: Ensure you are connecting to the
rpc-proxydomain, NOT the raw Geth domain. The Proxy (nginx/default.conf) is specially configured to add the necessaryAccess-Control-Allow-Origin: *headers.
- Cause: The master account might be empty (unlikely as it has 1 Billion ETH).
- Fix: Check the
faucetlogs. Ensure thePRIVATE_KEYindocker-compose.ymlmatches the one ingenesis.json(Hint: It is0xac09...).
- Cause: Explorer cannot reach the RPC.
- Fix: Check the
APP_NODE_URLenvironment variable indocker-compose.yml. It must point to the public HTTPS RPC URL (https://rpc.yourdomain.com).
docker-compose.yml: Main orchestration file.geth-config/:genesis.json: Defines the blockchain rules (Chain ID 1337).geth-boot.sh: Startup script (Initializes genesis if empty).Dockerfile: Builds the custom Geth image.
nginx/:default.conf: Proxy configuration for CORS.Dockerfile: Builds the Proxy image.
faucet/: Source code for the Node.js Faucet app.
Happy Hacking! 🚀