---
title: How to Deploy ComfyUI on Vultr Cloud GPU
url: https://docs.vultr.com/how-to-deploy-comfyui-on-vultr-cloud-gpu
description: Learn how to deploy ComfyUI on Vultr Cloud GPU with our step-by-step guide. Get your AI image generation workflow running in the cloud quickly and efficiently.
publish_date: 2024-01-12T15:50:58.272324Z
last_updated: 2026-09-11T16:39:53.185180Z
author: Vishwas Agrawal
header_image: https://assets.vultrdevrel.com/docs-main-doc-assets-1/1735/4cea9730e17650ad.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

## Introduction

ComfyUI is an open-source, node-based application that lets you design, test, and execute diffusion model pipelines using a graphical web interface. ComfyUI runs advanced stable diffusion pipelines using a flowchart interface of interconnected nodes that support checkpoint loading, workflow re-executions, and generation from PNG files.

This article explains how to deploy ComfyUI on a Vultr Cloud GPU server. You will set up all project dependencies, install the ComfyUI Manager to manage models and run ComfyUI as a system service to run diffusion model pipelines on the server.

## Prerequisites

Before you begin:

* Deploy an [NVIDIA A100 Vultr Cloud GPU instance running Ubuntu](https://www.vultr.com/products/cloud-gpu/nvidia-a100/).
* Set up a new [domain **A** record pointing to the server's IP address](https://docs.vultr.com/introduction-to-vultr-dns#2.-create-dns-records). For example, `comfyui.example.com`.
* Access the server [using SSH](https://www.vultr.com/docs/how-to-use-ssh-with-vultr-servers/) as a [non-root sudo user](https://www.vultr.com/docs/how-to-use-sudo-on-a-vultr-cloud-server/). For example, `linuxuser`.
* [Update the server](https://www.vultr.com/docs/how-to-update-a-vultr-cloud-server/).

## Install ComfyUI

Follow the steps below to install ComfyUI in your working directory on the server.

1. Switch to your user home directory.

    ```console
    $ cd
    ```

1. Clone the ComfyUI project repository using Git.

    ```console
    $ git clone https://github.com/comfyanonymous/ComfyUI.git
    ```

1. Switch to the ComfyUI directory.

    ```console
    $ cd ComfyUI
    ```

1. Install the required `PyTorch`, `numpy <2`, and `xformers` dependency packages.

    ```console
    $ sudo pip install "numpy<2" torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 xformers==0.0.29.post3 --extra-index-url https://download.pytorch.org/whl/cu124
    ```

    The above command installs the following packages:

    * **torch**: A machine learning library that provides a flexible and dynamic computational graph for deep learning tasks.
    * **torchvision**: A PyTorch library used for computer vision tasks. It includes utilities for image and video datasets that handle image classification and object detection tasks.
    * **torchaudio**: A PyTorch library used for audio processing tasks. It provides audio loading, transformations, and common audio datasets for deep learning applications.
    * **xformers**: A Python library for implementing transformer-based models and attention mechanisms.

1. Install additional ComfyUI dependencies using the `requirements.txt` file.

    ```console
    $ sudo pip install -r requirements.txt
    ```

1. Switch to the `models/checkpoints` directory.

    ```console
    $ cd models/checkpoints
    ```

1. Open the `put_checkpoints_here` file using a text editor such as `nano`.

    ```console
    $ nano put_checkpoints_here
    ```

1. Add the following contents to the file.

    ```sh
    # Checkpoints
   
    ### SDXL
   
    wget -c https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors -P ./
    #wget -c https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0.safetensors -P ./
   
    # SD1.5
   
    wget -c https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt -P ./
   
    # SD2
   
    #wget -c https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.safetensors -P ./
    #wget -c https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.safetensors -P ./
   
    ```

    Save and close the file.

    The above configuration downloads the Stable Diffusion XL and Stable Diffusion 1.5 models to the ComfyUI `models` directory using the `wget` utility. Modify the file to include new model checkpoint URLs from sources such as Hugging Face to enable in ComfyUI.

1. Run the file using `bash` to download the specified models.

    ```console
    $ bash put_checkpoints_here
    ```

    Output:

    ```
    --2026-08-04 12:00:01--  https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors
    Resolving huggingface.co (huggingface.co)... 3.163.189.90
    Connecting to huggingface.co (huggingface.co)|3.163.189.90|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 6938040706 (6.5G) [binary/octet-stream]
    Saving to: './sd_xl_base_1.0.safetensors'

    sd_xl_base_1.0.safetensors   100%[==============================>]   6.46G   255MB/s    in 26s

    2026-08-04 12:00:27 (255 MB/s) - './sd_xl_base_1.0.safetensors' saved [6938040706/6938040706]

    --2026-08-04 12:00:27--  https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt
    Resolving huggingface.co (huggingface.co)... 3.163.189.90
    Connecting to huggingface.co (huggingface.co)|3.163.189.90|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 4265380512 (4.0G) [binary/octet-stream]
    Saving to: './v1-5-pruned-emaonly.ckpt'

    v1-5-pruned-emaonly.ckpt     100%[==============================>]   3.97G   248MB/s    in 17s

    2026-08-04 12:00:44 (245 MB/s) - './v1-5-pruned-emaonly.ckpt' saved [4265380512/4265380512]
    ```

1. Switch to your user home directory.

    ```console
    $ cd
    ```

1. Move the `ComfyUI` project directory to a system-wide location such as `/opt`.

    ```console
    $ sudo mv ComfyUI /opt
    ```

## Set Up ComfyUI as a System Service

Follow the steps below to set up ComfyUI as a system service to automatically run and manage the application's processes on your server.

1. Create a new `comfyui.service` system service file.

    ```console
    $ sudo nano /etc/systemd/system/comfyui.service
    ```

1. Add the following configurations to the file. Replace `/opt/ComfyUI` with your actual ComfyUI project directory path.

    ```ini
    [Unit]
    Description=ComfyUI System Service
    After=network.target
   
    [Service]
    WorkingDirectory=/opt/ComfyUI
    ExecStart=python3 main.py
   
    [Install]
    WantedBy=multi-user.target
    ```

    Save and close the file.

    The above configuration creates a new `comfyui` system service to manage the ComfyUI application processes on the server.

1. Restart the systemd daemon to apply the new service changes.

    ```console
    $ sudo systemctl daemon-reload
    ```

1. Enable the ComfyUI system service.

    ```console
    $ sudo systemctl enable comfyui
    ```

1. Start the ComfyUI service.

    ```console
    $ sudo systemctl start comfyui
    ```

1. View the ComfyUI service status and verify that it's active.

    ```console
    $ sudo systemctl status comfyui
    ```

## Configure Nginx as a Reverse Proxy to Access ComfyUI

ComfyUI listens for connection requests on the localhost port `8188` by default unless you set a specific IP address and port using the `--listen` option. Set up a reverse proxy such as Nginx to forward all incoming connection requests to the backend port `8188` to enable access to the ComfyUI interface. Follow the steps below to install and configure Nginx to forward HTTP requests to the ComfyUI interface using your `comfyui.example.com` domain.

1. Install Nginx.

    ```console
    $ sudo apt install nginx -y
    ```

1. Create a new `comfyui.conf` Nginx virtual host configuration in the `sites-available` directory.

    ```console
    $ sudo nano /etc/nginx/sites-available/comfyui.conf
    ```

1. Add the following configurations to the file. Replace `comfyui.example.com` with your actual domain.

    ```nginx
    upstream backend {
        server 127.0.0.1:8188;
    }

    server {

        listen 80;
        listen [::]:80;

        server_name comfyui.example.com;

        proxy_set_header Host $host;
        proxy_http_version 1.1;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
        proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
        proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";

        location / {
            proxy_pass http://backend$request_uri;
        }
    }
    ```

    Save and close the file.

1. Link the configuration file to the `sites-enabled` directory to activate it.

    ```console
    $ sudo ln -s /etc/nginx/sites-available/comfyui.conf /etc/nginx/sites-enabled/
    ```

1. Test the Nginx configuration for errors.

    ```console
    $ sudo nginx -t
    ```

    Output:

    ```
    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /etc/nginx/nginx.conf test is successful
    ```

1. Restart Nginx to apply the configuration changes.

    ```console
    $ sudo systemctl restart nginx
    ```

## Security

Uncomplicated Firewall (UFW) is active on Vultr Ubuntu servers by default. Follow the steps below to enable connections to the HTTP port `80`, and the HTTPS port `443` through the firewall configuration to enable access to the ComfyUI interface.

1. View the UFW status to verify that the firewall is active on your server.

    ```console
    $ sudo ufw status
    ```

    Allow SSH connections on port `22` and enable UFW if the firewall status is `inactive`.

    ```console
    $ sudo ufw allow 22/tcp && sudo ufw enable 
    ```

1. Allow network connections to the HTTP port `80`.

    ```console
    $ sudo ufw allow 80/tcp
    ```

1. Allow connections to the HTTPS port `443`.

    ```console
    $ sudo ufw allow 443/tcp
    ```

1. Reload the UFW configuration to apply the firewall changes.

    ```console
    $ sudo ufw reload
    ```

### Secure ComfyUI with Let's Encrypt SSL Certificates

SSL certificates encrypt network connections between a user's web browser and the server. Generate SSL certificates using a trusted certificate authority such as Let's Encrypt to secure network connections to the server using HTTPS. Follow the steps to install the Certbot Let's Encrypt client and generate trusted SSL certificates to secure the ComfyUI interface.

1. Install the Certbot Let's Encrypt client tool using Snap.

    ```console
    $ sudo snap install --classic certbot
    ```

1. Generate a new SSL certificate using your domain. Replace `comfyui.example.com` and `user@example.com` with your actual domain and active email address respectively.

    ```console
    $ sudo certbot --nginx -d comfyui.example.com -m user@example.com --agree-tos
    ```

1. Test the Certbot automatic SSL certificate renewal process.

    ```console
    $ sudo certbot renew --dry-run
    ```

    Certbot auto-renews your SSL certificate every 90 days before expiry if the above command is successful.

## Generate Images using ComfyUI

ComfyUI is actively running as a system service on your server and accessible using the `comfyui.example.com` domain defined in your Nginx configuration. Follow the steps below to set up the default nodes and generate images using ComfyUI.

1. Visit your domain using a web browser such as Chrome to access the ComfyUI interface.

    ```
    https://comfyui.example.com
    ```

    ![Image of ComfyUI default view](https://assets.vultrdevrel.com/docs-main-doc-assets-1/1735/a7f09fc3951ab4d7.png)

    ComfyUI uses the text-to-image workflow by default. Click **Load Default** in the floating menu to switch to the default workflow in case of unintended changes.

1. Click the **Load Checkpoint** node dropdown to select a diffusion model. For example, select the `Stable Diffusion XL` model.

    ![Image of selecting a model](https://assets.vultrdevrel.com/docs-main-doc-assets-1/1735/f3e450a851def6ec.png)

1. Navigate to the **Prompt** node, and enter a positive prompt such as `beautiful scenery nature glass bottle landscape, purple galaxy bottle,`. Enter a negative prompt in the respective node such as `text,watermark`.

    ![Image of prompt and negative prompt node](https://assets.vultrdevrel.com/docs-main-doc-assets-1/1735/1ac35e48df3d50ca.png)

1. Click **Queue Prompt** on the main floating menu to generate a new image.
1. Wait for the image generation process to complete and view your generated image in the **Save Image** node.

    ![Image of queue section and generate image node](https://assets.vultrdevrel.com/docs-main-doc-assets-1/1735/d2e67c49574f234f.png)

### Enable ComfyUI Manager

ComfyUI manager is an add-on tool that provides a user-friendly interface to install and manage custom nodes or models. Follow the steps below to install and enable the ComfyUI manager tool.

1. Switch to the ComfyUI project directory.

    ```console
    $ cd /opt/ComfyUI
    ```

1. Stop the ComfyUI system service.

    ```console
    $ sudo systemctl stop comfyui
    ```

1. Switch to the `custom_nodes` directory.

    ```console
    $ cd custom_nodes
    ```

1. Clone the ComfyUI manager repository using Git.

    ```console
    $ git clone https://github.com/ltdrdata/ComfyUI-Manager.git
    ```

1. Start the ComfyUI system service.

    ```console
    $ sudo systemctl start comfyui
    ```

1. Access the ComfyUI interface in your web browser.

    ```
    https://comfyui.example.com
    ```

1. Verify and click the new `Manager` option on the floating menu.

    ![Access the ComfyUI Manager](https://assets.vultrdevrel.com/docs-main-doc-assets-1/1735/46616fd89dbc12d7.png)

1. Verify that the ComfyUI manager interface loads correctly.

    ![Access the ComfyUI Manager Interface](https://assets.vultrdevrel.com/docs-main-doc-assets-1/1735/26c23be3dcc4e6ac.png)

1. Click `Install Custom Nodes` or `Install Models` to install additional nodes and models to enable in ComfyUI.

    ![Install Custom nodes in ComfyUI Manager](https://assets.vultrdevrel.com/docs-main-doc-assets-1/1735/e22803b553aa313f.png)

## Common ComfyUI Nodes

ComfyUI nodes are modular units that form a workflow and perform specific image generation functionalities. Each ComfyUI node processes input data and passes the output to the next node for further processing in a workflow. This modular approach enables you to create diverse image generation workflows and test multiple configurations to generate high-quality results. The following are the most common node types you can use in your ComfyUI workflows.

* **Input nodes**: Export data to other nodes, such as images, text prompts, and random numbers.
* **Processing nodes**: Manipulate the data provided by input nodes, such as resizing images, applying filters, and generating prompts.
* **Output nodes**: Save results from the image generation process, such as saving images to disk or displaying them in a preview window.
* **Load Checkpoint**: Loads a pre-trained diffusion model in ComfyUI.
* **CLIP Encode**: Encodes text prompts into CLIP embeddings.
* **Prompt Node**: Provides text prompts to the model.
* **Negative Prompt Node**: Provides negative prompts to the model to guide the image generation process.
* **VAE Encode**: Converts images to latent representations.
* **VAE Decode**: Converts latent representations to images.
* **Random Seed Node**: Generates random seeds for Image generation samplers.
* **Empty Latent Image Node**: Creates a blank latent image of a specified size for use in other image generation nodes.
* **Scale Node**: Scales images to a desired size.
* **Save image Node**: Saves generated images to disk.
* **Preview Node**: Displays generated images in a preview window.

## Conclusion

You have deployed ComfyUI on a Vultr Cloud GPU server and generated images using the ComfyUI web interface. In addition, you installed the ComfyUI Manager to enable new nodes and models. For more information and configuration options, please visit the [ComfyUI community documentation](https://blenderneko.github.io/ComfyUI-docs/).
