LocalHake

Tutorial

Install ComfyUI on Ubuntu Server 24.04

A quick guide on getting ComfyUI set up on Ubuntu Server 24.04 using CUDA 13 and PyTorch 2.9 with an NVIDIA GPU.

Hake HardwarePublished Updated ~3 minintermediate

This post contains paid links (affiliate) — how that works.


▶ Watch this build on YouTube
Contents

Install ComfyUI on Ubuntu Server 24.04

Install the NVIDIA drivers

Warning: Secure Boot MUST be turned off in BIOS

Update your system:

text
sudo apt update && sudo apt upgrade -y

Add NVIDIA PPA

text
sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt update

Check for available drivers

text
ubuntu-drivers devices

Install drivers (I usually choose the "recommended" option)

text
sudo apt install nvidia-driver-<DRIVER VERSION>

Reboot

text
sudo reboot now

Install Dependencies

The following should be installed:

text
sudo apt install python3.12 python3.12-venv python3-pip git build-essential libgl1 libglib2.0-0 -y

Install ComfyUI

Clone the repo (I usually just clone it to my home folder)

text
git clone https://github.com/comfyanonymous/ComfyUI.git

Enter the folder

text
cd ComfyUI

Create a virtual environment

text
python3.12 -m venv venv

Enter the virtual environment

text
source venv/bin/activate

Now install PyTorch

text
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130

Now install the requirements

text
pip install -r requirements.txt

This will install ComfyUI.

Run ComfyUI

To start ComfyUI run:

text
python main.py --listen 0.0.0.0

Now on a separate computer, navigate to the IP of the PC running ComfyUI with port 8188

text
http://192.168.10.4:8188/

And that's it!

Gear used