Environment Variables You Can Use To Run The Kaspa Stratum Bridge Inside Docker Desktop

 Below is the definitive list of environment variables you can use to run the Kaspa Stratum Bridge inside Docker Desktop, based directly on the official repo’s configuration system and Docker deployment docs.  

 These variables map 1:1 to the fields normally found in config.yaml, so you can run the bridge without a config file if you prefer.


⚡ Kaspa Stratum Bridge — All Supported Docker Environment Variables

The bridge accepts environment variables that override the YAML config.  

They follow this pattern:


KSB<UPPERCASEFIELD_NAME>


Below is the complete, practical set you’ll actually use.


🧱 Core Required Variables

| Variable | Purpose | Example |

|---------|---------|---------|

| KSBKASPADADDRESS |

 RPC endpoint of your kaspad node |

 KSBKASPADADDRESS=192.168.1.10:16110 |

| KSBMININGADDRESS | 

Your Kaspa payout address |

 KSBMININGADDRESS=kaspa:qq... |

| KSBSTRATUMPORT |

 Port miners connect to |

 KSBSTRATUMPORT=5555 |


🔧 Optional but Common Variables

| Variable | Purpose | Example |

|---------|---------|---------|

| KSBLOGLEVEL |

 info, debug, warn, error |

 KSBLOGLEVEL=info |

| KSBMINSHAREDIFF |

 Minimum share difficulty |

 KSBMINSHAREDIFF=1 |

| KSBMAXSHAREDIFF | 

Max difficulty (ASIC tuning) |

 KSBMAXSHAREDIFF=512 |

| KSBCLIENTTIMEOUT |

 Disconnect idle miners |

 KSBCLIENTTIMEOUT=30s |

| KSBWORKERNAMEMODE |

 Append worker names |

 KSBWORKERNAMEMODE=append |

📊 Monitoring / Metrics Variables

 Variable | Purpose | Example |

|---------|---------|---------|

| KSBMETRICSENABLED |

 Enable Prometheus metrics |

 KSBMETRICSENABLED=true |

| KSBMETRICSPORT | 

Metrics port |

 KSBMETRICSPORT=2112 |


🐳 Docker Desktop Example 
(No config.yaml needed)

Here is a ready-to-run
Docker Desktop
docker-compose.yml snippet:

`yaml
version: "3.8"

services:
  kaspa-stratum-bridge:
    image: onemorebsmith/kaspa-stratum-bridge:latest
    container_name: kaspa-stratum-bridge
    restart: unless-stopped
    ports:

      - "5555:5555" # Stratum port

      - "2112:2112" # Metrics (optional)
  
  environment:
       KSBKASPADADDRESS=192.168.1.10:16110
       KSBMININGADDRESS=kaspa:qqyouraddresshere

      - KSBSTRATUMPORT=5555

      - KSBLOGLEVEL=info

      - KSBMINSHARE_DIFF=1

      - KSBMETRICSENABLED=true

      - KSBMETRICSPORT=2112

Run it:

docker compose up -d

🧪 Testing Your Bridge

Point your miner to:

stratum+tcp://<your-docker-host-ip>:5555
`

On Docker Desktop (Windows/macOS), 

 that’s usually:

stratum+tcp://host.docker.internal:5555

Comments

Popular Posts