MiningCore Setup for Linux
Complete guide to setting up MiningCore mining pool server on Linux with PostgreSQL database.
💡 If you're using Windows 10, see the Windows Tutorial for platform-specific instructions.
Step 1: Download MiningCore
Clone Mining Core from GitHub
Requirements:
- • You must have a working PostgreSQL database
- • Ensure you meet all dependencies from the README
- • Avoid Docker unless you are confident managing containers
Step 2: Install and Configure PostgreSQL
For production environments:
- • Monitor I/O, disk, CPU, and memory — MiningCore's API can put heavy load on your DB
- • Keep all PostgreSQL settings default for now
Step 3: Create the Database Schema
Login to PostgreSQL
sudo -u postgres psqlCreate Role and Database
Replace 'your-secure-password' with a strong password:
CREATE ROLE miningcore WITH LOGIN ENCRYPTED PASSWORD 'your-secure-password';
CREATE DATABASE miningcore OWNER miningcore;Step 4: Load Schema SQL Files
✅ Make sure you can connect using psql before proceeding.
As the postgres user, run:
psql -d miningcore -f miningcore/src/Miningcore/Persistence/Postgres/Scripts/createdb.sqlThen apply the partitioning script:
psql -d miningcore -f miningcore/src/Miningcore/Persistence/Postgres/Scripts/createdb_postgresql_11_appendix.sqlStep 5: Create a Pool Table
Run the following command once per pool you set up:
CREATE TABLE shares_mypool1 PARTITION OF shares FOR VALUES IN ('mypool1');- • Replace
mypool1with your pool's unique identifier - • This name is used in the configuration files as well
Step 6: Configure the Pool
- • Go to the
build/directory inside your MiningCore folder - • Create a
<coin>.jsonconfiguration file (e.g.ergo.json) - • Refer to: MiningCore Config Example
💡 Example Ergo config.json (Click to expand)
Required Fields in Config
Replace placeholders:
- •
YOURPOSTGRESQL_PASSWORD_GOES_HERE - •
YOUR_REWARD_ADDR_GOES_HERE
Adjust:
- •
rewardRecipientspercentage to fit your payout model - • Enable
paymentProcessingif you will use automatic share payouts
{
"logging": {
"level": "info",
"enableConsoleLog": true,
"enableConsoleColors": true,
"logFile": "core.log",
"apiLogFile": "api.log",
"logBaseDirectory": "/path/to/logs",
"perPoolLogFile": false
},
"banning": {
"manager": "Integrated",
"banOnJunkReceive": true,
"banOnInvalidShares": false
},
"persistence": {
"postgres": {
"host": "127.0.0.1",
"port": 5432,
"user": "miningcore",
"password": "YOURPOSTGRESQL_PASSWORD_GOES_HERE",
"database": "miningcore"
}
},
"pools": [
{
"id": "ergo1",
"enabled": true,
"coin": "ergo",
"address": "YOUR_REWARD_ADDR_GOES_HERE",
"ports": {
"3052": {
"listenAddress": "0.0.0.0",
"difficulty": 0.02,
"varDiff": {
"minDiff": 0.01,
"maxDiff": null,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
},
"daemons": [
{
"host": "127.0.0.1",
"port": 9052,
"user": "",
"password": ""
}
]
}
]
}Step 7: Start the Pool
You should configure your pool to auto-start using a startup script.
cd build
Miningcore -c <your-config>.jsonThe JSON config defines the log files you should monitor for:
- • Startup errors
- • Daemon issues
- • Pool activity
Expected Log Output (Success)
When everything is working properly, your logs should show the following messages:
🟢 Node Online and Synced
[2022-03-16 14:26:12.9080] [I] [ergo1] All daemons online
[2022-03-16 14:26:12.9345] [I] [ergo1] Daemon is synced with blockchain🟢 Pool Online
[2022-03-16 14:26:14.4346] [I] [ergo1] Pool Online⚠️ If the network difficulty or other values look off, double-check your diff setting in the config.
Step 8: Network Setup Notes
If your miner, pool, or node are on different machines, you will need to open ports to allow communication between them.
Initial Mining Traffic Flow
3746)9053, testnet: 9052)Same Machine
No need to open ports — uses localhost
LAN or WAN
- • Open ports on OS firewall
- • Configure port forwarding on router
🎉 You're Good to Go!
You now have a fully operational MiningCore pool on Linux.
Make sure everything is synced, ports are configured, and logs show green — then start mining! ⛏️