xmrig-proxy icon indicating copy to clipboard operation
xmrig-proxy copied to clipboard

Autorun at system startup.

Open paolosezart opened this issue 2 years ago • 4 comments

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?

paolosezart avatar Apr 28 '22 20:04 paolosezart

https://github.com/xmrig/xmrig-proxy/issues/236#issuecomment-413425260 you can do many things, but the best choice is probably a systemd service

Technetium1 avatar Apr 28 '22 21:04 Technetium1

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?

paolosezart avatar Apr 28 '22 22:04 paolosezart

Are you running on a privileged port? If so you may need to make an exception...

Technetium1 avatar Apr 29 '22 00:04 Technetium1

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

paolosezart avatar Apr 29 '22 11:04 paolosezart