webchain-miner container for WebChain Network
Webchainminer is now hosted on docker hub. You can get it there, or built it yourself.
Run these commands:
docker pull wattpool/webchainminer
docker run webchainminer -o webchain.wattpool.net:3333 -u WALLET -p x
(replace WALLET with your WebChain wallet address)
-or-
Run these commands:
git clone https://github.com/wattpool/webchain-miner-dockerized
cd webchain-miner-dockerized
docker build -f Dockerfile -t webchainminer .
After you pull or build the image, run it with the following command:
docker run webchainminer -o webchain.wattpool.net:3333 -u WALLET -p x
(replace WALLET with your WebChain wallet address)
Run these commands:
git clone https://github.com/wattpool/webchain-miner-dockerized
cd webchain-miner-dockerized
nano config.json
Now follow these directions:
- Go to line 6 and you will see this:
"donate-level": 1, // donate level, mininum 1%
Replace 1 with the donation level you would prefer
- Go to line 21 and you will see this:
"user": "0x035ba77B912EA3eA5a05c07601242fDB28229d81", // username for mining server
Replace 0x035ba77B912EA3eA5a05c07601242fDB28229d81 with YOUR address. Do not remove the quotation marks.
- Go to line 26 and you will see this:
"worker-id": "dockerized",
Replace dockerized with your rigs name. Do not remove the quotation marks.
Now, run this command to build the webchain-miner container:
docker build -f Dockerfile -t webchainminer .
To start the miner, run:
docker run webchainminer
-
Build the docker image for the miner using one of the methods described above.
-
Create a new container using the newly built docker image:
docker container create webchainminer
This command will output a long hash.
- Start the new container referenced by the long hash from the previous step:
docker container start {that long hash}
- You can combine steps 2 & 3 into a single command:
docker container start `docker container create webchainminer`
- You can limit CPU usage by passing arguments to the
docker container create
command:
docker container start `docker container create --cpus=".7" webchainminer`
- You can view the running container and see the newly assigned name with the command:
docker container ls
- View container logs using that newly assigned name:
docker container logs -f that-container-name
Assuming you have created a user webchainminer
in group webchainminer
and have cloned this repository in the webchainminer
home user directory, the following service file will start the daemon automatically at system startup.
Adjust the percentage of CPU being allocated to the process by editing the file cpus.txt
. By default, this is set to 35% - feel free to change this value.
Enter the following into /etc/systemd/system/webchainminer.service
:
[Unit]
Description=Webchain miner daemon service
After=network.target
[Service]
User=webchainminer
Group=webchainminer
Type=simple
Restart=always
RestartSec=90s
WorkingDirectory=/home/webchainminer/webchain-miner-dockerized
ExecStart=/usr/bin/make miner
[Install]
WantedBy=default.target
0x035ba77B912EA3eA5a05c07601242fDB28229d81
(WEB)