Ethereum mining has long been a popular entry point into the world of cryptocurrency for tech-savvy enthusiasts. While Ethereum has transitioned to a proof-of-stake model, understanding how to build and configure a GPU mining rig remains valuable for those interested in alternative proof-of-work blockchains or historical context. This comprehensive guide walks you through constructing a high-performance mining rig using NVIDIA graphics cards and the Ubuntu Server LTS operating system.
By leveraging open-source software and general-purpose computing, your rig can be easily maintained, upgraded, and even repurposed for other compute-intensive tasks like machine learning—especially if you're using NVIDIA GPUs with CUDA support.
Why Choose Ubuntu for Ethereum Mining?
Before diving into hardware and setup, it's worth considering why Ubuntu Server LTS is a strong choice for mining rigs. Unlike specialized mining OSes such as ethOS or consumer-focused Windows, Ubuntu offers:
- Full control over system updates and security patches
- Compatibility with a wide range of software tools
- Flexibility to switch to other workloads (e.g., AI training, rendering)
- Strong community and documentation support
This makes Ubuntu an ideal long-term platform, especially if mining profitability fluctuates.
👉 Discover how blockchain technology is evolving beyond mining
Step 1: Selecting the Right Hardware
Building a mining rig starts with selecting compatible and efficient components. Below is a recommended parts list for a 6-GPU setup using NVIDIA cards. While specific models may vary in availability, this configuration serves as a solid foundation.
Core Components
- Processor: Intel Pentium G4400 (Dual-Core, 3.3 GHz) – sufficient for managing GPU operations without unnecessary overhead.
- Motherboard: MSI Z170A SLI Plus – supports multiple PCIe slots and includes BIOS settings optimized for cryptocurrency mining.
- Memory: 4GB DDR4 RAM – adequate for headless mining operations.
- Storage: 275GB SSD – fast boot times and reliable performance for the OS and mining software.
- Graphics Cards: EVGA GeForce GTX 1070 FTW2 (x6) – powerful yet power-efficient for Ethash algorithm mining.
- Riser Cables: PCI-E to USB 3.0 risers (5-pack) – allow vertical mounting of GPUs and better airflow.
- Power Supply: 1275W 80+ Platinum – ensures stable power delivery under load.
- Frame: Open-air aluminum mining frame – promotes cooling and easy access.
- Cooling: 120mm case fans (5-pack) – maintain optimal temperatures during continuous operation.
Power and Compatibility Tips
- Ensure total GPU power draw stays below 80% of PSU capacity to avoid overloading.
- Use dual 8-pin PCIe power adapters if your GPUs require more than one connector.
- Confirm your motherboard supports multiple GPUs via PCIe lanes. Enable "Above 4G Decoding" in BIOS to allow full memory access for all cards.
Step 2: Assembling the Mining Rig
Careful assembly ensures stability, cooling efficiency, and ease of troubleshooting.
Frame and Base Setup
Begin by assembling the aluminum frame. Secure the motherboard tray and ensure all standoffs are properly placed to prevent short circuits.
Mounting Key Components
- Install the CPU, RAM, and heatsink onto the motherboard before securing it to the frame.
- Attach the SSD using SATA or M.2 connections.
- Mount the power supply at the designated spot and connect the 24-pin ATX and 8-pin EPS power cables to the motherboard.
GPU Installation
- Position each graphics card on the frame’s support brackets.
- Connect each GPU to a riser card using the PCIe slot.
- Insert riser daughterboards into the motherboard’s PCIe slots.
- Link each riser card to its daughterboard via USB 3.0 cable.
- Connect PCIe power cables directly from the PSU to each GPU.
Ensure all risers are securely fastened and powered. Poor connections here are a common cause of undetected GPUs.
👉 Learn how to maximize your digital asset potential today
Step 3: Installing Ubuntu and Mining Software
With hardware assembled, it’s time to install the operating system and configure mining software.
Preparing the BIOS
- Enter BIOS (usually by pressing
DeleteorF2at boot). - Update BIOS to the latest version for improved stability.
- Enable Above 4G Memory/Resizing under PCI settings.
- Set primary display output to Integrated Graphics (IGD) if available.
- Save settings and reboot.
Installing Ubuntu Server LTS
- Boot from USB with Ubuntu Server ISO.
- At the GRUB menu, edit the boot line and add:
nouveau.modeset=0
This prevents conflicts with the open-source NVIDIA driver. - Proceed with standard installation—set up user, network, and disk partitioning.
- Reboot after installation and reapply
nouveau.modeset=0in GRUB.
Verifying GPU Detection
Run:
lspci | grep -i vgaEnsure all six GPUs appear. If not:
- Check power and riser connections
- Test individual risers
- Swap USB cables between risers
Installing NVIDIA Drivers on Ubuntu
To maximize GPU performance, use NVIDIA’s proprietary drivers compiled for your kernel.
Step-by-Step Driver Installation
Install build tools:
sudo apt install gcc g++ makeDownload and compile GCC 7.4 (matching kernel build environment):
cd /opt sudo wget https://ftp.gnu.org/gnu/gcc/gcc-7.4.0/gcc-7.4.0.tar.xz sudo tar xJf gcc-7.4.0.tar.xz cd gcc-7.4.0 ./contrib/download_prerequisites mkdir build && cd build ../configure --disable-multilib --enable-checking=release make -j2 && sudo make installEnable source repositories in
/etc/apt/sources.list:deb-src http://archive.ubuntu.com/ubuntu bionic main restrictedInstall kernel headers and source:
sudo apt update sudo apt install dpkg-dev libssl-dev apt source linux-image-unsigned-$(uname -r)Prepare kernel source directory:
cd /usr/src/linux-4.15.0 cp /boot/config-$(uname -r) .config cp /usr/src/linux-headers-$(uname -r)/Module.symvers ./ make oldconfig && make prepare && make modules_prepareEdit
utsrelease.hto match your kernel version:#define UTS_RELEASE "4.15.0-55-generic"Download NVIDIA driver (e.g.,
NVIDIA-Linux-x86_64-430.14.run) and install:sudo chmod +x NVIDIA-Linux-x86_64-430.14.run sudo CC=/usr/local/bin/gcc ./NVIDIA-Linux-x86_64-430.14.run --kernel-source-path=/usr/src/linux-4.15.0Blacklist Nouveau driver:
Create/etc/modprobe.d/blacklist-nouveau.conf:blacklist nouveau options nouveau modeset=0Then run:
sudo update-initramfs -uReboot and verify:
nvidia-smiAll GPUs should now appear with driver status.
Setting Up the Mining Software
We’ll use ethminer, a popular open-source Ethereum miner.
Installation Steps
Download from GitHub:
wget https://github.com/ethereum-mining/ethminer/releases/download/v0.17.1/ethminer-0.17.1-linux-x86_64.tar.gz tar xzf ethminer-0.17.1-linux-x86_64.tar.gz sudo cp ethminer-0.17.1-linux-x86_64/bin/ethminer /usr/bin/Test stability:
ethminer -U -M 1Watch for crashes—this reveals power or thermal issues.
Create a systemd service file
/etc/systemd/system/eth-miner.service:[Unit] Description=Mine Ether [Service] Environment=GPU_FORCE_64BIT_PTR=0 Environment=GPU_MAX_HEAP_SIZE=100 Environment=GPU_USE_SYNC_OBJECTS=1 Environment=GPU_MAX_ALLOC_PERCENT=100 Environment=DISPLAY=:0 Environment=XAUTHORITY=/home/youruser/.Xauthority WorkingDirectory=/home/youruser ExecStart=/bin/bash --login -c "ethminer -U --farm-recheck 200 -P stratum1+ssl://[email protected]:5555" Restart=always [Install] WantedBy=multi-user.targetEnable and start the service:
sudo systemctl daemon-reload sudo systemctl enable eth-miner.service sudo service eth-miner startMonitor logs:
journalctl -u eth-miner.service -f
After 5–10 minutes, your hashrate should appear on Ethermine dashboard.
Frequently Asked Questions (FAQ)
Q: Can I use AMD GPUs instead of NVIDIA?
A: Yes, but driver setup differs significantly—use amdgpu-pro drivers and adjust mining parameters accordingly.
Q: Why does my rig reboot during stress tests?
A: Likely due to insufficient PSU wattage or unstable power delivery. Check connections and consider upgrading your PSU.
Q: Is Ubuntu better than ethOS for mining?
A: Ubuntu offers more flexibility and long-term usability, while ethOS is optimized purely for mining performance.
Q: Can I repurpose my rig after mining?
A: Absolutely—especially with NVIDIA GPUs, you can shift to machine learning, rendering, or distributed computing projects.
Q: How do I monitor temperatures remotely?
A: Use tools like nvtop, htop, or set up Prometheus/Grafana dashboards over SSH.
Q: What happens if mining becomes unprofitable?
A: You can switch algorithms or cryptocurrencies, or reconfigure the rig for other GPU-intensive applications.
👉 Explore next-generation crypto platforms built for performance
This guide covers core principles applicable beyond Ethereum, including GPU optimization, system stability, and efficient resource management—essential skills in today’s decentralized computing landscape.