Monero Logo

How to Compile Monero from Source

Introduction

Compiling Monero from source allows you to build the Monero node software tailored to your needs. This process ensures you are using the latest version of the software and can be useful for developers or those who prefer a custom setup.

Prerequisites

Before you begin, ensure you have the following prerequisites:

Step-by-Step Compilation Guide

1. Install Dependencies

First, install the necessary dependencies. On Ubuntu/Debian, use the following commands:

sudo apt-get update
sudo apt-get install -y build-essential cmake libboost-all-dev libssl-dev libunbound-dev libminiupnpc-dev \
libunwind-dev liblzma-dev libp11-kit-dev

2. Clone the Monero Repository

Clone the Monero source code from the official GitHub repository:

git clone https://github.com/monero-project/monero.git
cd monero

3. Build the Project

Create a build directory and run CMake to configure the build:

mkdir build
cd build
cmake ..

Compile the source code using the make command. Adjust the number of parallel jobs according to your CPU:

make -j$(nproc)

This will compile the Monero binaries. The `-j$(nproc)` option utilizes all available CPU cores for faster compilation.

4. Install Monero

Optionally, you can install Monero to your system:

sudo make install

5. Run Monero

After successful compilation and installation, you can start the Monero daemon:

monerod

The daemon will start syncing with the Monero blockchain. Follow the Monero documentation for further configuration and usage instructions.

Troubleshooting

If you encounter issues during compilation, check the following:

Additional Resources

For more detailed information, refer to the official Monero documentation and developer guides: