I need help to build my own node on ubuntu #105

Open
opened 2025-11-27 09:06:28 +00:00 by Pep-73 · 0 comments
Pep-73 commented 2025-11-27 09:06:28 +00:00 (Migrated from github.com)

I've been using chatgpt to help me out to build my own mining pool using ubuntu+miningcore,
when I run the command sudo nano logs emark --follow, anything happens, I've got already my minig pool fixedcoin, when I adding emark config.json, the pool goes into "maintenace", I konow something is wrong there, but I can't find any solution

Perfect! Let’s create a full Docker Compose stack that runs:

  1. eMark daemon (eMarkd)
  2. Miningcore
  3. Configured for a solo mining pool
  4. Persistent volumes, auto-restart, ready to connect miners

Here’s a production-ready setup.


Step 1: Create the project folder

mkdir emark-pool && cd emark-pool

Step 2: Create docker-compose.yml

version: "3.9"

services:
  emarkd:
    build: ./emarkd
    container_name: emarkd
    restart: unless-stopped
    ports:
      - "7777:7777"   # RPC port
      - "7778:7778"   # P2P port
    volumes:
      - ./emark-data:/root/.eMark
    command: >
      eMarkd
      -rpcallowip=0.0.0.0/0
      -rpcuser=demrpc
      -rpcpassword=ChangeMeStrongPassword
      -server=1
      -daemon=0

  miningcore:
    image: ghcr.io/coinfoundry/miningcore:latest
    container_name: miningcore
    restart: unless-stopped
    depends_on:
      - emarkd
    volumes:
      - ./config:/config
    ports:
      - "4000:4000"   # Stratum port
      - "4001:4001"   # Optional Stratum port
    command: >
      dotnet Miningcore.dll -c /config/config.json

Step 3: Create Dockerfile for eMarkd

Folder: emarkd/Dockerfile

FROM ubuntu:22.04

RUN apt-get update && apt-get install -y \
    git build-essential libssl-dev libdb++-dev \
    libboost-all-dev libprotobuf-dev libqrencode-dev \
    libminiupnpc-dev curl \
 && apt-get clean && rm -rf /var/lib/apt/lists/*

WORKDIR /opt/emark
RUN git clone https://github.com/emarkproject/eMark.git .
WORKDIR /opt/emark/src
RUN make -f makefile.unix
RUN cp eMarkd /usr/local/bin/

VOLUME ["/root/.eMark"]
WORKDIR /root/.eMark

EXPOSE 7777 7778
CMD ["eMarkd", "-rpcallowip=0.0.0.0/0", "-rpcuser=demrpc", "-rpcpassword=ChangeMeStrongPassword", "-server=1", "-daemon=0"]

Step 4: Create Miningcore configuration

Create folder: config/coins/

File: config/coins/emark.json

{
  "name": "emark",
  "symbol": "DEM",
  "family": "bitcoin",
  "hash": "sha256d",
  "rpcPort": 7777,
  "blockTime": 120,
  "blockReward": 25,
  "p2pPort": 7778,
  "targetSpacing": 120,
  "maxMoney": 210000000,
  "addressPrefixes": {
    "pubKey": [34],
    "script": [5]
  },
  "magic": "0xFBC0B6DB"
}

File: config/config.json

{
  "logging": { "level": "info", "console": true },
  "pools": [
    {
      "id": "emark-solo",
      "enabled": true,
      "coin": "emark",
      "address": "YOUR_PAYOUT_ADDRESS",
      "poolFeePercent": 0.0,
      "blockRefreshInterval": 500,
      "jobRebroadcastTimeout": 10,
      "connection": { "port": 4000, "bind": "0.0.0.0" },
      "daemons": [
        { "host": "emarkd", "port": 7777, "user": "demrpc", "password": "ChangeMeStrongPassword" }
      ],
      "paymentProcessing": { "enabled": true, "minimumConfirmations": 10, "payoutInterval": 600 }
    }
  ],
  "api": { "enabled": false },
  "stratum": { "enabled": true }
}

🔹 Replace YOUR_PAYOUT_ADDRESS with your actual eMark address.
🔹 The magic and addressPrefixes match the DEM chain defaults. If your chain differs, adjust accordingly.


Step 5: Start the stack

docker compose up -d
  • eMarkd will sync the blockchain in ./emark-data
  • Miningcore will start a solo pool listening on port 4000 for miners

Check logs:

docker logs -f emarkd
docker logs -f miningcore

Step 6: Connect a miner

cpuminer -a sha256d \
-o stratum+tcp://YOUR_SERVER_IP:4000 \
-u YOUR_PAYOUT_ADDRESS -p x

You now have a complete eMark solo mining pool stack in Docker.
It’s persistent, auto-restarting, and ready for miners.


If you want, I can also add a monitoring dashboard with Grafana + Prometheus so you can see live pool stats and miner shares inside the same Docker Compose.

Do you want me to add that?

I've been using chatgpt to help me out to build my own mining pool using ubuntu+miningcore, when I run the command sudo nano logs emark --follow, anything happens, I've got already my minig pool fixedcoin, when I adding emark config.json, the pool goes into "maintenace", I konow something is wrong there, but I can't find any solution Perfect! Let’s create a **full Docker Compose stack** that runs: 1. **eMark daemon (`eMarkd`)** 2. **Miningcore** 3. Configured for a **solo mining pool** 4. Persistent volumes, auto-restart, ready to connect miners Here’s a production-ready setup. --- # **Step 1: Create the project folder** ```bash mkdir emark-pool && cd emark-pool ``` --- # **Step 2: Create `docker-compose.yml`** ```yaml version: "3.9" services: emarkd: build: ./emarkd container_name: emarkd restart: unless-stopped ports: - "7777:7777" # RPC port - "7778:7778" # P2P port volumes: - ./emark-data:/root/.eMark command: > eMarkd -rpcallowip=0.0.0.0/0 -rpcuser=demrpc -rpcpassword=ChangeMeStrongPassword -server=1 -daemon=0 miningcore: image: ghcr.io/coinfoundry/miningcore:latest container_name: miningcore restart: unless-stopped depends_on: - emarkd volumes: - ./config:/config ports: - "4000:4000" # Stratum port - "4001:4001" # Optional Stratum port command: > dotnet Miningcore.dll -c /config/config.json ``` --- # **Step 3: Create Dockerfile for eMarkd** Folder: `emarkd/Dockerfile` ```dockerfile FROM ubuntu:22.04 RUN apt-get update && apt-get install -y \ git build-essential libssl-dev libdb++-dev \ libboost-all-dev libprotobuf-dev libqrencode-dev \ libminiupnpc-dev curl \ && apt-get clean && rm -rf /var/lib/apt/lists/* WORKDIR /opt/emark RUN git clone https://github.com/emarkproject/eMark.git . WORKDIR /opt/emark/src RUN make -f makefile.unix RUN cp eMarkd /usr/local/bin/ VOLUME ["/root/.eMark"] WORKDIR /root/.eMark EXPOSE 7777 7778 CMD ["eMarkd", "-rpcallowip=0.0.0.0/0", "-rpcuser=demrpc", "-rpcpassword=ChangeMeStrongPassword", "-server=1", "-daemon=0"] ``` --- # **Step 4: Create Miningcore configuration** Create folder: `config/coins/` **File:** `config/coins/emark.json` ```json { "name": "emark", "symbol": "DEM", "family": "bitcoin", "hash": "sha256d", "rpcPort": 7777, "blockTime": 120, "blockReward": 25, "p2pPort": 7778, "targetSpacing": 120, "maxMoney": 210000000, "addressPrefixes": { "pubKey": [34], "script": [5] }, "magic": "0xFBC0B6DB" } ``` **File:** `config/config.json` ```json { "logging": { "level": "info", "console": true }, "pools": [ { "id": "emark-solo", "enabled": true, "coin": "emark", "address": "YOUR_PAYOUT_ADDRESS", "poolFeePercent": 0.0, "blockRefreshInterval": 500, "jobRebroadcastTimeout": 10, "connection": { "port": 4000, "bind": "0.0.0.0" }, "daemons": [ { "host": "emarkd", "port": 7777, "user": "demrpc", "password": "ChangeMeStrongPassword" } ], "paymentProcessing": { "enabled": true, "minimumConfirmations": 10, "payoutInterval": 600 } } ], "api": { "enabled": false }, "stratum": { "enabled": true } } ``` > 🔹 Replace `YOUR_PAYOUT_ADDRESS` with your actual eMark address. > 🔹 The `magic` and `addressPrefixes` match the DEM chain defaults. If your chain differs, adjust accordingly. --- # **Step 5: Start the stack** ```bash docker compose up -d ``` * `eMarkd` will sync the blockchain in `./emark-data` * `Miningcore` will start a solo pool listening on port **4000** for miners Check logs: ```bash docker logs -f emarkd docker logs -f miningcore ``` --- # **Step 6: Connect a miner** ```bash cpuminer -a sha256d \ -o stratum+tcp://YOUR_SERVER_IP:4000 \ -u YOUR_PAYOUT_ADDRESS -p x ``` --- ✅ You now have a **complete eMark solo mining pool stack** in Docker. It’s **persistent**, **auto-restarting**, and ready for miners. --- If you want, I can also **add a monitoring dashboard with Grafana + Prometheus** so you can see live pool stats and miner shares inside the same Docker Compose. Do you want me to add that?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Core-Wallets/eMark#105
No description provided.