An open API service indexing awesome lists of open source software.

https://github.com/ts-manuel/monerator

A bash script to create systemd services for Monero P2Pool and XMRig
https://github.com/ts-manuel/monerator

crypto mining monero p2pool xmrig

Last synced: 2 months ago
JSON representation

A bash script to create systemd services for Monero P2Pool and XMRig

Awesome Lists containing this project

README

          

# Monero P2Pool XMRig Setup

![monerator-menu](https://github.com/user-attachments/assets/7f05b4e8-f9bb-4506-99bb-ba69d248e0f1)

Table of Contents


  1. Introduction

  2. Features

  3. Requirements

  4. Installation

  5. Configuration

  6. Usage


    1. Available Commands

    2. Examples

    3. Service Management


  7. Important Notes

  8. Troubleshooting

  9. References

## Introduction

**Monerator** is an automation tool that simplifies the setup of **Monero**, **P2Pool**, and **XMRig** on Linux. It supports x86-64 (desktop) and aarch64 (raspberry pi). Each component can be installed and configured independently with user-editable configuration files located in the `config/` directory, allowing full control over the installation process.

Monerator is compatible with **Ubuntu and Debian-based Linux distributions**.\
Work is based on monerominer by Mik: https://github.com/mik-tf/monerominer

## Features

- Automated installation of:
- Monero daemon
- P2Pool
- XMRig
- Modular design: install only the components you need
- Per-component configuration via editable config files
- Designed for reproducible and customizable setups
- Minimal dependencies, simple execution
- Systemd service integration
- Service management commands
- Mining statistics monitoring

## Requirements

- Monero Wallet Address
- Ubuntu/Debian based system
- Minimum 2GB RAM (4GB+ recommended)
- Multi-core CPU
- Sudo privileges
- Internet connection

To create a new Monero wallet, consult the Monero documentation:
- [GUI Wallet](https://www.getmonero.org/downloads/#gui)
- [CLI Wallet](https://www.getmonero.org/downloads/#cli)

## Installation

```bash
git clone https://github.com/ts-manuel/monerator.git

cd monerator

./monerator install
```

## Configuration

All configuration files are stored in the `config/` directory.

Each component (**Monero**, **P2Pool**, **XMRig**) has its own configuration file, which can be edited by the user before running the installer to customize:
- Installation behavior
- Runtime options
- Network and mining parameters

This allows fine-grained control without modifying the main script.

## Usage

```bash
# From the monarator directory
./monerator [COMMAND]
```

### Available Commands

- `install` - Run installation and setup
- `uninstall` - Remove installed componets
- `start` - Start all mining services
- `stop` - Stop all mining services
- `status` - Show status of all services
- `logs` - Show logs for each componet
- `delete_logs` - Delete lof files
- `help` - Show help message

### Examples

```bash
./monerator install # Run installation and setup
./monerator uninstall # Remove installed componets
./monerator logs # Show logs for each componet
```

### Service Management

The script creates and manages three systemd services:
1. `monerod.service` - Monero blockchain daemon
2. `p2pool.service` - P2Pool mining node
3. `xmrig.service` - CPU mining service

```bash
./monerator start # Start all services
./monerator stop # Stop all services
./monerator status # Check service status
```
## Important Notes

- Ensure your wallet address is correct
- Consider using P2Pool Mini for hashrates < 50 kH/s
- Keep your system updated and secured
- Initial blockchain sync may take several days
- Mining rewards go directly to your wallet
- Use at your own risk

## Troubleshooting

If you encounter issues:
1. Check service status: `./monerator status`
2. View service logs: `journalctl -u [service-name]`
3. Ensure sufficient disk space for blockchain
4. Verify CPU compatibility with RandomX
5. Check mining logs: `./monerator logs`

## References

For more information on Monero and P2Pool:
- [Monero Documentation](https://www.getmonero.org/resources/user-guides/)
- [P2Pool Documentation](https://github.com/SChernykh/p2pool)
- [XMRig Documentation](https://xmrig.com/docs)

This work is based on monerominer by Mik: https://github.com/mik-tf/monerominer

We are not endorsing Monero nor are a partner of Monero. This is for educational purpose only.