High-performance, secure, and production-ready cryptocurrency mining pool for Korsh (KSH) based on Miningcore v2 and a dedicated WebUI Dashboard. Optimized natively for Linux servers (Ubuntu 24.04 LTS, 22.04 LTS, Debian 12) and Docker.
- Features
- Architecture Overview
- Prerequisites
- Step-by-Step Installation Guide (Ubuntu / Debian)
- Connecting Miners
- Useful Operations & Monitoring Commands
- Directory Structure
- Native Yespower 1.0 Algorithm: Hand-tuned C cryptographic hashing for Korsh PoW (
N=256, r=8). - PPLNS Payout Scheme: Configurable factor (standard
2.0) minimizing payout variance for miners. - Anti-DDoS & Flood Protection: Integrated share validation banning (
banOnJunkReceive,banOnInvalidShares). - Low-Latency Stratum Engine: Multi-threaded asynchronous I/O with variable difficulty (
VarDiff). - Modern WebUI Dashboard: Live statistics, workers table, hashrate charts, block history, and mobile responsiveness.
- Secure WebUI API Proxy: Built-in path traversal protection, CORS headers, and querystring handling.
- Production Systemd Management: Auto-start on boot and automatic crash recovery for 24/7 reliability.
[ Miner (cpuminer / SRBMiner) ]
│
▼ Stratum TCP:3333
[ Miningcore Pool Engine (.NET 9 + libmultihash.so) ] ◄── RPC ──► [ Korsh Daemon (korshd) ]
│
├───────────────► [ PostgreSQL Database ]
│
▼ REST API:4000
[ WebUI Server (Node.js Proxy:8080) ] ◄── Reverse Proxy (443) ──► [ Nginx SSL / Cloudflare ]
│
▼
[ Browser User / Miner Dashboard ]
- Operating System: Linux Server (Ubuntu 24.04 LTS, 22.04 LTS, or Debian 12 recommended).
- CPU / RAM: Minimum 2 vCPU cores, 2 GB RAM (4 GB recommended).
- Storage: 20+ GB SSD (depends on blockchain size).
- Network Ports Open:
3333: Stratum Mining (TCP)80/443: WebUI & Dashboard (HTTP/HTTPS)4000: Miningcore API (Localhost only, proxied via WebUI or Nginx)5432: PostgreSQL (Localhost only)9776: Korsh Daemon RPC (Localhost only)
Create the pool directory and clone the project:
sudo mkdir -p /opt/pool && sudo chown -R $USER:$USER /opt/pool
git clone https://github.com/Korsh-Dev/Pool.git /opt/pool
cd /opt/poolRun the appropriate automated build script for your operating system. This script automatically installs the .NET 9 SDK, C/C++ compilers, Node.js, and native dependencies, and compiles Miningcore in Release mode:
-
Ubuntu 24.04 LTS:
chmod +x miningcore/build-ubuntu-24.04.sh ./miningcore/build-ubuntu-24.04.sh
-
Ubuntu 22.04 LTS:
chmod +x miningcore/build-ubuntu-22.04.sh ./miningcore/build-ubuntu-22.04.sh
-
Debian 12:
chmod +x miningcore/build-debian-12.sh ./miningcore/build-debian-12.sh
The compiled binaries and native libraries (libmultihash.so, Miningcore, coins.json) will be placed into /opt/pool/miningcore/build/.
Install PostgreSQL and create the user and database:
sudo apt-get update
sudo apt-get install -y postgresql postgresql-contrib
# Create user and database
sudo -u postgres createuser miningcore
sudo -u postgres createdb -O miningcore miningcore
# Set password for database user
sudo -u postgres psql -c "ALTER USER miningcore WITH ENCRYPTED PASSWORD 'YOUR_STRONG_POSTGRES_PASSWORD';"
# Import the database schema
sudo -u postgres psql -d miningcore -f /opt/pool/miningcore/src/Miningcore/Persistence/Postgres/Scripts/createdb.sqlCopy the production example configuration into the build directory:
cp /opt/pool/korsh_pool.example.json /opt/pool/miningcore/build/config.json
nano /opt/pool/miningcore/build/config.jsonKey settings to configure:
-
Database Password:
"persistence": { "postgres": { "host": "127.0.0.1", "port": 5432, "user": "miningcore", "password": "YOUR_STRONG_POSTGRES_PASSWORD", "database": "miningcore" } }
-
Korsh Node RPC Credentials:
"daemons": [ { "host": "127.0.0.1", "port": 9776, "user": "korshrpc", "password": "YOUR_KORSH_RPC_PASSWORD" } ]
-
Pool Mining Wallet & Operator Fee Wallet: (Refer to
pool-address.txt)"address": "SRM6BKtKbxUe1GYWZW3GdGkvAqicu7YRyu", "rewardRecipients": [ { "type": "op", "address": "SMnZRoh3cfKdVV4PCRWNJYHG9zXiBah2Ai", "percentage": 1.0 } ]
To ensure the pool and WebUI automatically start on boot and recover if any process fails, install the provided systemd services:
sudo chmod +x /opt/pool/systemd/install-services.sh
sudo /opt/pool/systemd/install-services.sh
# Enable and start services
sudo systemctl enable --now miningcore
sudo systemctl enable --now miningcore-webuiCheck the status of both daemons:
sudo systemctl status miningcore
sudo systemctl status miningcore-webuiFor production SSL (HTTPS) and clean domain routing, copy the provided Nginx template:
sudo apt-get install -y nginx certbot python3-certbot-nginx
sudo cp /opt/pool/miningcore/nginx.conf /etc/nginx/sites-available/korsh-pool.conf
sudo ln -s /etc/nginx/sites-available/korsh-pool.conf /etc/nginx/sites-enabled/
# Edit domain names
sudo nano /etc/nginx/sites-available/korsh-pool.conf
# Test and reload Nginx
sudo nginx -t
sudo systemctl reload nginxMiners connect to your pool using the Stratum protocol:
- Stratum URL:
stratum+tcp://YOUR_SERVER_IP_OR_DOMAIN:3333 - Username:
YOUR_KORSH_WALLET_ADDRESS.WORKER_NAME - Password:
x(ord=4to specify a starting difficulty)
cpuminer -a yespower -o stratum+tcp://YOUR_SERVER_IP:3333 -u SRM6BKtKbxUe1GYWZW3GdGkvAqicu7YRyu.worker1 -p x./SRBMiner-MULTI --algorithm yespower --pool YOUR_SERVER_IP:3333 --wallet SRM6BKtKbxUe1GYWZW3GdGkvAqicu7YRyu.worker1 --password x# Miningcore daemon logs
sudo journalctl -u miningcore -f
# WebUI & API proxy logs
sudo journalctl -u miningcore-webui -f
# Real-time pool log file
tail -f /opt/pool/miningcore/build/pool.log# Restart pool daemon
sudo systemctl restart miningcore
# Restart web dashboard
sudo systemctl restart miningcore-webui
# Stop all pool services
sudo systemctl stop miningcore miningcore-webuicd /opt/pool/miningcore
./re-compile.sh
sudo systemctl restart miningcore├── .gitattributes # Enforces Unix LF line endings for all Linux scripts
├── .gitignore # Ignores build artifacts and local configs
├── README.md # This comprehensive documentation
├── korsh_pool.example.json # Production pool configuration template
├── pool-address.txt # Pool and operator wallet address reference
├── systemd/ # Linux systemd service units and installer
│ ├── install-services.sh # Automated installation helper
│ ├── miningcore.service # Miningcore engine background daemon
│ └── miningcore-webui.service # WebUI and reverse proxy daemon
├── miningcore/ # Miningcore v2 engine (.NET 9 & C/C++)
│ ├── Dockerfile # Production container deployment
│ ├── build-ubuntu-24.04.sh # Build script for Ubuntu 24.04 LTS
│ ├── build-ubuntu-22.04.sh # Build script for Ubuntu 22.04 LTS
│ ├── build-debian-12.sh # Build script for Debian 12
│ ├── nginx.conf # Production Nginx reverse proxy configuration
│ └── src/ # Source code for Miningcore and Native libraries
│ ├── Miningcore/ # C# backend (.NET 9)
│ └── Native/libmultihash/ # YesPower C hashing algorithm
└── webui/ # Responsive frontend dashboard
├── server.js # Production Node.js server & API reverse proxy
├── index.html # Main single-page application
├── css/ # Stylesheets, skins, and notifications
├── js/ # Dynamic dashboard and stats logic
└── poolconfig/ # Miner configuration templates
This project is licensed under the MIT License.