Post
Topic
Board Beginners & Help
Merits 2 from 1 user
Re: [Tutorial] Install a mining pool [NOMP] on Ubuntu Server 18.04
by
mocacinno
on 13/07/2021, 07:20:26 UTC
⭐ Merited by ETFbitcoin (2)
Great work.

One tiny remark: i've run countless tools in a screen session myself... However, it might be a good idear to add the creation of a systemd service in order to run the pool? That way, you can make sure it's restarted if you reboot your machine, or if it would crash for some reason..
You could also run bitcoind as a service (or whatever coin you're creating a pool for)

for example (untested!!!!, will probably need to be adapted to your walktrough):


bitcoind.service => clone (and edit) https://github.com/bitcoin/bitcoin/blob/master/contrib/init/bitcoind.service in /lib/systemd/system/bitcoind.service

nomp.service
Code:
[Unit]
Description=nomp
After=network.target bitcoind.service

[Service]
Environment=NODE_PORT=3001
Type=simple
User=root
ExecStart=/usr/bin/node /opt/nomp/init.js
Restart=on-failure

[Install]
WantedBy=multi-user.target

then, start and enable bitcoind.service:
Code:
systemctl enable --now bitcoind.service

check the service and the debug.log and check if it's online
Code:
service bitcoind status
tail -f ~/.bitcoin/debug.log

then, start and enable nomp.service:
Code:
systemctl enable --now nomp.service

check the service to check if it's online
Code:
service nomp status

At this point, you should be able to restart your server, and the daemon and nomp should start automatically without needing to start screen sessions to run your setup