xmrig-proxy
xmrig-proxy copied to clipboard
Autorun at system startup.
The operating system on my VPS is Ubuntu 18.04.6 LTS. I downloaded xmrig-proxy and config.json to the /home/username folder. I run the command "./xmrig-proxy" The proxy works, everything is fine. A couple of times a month, the VPS reboots itself, respectively, the proxy needs to be started manually. How do I add xmrig-proxy to autorun when the OS boots, and not when the user logs in?
https://github.com/xmrig/xmrig-proxy/issues/236#issuecomment-413425260 you can do many things, but the best choice is probably a systemd service
I create with the command
sudo nano /lib/systemd/system/xmrig-proxy.service
record:
[Unit]
Description=XMRIG
After=network.target
[Service]
Type=simple
ExecStart=/home/username/xmrig-proxy
Restart=always
[Install]
WantedBy=multi-user.target
I give this entry chmod 755 (rwxr-xr-x)
Next command:
sudo systemctl is-enabled xmrig-proxy.service
and launch
sudo systemctl start xmrig-proxy.service
Command:
systemctl list-unit-files | grep xmrig
Shows:
xmrig-proxy.service enabled
I check with the htop command, there is no xmrig proxy among the processes and the connection from the home computer is also not going.
I understand that the error is in some small thing, but I can't find it. I am still poorly versed in linux, can you tell me where the error may be?
Are you running on a privileged port? If so you may need to make an exception...
Are you running on a privileged port? If so you may need to make an exception...
No, not on a privileged port. My ports are 5555 and 8888