Published 2024-08-18, last updated 2024-11-13
This guide provides a concise overview for setting up and managing hardware to host on Vast.ai, a platform that enables users to rent out their computing resources for AI tasks. This guide will walk you through the essential steps—from initial setup and configuration to optimizing performance and ensuring security. Perfect for both beginners and experienced users, it aims to help you maximize your hardware's earning potential.
Install
Download the
Ubuntu 22.04 Server image
You can create a bootable memory stick using
Balena Etcher, which lets you install Ubuntu 22.04 Server.
Install Ubuntu server
Under the installation, make sure you do:
- Include SSH Server
- Select custom disk layout
- Create partition 100G ext4 /
- Create partition 512mb fat32 /boot
- Create partition rest of disk xfs leave unmounted
Set timezone
sudo timedatectl set-timezone America/Toronto
Find the timezones
Update system
sudo apt update && sudo apt upgrade -y
Install required packages
sudo apt update && sudo apt install -y build-essential libglvnd-dev pkg-config lm-sensors smartmontools htop iftop fio lshw dmidecode vim hdparm net-tools cron parted dialog apt-utils libpci-dev python2.7 netcat curl iputils-ping dnsutils
Block nvidia-nouveau
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo update-initramfs -u
reboot
Install nvidia-drivers
wget https://us.download.nvidia.com/XFree86/Linux-x86_64/550.78/NVIDIA-Linux-x86_64-550.78.run
sudo bash NVIDIA-Linux-x86_64-550.78.run
OR
sudo apt install nvidia-driver-550-server
reboot
Find latest Nvidia driver
Mount XFS partition
Get your XFS partition UUID with the command:
lsblk -o +uuid,name,fstype
Create the directory where to mount the XFS partition:
sudo mkdir /var/lib/docker
Edit fstab to tell system to mount the XFS partition on boot:
sudo vi /etc/fstab
Put the following line and replace the UUID with your own at the end of fstab:
UUID=252e8d10-c72e-4e59-af75-d5e72ba1084c /var/lib/docker xfs rw,auto,pquota 0 0
Install Vast
wget https://console.vast.ai/install -O install; sudo python3 install your_api_key; history -d $((HISTCMD-1));
Your API key
Full install commando
Statistics
To determine competitive pricing for offering your GPUs, check out
500.farm and
WovenVideo. These resources provide insights into current market rates and can help you set a fair price for your hardware.
NVML error
wget -O fix-nvml-error.py https://raw.githubusercontent.com/Bo26fhmC5M/vast-tools/main/fix-nvml-error.py
sudo python3 fix-nvml-error.py
Automatically updates
If you want to disable automatically updates, you can run the following command:
sudo apt purge -y --auto-remove unattended-upgrades && sudo systemctl disable apt-daily-upgrade.timer; sudo systemctl mask apt-daily-upgrade.service ; sudo systemctl disable apt-daily.timer; sudo systemctl mask apt-daily.service && sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Backup
Command to show your machine ID:
cat /var/lib/vastai_kaalia/machine_id && printf '\n'
To restore your old machine ID:
echo -n "your_id_here" > /var/lib/vastai_kaalia/machine_id
Payments
Each payment period runs from Saturday at 00:00 UTC to Friday at 23:59 UTC. If you have earned more than $20 and have set up a payment method on the Earnings page, a pending payment date will be displayed.
jjziets vast tools
It's also worth checking out Jjziets Vast Tools. It's a great site with a lot of guides, information, and problem-solving tips!
jjziets vast tools
Conclusion
This guide has equipped you with the fundamental knowledge to effectively set up and manage your hardware for hosting on Vast.ai. By following the steps outlined, you can optimize your resources and generate income while supporting the AI community. As technology and best practices evolve, we will continue to expand and update this guide with new insights and recommendations. Be sure to check back regularly for the latest information and tips to keep your setup running smoothly and efficiently.
I am an experienced IT professional with a deep passion for technology, beginning with hands-on PC building at a young age. Over the years, I have developed expertise across multiple platforms, including Windows, Linux, and macOS. I hold certifications in networking and IP telephony, and I have spent several years providing technical support across diverse environments. My recent experience includes working for Simplemining support and hosting GPU servers on Vast since 2023.
The creator/owner of Hashrate.no goes by the alias r0ver2. Has a long experience with GPU mining and mining in general. After starting with home mining in 2017, slowly building up the mining operation while gaining experience and knowledge - he joined SimpleMining's support team in 2020. Also been an active supporter of mmpOS since 2021 - and part of the testing team for lolMiner since mid-2021.