Self-host Stable Diffusion WebUI with Levelrail
A browser interface for generating and editing images with Stable Diffusion checkpoints.
- AuthorAUTOMATIC1111
- LicenceAGPL-3.0
- Memory8 GiB
- Services1
How to self-host Stable Diffusion WebUI
-
Pull the images
One image is pulled on your server.
Show images
ghcr.io/ai-dock/stable-diffusion-webui:latest-cuda
-
Create the app
One service starts in a single Compose app, with 1 named volume mount for your data, on port 7860.
-
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.
Stable Diffusion WebUI requirements
- Memory
- About 8 GiB
- Architectures
- amd64 image published, arm64 not available
- Ports
- 7860
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- AGPL-3.0, network copyleft (agpl) license
- 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 7860 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 Stable Diffusion WebUI. 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 Stable Diffusion WebUI docs page.
Deploy Stable Diffusion WebUI your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy Stable Diffusion WebUI from the CLI
levelrail-cli templates deploy stable-diffusion-webui --name my-stable-diffusion-webui Deploy Stable Diffusion WebUI with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/stable-diffusion-webui/deploy Stable Diffusion WebUI configuration
Stable Diffusion WebUI services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| sd-webui | ghcr.io/ai-dock/stable-diffusion-webui:latest-cuda | 7860 | sd_webui_workspace -> /workspace |
Stable Diffusion WebUI environment variables
| Variable | Service | Value |
|---|---|---|
| WEB_ENABLE_AUTH | sd-webui | Preset by the template |
| WEB_PASSWORD | sd-webui | Generated at deploy |
| WEB_USER | sd-webui | Preset by the template |
Ports and volumes
- Ports
- 7860
- Volumes
- 1 named mount: sd_webui_workspace -> /workspace
Stable Diffusion WebUI FAQ
How much memory does Stable Diffusion WebUI need?
The catalog lists about 8 GiB of memory for Stable Diffusion WebUI.
Does Stable Diffusion WebUI run on arm64?
For Stable Diffusion WebUI, amd64 only, no arm64 image; amd64 is image published.
What licence is Stable Diffusion WebUI under?
Stable Diffusion WebUI is licensed under AGPL-3.0, which is network copyleft, so source sharing also applies when it is offered as a hosted service.
Does Stable Diffusion WebUI need configuration before it starts?
No. The template fills in its own defaults and generates secrets at deploy time.
Which ports does Stable Diffusion WebUI use?
Stable Diffusion WebUI listens on port 7860 inside the stack.
Where does Stable Diffusion WebUI keep its data?
In a named volume: sd_webui_workspace mounted at /workspace.
Can I deploy Stable Diffusion WebUI 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 Stable Diffusion WebUI, 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/stable-diffusion-webui:latest-cuda is what you deploy there.