Market Cap: $2.219T -3.80%
Volume(24h): $129.2422B -1.59%
Fear & Greed Index:

23 - Extreme Fear

  • Market Cap: $2.219T -3.80%
  • Volume(24h): $129.2422B -1.59%
  • Fear & Greed Index:
  • Market Cap: $2.219T -3.80%
Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos
Top Cryptospedia

Select Language

Select Language

Select Currency

Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos

How to set up a mining rig on Linux? (Ubuntu Guide)

Please provide the article you'd like me to reference—I don’t see it in your message. Once you share it, I’ll craft a concise, ~155-character sentence based on its content.

Mar 19, 2026 at 08:00 pm

System Requirements and Hardware Selection

1. A modern 64-bit x86_64 CPU with at least four physical cores is recommended for stable background operations.

2. Minimum RAM requirement stands at 8 GB, though 16 GB ensures smoother concurrent mining and system responsiveness.

3. GPU selection heavily depends on the target cryptocurrency—NVIDIA cards with CUDA support dominate in Ethash-based coins, while AMD cards often deliver better power efficiency for newer algorithms like KawPow.

4. A reliable ATX power supply unit rated at least 80 PLUS Bronze with sufficient PCIe power connectors is essential to avoid instability under load.

5. Storage should be SSD-based; a 120 GB drive suffices for OS and miner binaries, but larger capacity helps when caching DAG files or running multiple instances.

Ubuntu Installation and Base Configuration

1. Download the latest LTS version of Ubuntu Server (e.g., 22.04 or 24.04) and create a bootable USB using dd or balenaEtcher.

2. During installation, disable swap partition creation and opt for manual partitioning to allocate root (/) and /home separately.

3. After reboot, update the system immediately: sudo apt update && sudo apt upgrade -y.

4. Install essential build tools: sudo apt install build-essential git curl wget unzip htop lm-sensors -y.

5. Configure automatic security updates and disable unnecessary services like bluetooth and avahi-daemon to reduce attack surface.

GPU Driver and CUDA Setup

1. For NVIDIA GPUs, add the official graphics drivers PPA: sudo add-apt-repository ppa:graphics-drivers/ppa.

2. Identify the optimal driver version using ubuntu-drivers devices, then install it with sudo apt install nvidia-driver-535 (or equivalent).

3. Reboot and verify with nvidia-smi; the output must show GPU name, temperature, and compute capability.

4. For CUDA-enabled miners, download the appropriate CUDA toolkit from NVIDIA’s archive and install via .deb local package method to avoid conflicts with system packages.

5. Set environment variables in ~/.bashrc: export PATH=/usr/local/cuda/bin:$PATH and export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH.

Miner Software Installation and Configuration

1. Choose a miner based on algorithm compatibility—T-Rex Miner for Ethash, GMiner for BeamHash III, or TeamRedMiner for AMD GPUs.

2. Download the latest release binary directly from the official GitHub repository and extract it into /opt/miners/trex.

3. Create a dedicated user miner with no login shell and assign ownership of miner directories to that user.

4. Write a systemd service file at /etc/systemd/system/miner.service defining restart policies, GPU affinity, and environment flags like CUDA_VISIBLE_DEVICES=0,1.

5. Enable and start the service: sudo systemctl daemon-reload && sudo systemctl enable miner.service && sudo systemctl start miner.service.

Monitoring and Stability Tuning

1. Use nvidia-settings -q gpucoretemp and sensors to monitor thermal headroom across all components.

2. Adjust GPU clocks and memory offsets using nvidia-smi -lgc 1200 -lmc 1000 to balance hashrate and stability.

3. Log miner output to rotating files via systemd journal settings and rotate logs weekly using logrotate rules.

4. Deploy Prometheus + Node Exporter + Grafana stack locally to visualize uptime, fan speed, power draw, and rejected shares over time.

5. Implement watchdog logic through a simple bash script checking systemctl is-active miner.service every five minutes and triggering restart if inactive.

Frequently Asked Questions

Q: Can I run both CPU and GPU mining simultaneously on the same Ubuntu machine?A: Yes, but CPU mining competes for memory bandwidth and thermal headroom; it is rarely profitable unless targeting Scrypt-N or RandomX coins with low-intensity configurations.

Q: Why does my miner crash after DAG generation completes?A: This usually indicates insufficient VRAM or mismatched driver-miner version compatibility—verify GPU memory size against current DAG size and match miner build against CUDA version.

Q: Is it safe to overclock GPUs via software on Ubuntu without BIOS-level changes?A: Yes, tools like nvidia-settings and amdgpu-pro allow runtime adjustments, though persistent settings require configuration in Xorg or systemd services.

Q: How do I prevent automatic kernel updates from breaking NVIDIA drivers?A: Hold the kernel package using sudo apt-mark hold linux-image-generic or use DKMS to rebuild modules automatically post-update.

Disclaimer:info@kdj.com

The information provided is not trading advice. kdj.com does not assume any responsibility for any investments made based on the information provided in this article. Cryptocurrencies are highly volatile and it is highly recommended that you invest with caution after thorough research!

If you believe that the content used on this website infringes your copyright, please contact us immediately (info@kdj.com) and we will delete it promptly.

Related knowledge

See all articles

User not found or password invalid

Your input is correct