How to let grin miner run in the server background?

I turned on SSH and after running grin miner for a while, it was always disconnected.
I donot know if there is a command to let grin miner run in the server background.

su - user -c “screen -S grinm -d -m firejail --seccomp /home/username/grin-miner/grin-miner”
su - user -c “screen -S grinm -d -m /home/username/grin-miner/grin-miner”
above: run as root from rc.local f.e.

simple screen:
screen -S grinm
cd ~/grin-miner/ ; ./grin-miner
put to background:
Ctrl-A D
reconnect with:
screen -r grinm
screen -ls

root@abcde-1:~# su - user -c “screen -s grinm -d -m /home/abcde/grin-miner/grin-miner”

it appears:
su: invalid option – ‘d’

Please use “”. The screen command is between"". Please it’s better to start with simple usage before going with auto start.

  1. Ssh to server.

  2. start screen.
    $ screen -S screenname

  3. when in screen start miner.
    $ /bla/bla/grin-miner

  4. put screen to background.
    Ctrl-a d

  5. check.
    $ screen -ls

  6. attach screen.
    $ screen -r screenname

1 Like

Thank you very much!

Any advice on how to make grin-miner autostart using ‘screen’ utility when system boots?

My way to start at boot is:


  • su - LinuxUsername -c “screen -S grinm -d -m firejail --seccomp /home/LinuxUsername/Downloads/bminer/bminer -uri cuckaroo29://”
  • It’s the bminer on EU Grinmint pool
  • absolute path …
  • it works without firejail, ‘firejail --seccomp’ part is not needed but I use it by default

Command is started from next shell:

  • /usr/local/bin/ (shell script is called

Shell looks like this and can be executed (chmod +x):

su - LinuxUsername -c “screen -S grinm -d -m firejail --seccomp /home/LinuxUsername/Downloads/bminer/bminer -uri cuckaroo29://”
exit 0

And the rc.local is used to trigger the at boot time (only two lines are listed, it’s longer …):


I found a way that is much simpler.

You can just create the file /etc/rc.local and make it executable, then put this in it:

screen -dmS grinminer /home/rabinovitch/grin-miner-v1.0.2/grin-miner

That’s all. ubuntu 18.04.