├── README.md ├── eth-miner.service └── eth-proxy.service /README.md: -------------------------------------------------------------------------------- 1 | # EthereumSystemd 2 | Scripts to auto launch a proxied ethereum miner on boot with Systemd 3 | 4 | 5 | ### Setup 6 | 7 | - Install and configure Eth-Proxy: https://github.com/Atrides/eth-proxy 8 | 9 | - Place or symlink the `*.service` files into `/etc/systemd/system` 10 | - Configure `eth-proxy.serivce` with the location of eth-proxy 11 | - Configure `eth-miner.serivce` with your username and name of miner: 12 | 13 | WorkingDirectory=/home/your-username/ 14 | ExecStart=/bin/bash --login -c "ethminer -G --farm-recheck 200 -F http://127.0.0.1:8080/Name-of-rig-here" 15 | - encourage Systemd to see the new files: `sudo systemctl daemon-reload` 16 | - tail the logs in another tab: `sudo journalctl -f` 17 | - Start proxy: `sudo systemctl start eth-proxy.service` 18 | - Start miner: `sudo systemctl start eth-miner.service` 19 | 20 | Services also respond to `stop` 21 | 22 | ### View logs 23 | 24 | All logs go to Journal, to tail the logs run: `sudo journalctl -f` 25 | -------------------------------------------------------------------------------- /eth-miner.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Mine Ether 3 | 4 | [Service] 5 | Environment=GPU_FORCE_64BIT_PTR=0 6 | Environment=GPU_MAX_HEAP_SIZE=100 7 | Environment=GPU_USE_SYNC_OBJECTS=1 8 | Environment=GPU_MAX_ALLOC_PERCENT=100 9 | Environment=GPU_SINGLE_ALLOC_PERCENT=100 10 | 11 | Environment=DISPLAY=:0 12 | Environment=XAUTHORITY=/home/YOURUSERNAME/.Xauthority 13 | 14 | WorkingDirectory=/home/YOURUSERNAME/ 15 | ExecStart=/bin/bash --login -c "ethminer -G --farm-recheck 200 -F http://127.0.0.1:8080/NAMEOFTHISRIG" 16 | 17 | Restart=always 18 | 19 | [Install] 20 | WantedBy=multi-user.target 21 | -------------------------------------------------------------------------------- /eth-proxy.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Ether Proxy 3 | 4 | [Service] 5 | WorkingDirectory=/home/YOURUSERNAME/bin/eth-proxy 6 | ExecStart=/bin/bash --login -c "python eth-proxy.py" 7 | 8 | Restart=always 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | --------------------------------------------------------------------------------