Self-host ComfyUI with Levelrail
A node-graph editor for building and running Stable Diffusion and other image generation pipelines.
- Memory8 GiB
- Services1
How to self-host ComfyUI
-
Pull the images
One image is pulled on your server.
Show images
ghcr.io/ai-dock/comfyui:latest-cuda
-
Create the app
One service starts in a single Compose app, with 1 named volume mount for your data, on port 8188.
-
Fill in the secrets
1 secret is generated and stored encrypted, 2 settings are preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
ComfyUI requirements
- Memory
- About 8 GiB
- Architectures
- amd64 image published, arm64 not available
- Ports
- 8188
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- not yet recorded
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
- GPU. It needs an NVIDIA GPU on the node to be practical.
- Host ports. It publishes port 8188 on the host, so open them in the VPS firewall only if you want that.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then ComfyUI. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the ComfyUI docs page.
Deploy ComfyUI your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy ComfyUI from the CLI
levelrail-cli templates deploy comfyui --name my-comfyui Deploy ComfyUI with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/comfyui/deploy ComfyUI configuration
ComfyUI services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| comfyui | ghcr.io/ai-dock/comfyui:latest-cuda | 8188 | comfyui_workspace -> /workspace |
ComfyUI environment variables
| Variable | Service | Value |
|---|---|---|
| WEB_ENABLE_AUTH | comfyui | Preset by the template |
| WEB_PASSWORD | comfyui | Generated at deploy |
| WEB_USER | comfyui | Preset by the template |
Ports and volumes
- Ports
- 8188
- Volumes
- 1 named mount: comfyui_workspace -> /workspace
ComfyUI FAQ
How much memory does ComfyUI need?
The catalog lists about 8 GiB of memory for ComfyUI.
Does ComfyUI run on arm64?
For ComfyUI, amd64 only, no arm64 image; amd64 is image published.
Does ComfyUI need configuration before it starts?
No. The template fills in its own defaults and generates secrets at deploy time.
Which ports does ComfyUI use?
ComfyUI listens on port 8188 inside the stack.
Where does ComfyUI keep its data?
In a named volume: comfyui_workspace mounted at /workspace.
Can I deploy ComfyUI on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for ComfyUI, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image ghcr.io/ai-dock/comfyui:latest-cuda is what you deploy there.