Xmrig Config
#
Xmrig Configuration Documentation for Monero Mining
This documentation provides a detailed explanation of how your system is configured for mining Monero using `xmrig`xmrig. It includes descriptions of both the systemd service file and the configuration specifics.
##
Systemd Service File
###
Overview
The systemd service file orchestrates the execution of `xmrig`xmrig in a tmux session. This setup ensures that the miner runs continuously, even if the terminal or user logs out, by leveraging tmux's capabilities.
###
File Details
```ini
[Unit]
Description=Xmrig
[Service]
User=poslop
Type=forking
ExecStart=/usr/bin/tmux new -s xmrig -d 'sudo /usr/bin/xmrig/xmrig'
RemainAfterExit=true
ExecStop=tmux send-keys -t xmrig C-c
[Install]
WantedBy=multi-user.target
```
Explanation
-
Unit Section
####Description=: Provides a human-readable description of the service.Xmrig`Xmrig
Explanation- **Unit Section**- ` -
Service Section
-User=: Specifies that the service runs under the userposlop`poslop`poslop`poslop.Type=: Indicates that the service forks into the background, which is typical for services managed by systemd.forking`forkingExecStart=/usr/bin/tmux new -s xmrig -d 'sudo /usr/bin/xmrig/xmrig':`
- Launches a new tmux session named
`xmrig`xmrig. - Detaches it (
`-) to run in the background.d`d - Executes
`xmrig`xmrigusing`sudo`sudo, ensuring necessary permissions are granted.
----- Launches a new tmux session named
RemainAfterExit=: Ensures that the service is marked as active even after the main process exits, which is useful for tmux sessions.true`trueExecStop=tmux send-keys -t xmrig C-: Sends a "Ctrl-C" to gracefully stop thec`c`xmrig`xmrigprocess within its tmux session.
**Service Section**- `- `- ``- ` -
Install Section
-WantedBy=multi-user.: Specifies that this service should be started at boot time when the system is in a multi-user mode.target`target
**Install Section**- `##
Xmrig Configuration
###
Config File Location
The configuration for `xmrig`xmrig is stored in:
```
/usr/bin/xmrig/config.json
```
This JSON file contains various settings specific to your mining operation, such as algorithm type, pool information, and performance tuning parameters.
###
Connection Details
-
- **Pool NodeConnection**Connection:- Uses
`p2pool`p2pool, a decentralized mining pool.
--** - Uses
-
Node
Address**Address:- Host: The service connects to the server named
`pas`pasvia`tailscale.VPN`VPN - Port:
`3333`3333 - If remote,
`tailscalefacilitates secure access; if local, it usesVPN`VPN`localhost`localhost.
---### - Host: The service connects to the server named
Summary
This configuration ensures that `xmrig`xmrig runs effectively in a dedicated tmux session under the user `poslop`poslop, connected securely to your chosen mining pool. The systemd service management provides robustness and automatic recovery on boot or after logouts.
This setup is optimized for continuous Monero mining operations, leveraging both system-level services and network configurations for secure, efficient operation.