Guideschevron_rightServers

Servers · 8 min read · Updated

How to Self-Host ComfyUI on a GPU Server

To self-host ComfyUI on a GPU server, install the NVIDIA driver, create a Python environment, install PyTorch for CUDA from PyTorch's own index, clone ComfyUI and install its requirements, then run python main.py. It listens on port 8188 on the server itself; reach it through an SSH tunnel rather than opening it to the internet, put models in models/checkpoints, and run it as a service.

Our GPU Servers

GPU servers for ComfyUI
PlanGPUTotal GPU memorySystem memoryPrice
NVIDIA DGX SparkNVIDIA DGX Spark · 128 GB128 GB128 GB$609.00/mo
AMD EPYC 7443P w/ NVIDIA RTX 3090NVIDIA RTX 3090 · 24 GB24 GB256 GB$659.00/mo
AMD Ryzen 9 9950X w/ NVIDIA RTX 3050NVIDIA RTX 3050 · 6 GB6 GB192 GB$699.00/mo
AMD Ryzen 9 9950X w/ NVIDIA RTX 5090NVIDIA RTX 5090 · 32 GB32 GB64 GB$789.00/mo
AMD Ryzen 9 9950X w/ NVIDIA RTX 5090NVIDIA RTX 5090 · 32 GB32 GB96 GB$829.00/mo
AMD EPYC 7702 w/ 4x NVIDIA RTX 30904× NVIDIA RTX 3090 · 24 GB each96 GB128 GB$929.00/mo
AMD EPYC 7443P w/ 4x NVIDIA V100 16GB4× NVIDIA V100 · 16 GB each64 GB128 GB$1,059.00/mo
AMD EPYC 7443P w/ 4x NVIDIA V100 32GB4× NVIDIA V100 · 32 GB each128 GB128 GB$1,059.00/mo
AMD EPYC 7443P w/ 4x NVIDIA V1004× NVIDIA V100—256 GB$1,189.00/mo
2x NVIDIA DGX Spark2× NVIDIA DGX Spark · 128 GB each256 GB256 GB$1,449.00/mo
AMD EPYC 9B14 w/ 2x NVIDIA RTX 50902× NVIDIA RTX 5090 · 32 GB each64 GB384 GB$2,639.00/mo

1. Install the Driver

Follow installing NVIDIA drivers on Ubuntu Server and check the card with nvidia-smi. ComfyUI asks for PyTorch built for CUDA 13 on NVIDIA 20-series cards and newer, which needs a current driver (the R580 branch or later), so pick the newest -server driver the list offers.

2. Python and PyTorch

ComfyUI's README says Python 3.13 is very well supported. uv installs that Python next to the system one without touching it:

curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.local/bin/env

git clone https://github.com/Comfy-Org/ComfyUI.git ~/ComfyUI
cd ~/ComfyUI
uv venv --python 3.13
source .venv/bin/activate

uv pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130
uv pip install -r requirements.txt

Check PyTorch sees the GPU: python -c "import torch; print(torch.cuda.is_available())" should print True.

3. Add a Model and Start It

Download a checkpoint from the model's official page (Hugging Face hosts most) into models/checkpoints; VAEs go in models/vae and LoRAs in models/loras. Read each model's licence: some do not allow commercial use.

cd ~/ComfyUI
source .venv/bin/activate
python main.py              # listens on 127.0.0.1:8188

From your own computer, open a tunnel and browse to http://localhost:8188:

ssh -L 8188:127.0.0.1:8188 [email protected]

Leave the startup flags alone at first: ComfyUI picks its memory mode by itself, and its README warns that flags people recommend for speed usually make it slower. Use --lowvram only if a model runs out of GPU memory.

4. Run It as a Service

In /etc/systemd/system/comfyui.service, with your own user name:

[Unit]
Description=ComfyUI
After=network-online.target

[Service]
User=you
WorkingDirectory=/home/you/ComfyUI
ExecStart=/home/you/ComfyUI/.venv/bin/python main.py
Restart=on-failure

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now comfyui
journalctl -u comfyui -f

More on unit files in creating a systemd service. For a small team on fixed addresses, WireGuard gives everyone access without a tunnel each time.

Custom Nodes and Updates

Custom nodes extend ComfyUI and are written by many different people. Each one runs as code on your server, so install only those you trust, from their own repositories. Update ComfyUI with git pull and uv pip install -r requirements.txt, and keep PyTorch current: the README asks for an update when yours is more than six months old.

Generated images and models fill disks quickly; see freeing up disk space, and keep anything you want to keep on a storage box.

Common Questions

  • What is ComfyUI?

    A free, open-source app for running image and video generation models, such as Stable Diffusion and Flux, as a graph of nodes in your browser. It runs the models on your own GPU, so prompts and images stay on your server.

  • How much GPU memory does ComfyUI need?

    It depends on the model. ComfyUI's README says it can run even large models on as little as 4 GB of VRAM by offloading to system memory, but more VRAM makes generation much faster. Smaller Stable Diffusion models are comfortable in 8 GB; the newest large image and video models want 16 to 24 GB or more.

  • Is it safe to open ComfyUI to the internet?

    Not directly. ComfyUI has no login, so anyone who reaches the port can use your GPU and install custom nodes, which run code on the server. Keep it on the server itself and reach it through an SSH tunnel or a VPN.

  • Does ComfyUI have an official Docker image?

    No. The supported ways are the desktop app for Windows and macOS and the manual install below, which gives you control over the Python and PyTorch versions.

Plans and prices

GPU Servers

Dedicated servers with NVIDIA GPUs for image and video generation.

See all plans
  • NVIDIA DGX Spark

    NVIDIA DGX Spark · 128 GB GPU

    20 Cores · 128 GB RAM · 4TB NVMe Gen4

    Ogden, UT (UT1) · 50 TB transfer · 10 Gbps

    $609.00/mo

    Sold out
  • AMD EPYC 7443P w/ NVIDIA RTX 3090

    NVIDIA RTX 3090 · 24 GB GPU

    24 Cores · 256 GB RAM · 3.84TB NVMe

    Ogden, UT (UT1) · 100 TB transfer · 10 Gbps

    $659.00/mo

  • AMD Ryzen 9 9950X w/ NVIDIA RTX 3050

    NVIDIA RTX 3050 · 6 GB GPU

    16 Cores · 192 GB RAM · 2x 2 TB NVMe

    Ashburn, VA (ASH1) · Unmetered transfer · 1 Gbps

    $699.00/mo

  • AMD Ryzen 9 9950X w/ NVIDIA RTX 5090

    NVIDIA RTX 5090 · 32 GB GPU

    16 Cores · 64 GB RAM · 3.84TB NVMe Gen4

    Ogden, UT (UT1) · 50 TB transfer · 10 Gbps

    $789.00/mo

Keep Reading

All guides