Install ComfyUI on Ubuntu Server 24.04

Install the NVIDIA drivers
Secure Boot MUST be turned off in BIOS
Update your system:
sudo apt update && sudo apt upgrade -yAdd NVIDIA PPA
sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt updateCheck for available drivers
ubuntu-drivers devicesInstall drivers (I usually choose the “recommended” option)
sudo apt install nvidia-driver-<DRIVER VERSION>Reboot
sudo reboot nowInstall Dependencies
The following should be installed:
sudo apt install python3.12 python3.12-venv python3-pip git build-essential libgl1 libglib2.0-0 -yInstall ComfyUI
Clone the repo (I usually just clone it to my home folder)
git clone https://github.com/comfyanonymous/ComfyUI.gitEnter the folder
cd ComfyUICreate a virtual environment
python3.12 -m venv venvEnter the virtual environment
source venv/bin/activateNow install PyTorch
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130Now install the requirements
pip install -r requirements.txtThis will install ComfyUI.
Run ComfyUI
To start ComfyUI run:
python main.py --listen 0.0.0.0Now on a separate computer, navigate to the IP of the PC running ComfyUI with port 8188
http://192.168.10.4:8188/And that’s it!
Last updated on