How to Install Stable Diffusion WebUI (AUTOMATIC1111) on Ubuntu 24.04
Self-hosting Stable Diffusion on your own GPU VPS gives you an unmetered, uncensored, fully customizable image-generation studio. No monthly subscription caps, no content filters that reject legitimate prompts, no usage dashboards watching every generation. This guide walks you through installing AUTOMATIC1111's Stable Diffusion WebUI on an Ubuntu 24.04 GPU VPS -- from NVIDIA driver setup through production-hardened Nginx deployment serving SDXL, SD 1.5, LoRAs, ControlNet, and the extension ecosystem.
Need a GPU-capable VPS? The CloudCore Business plan starts at EUR 29.99/month and is the baseline recommendation for comfortable SDXL workflows. Browse GPU VPS plans before you begin.
Table of Contents
What is Stable Diffusion WebUI?
Stable Diffusion WebUI -- commonly called AUTOMATIC1111 after its maintainer -- is the most widely adopted browser-based frontend for the Stable Diffusion family of open-source image-generation models. It wraps the underlying PyTorch diffusion pipelines in a Gradio interface that exposes txt2img, img2img, inpainting, outpainting, upscaling, model merging, batch generation, X/Y/Z plot comparisons, script-based workflows, and a REST API.
The WebUI's strength is its extension ecosystem. Through the built-in extension manager you can add ControlNet (pose, depth, edge, and reference-image guidance), ADetailer (automatic face and hand fixing), Roop and ReActor (face swapping), Regional Prompter (per-region conditioning), Dynamic Prompts (wildcard prompt templates), Civitai Helper (one-click model imports), and hundreds of other community tools. Because everything runs on your own GPU, there are no per-image costs and no restrictions on how you chain generations together.
The model ecosystem is enormous. The base Stability AI checkpoints -- Stable Diffusion 1.5, SD 2.1, SDXL 1.0, SDXL Turbo, and Stable Diffusion 3 -- are the foundation, but the community has trained thousands of derivative checkpoints on Civitai and Hugging Face for every conceivable style: photorealism (Juggernaut XL, RealVisXL, epiCRealism), anime (Animagine XL, Pony Diffusion, NAI derivatives), architecture, product photography, fantasy illustration, and so on. LoRA adapters (small fine-tuned weight deltas) let you mix styles and subjects on top of any base checkpoint for a few hundred megabytes of disk each.
Typical self-hosted use cases include marketing asset generation, product mockups, concept art for games and films, book-cover illustration, interior-design visualization, training-data generation for downstream ML pipelines, and personal creative projects where commercial APIs either refuse to generate the content or price it out of reach.
Why Self-Host vs Midjourney, DALL-E, and Leonardo
Hosted services are convenient, but they come with structural limits that a self-hosted WebUI eliminates entirely.
- Unlimited generation volume. Midjourney's $30/month Standard plan caps you at roughly 15 hours of "fast" GPU time, after which you are throttled. DALL-E via ChatGPT Plus enforces a message cap. Leonardo's paid tiers meter "tokens" per image. A GPU VPS generates 24/7 at a flat monthly cost -- you can run overnight batch jobs of 10,000 images without a single extra charge.
- Complete prompt freedom. Hosted services apply aggressive content filters that regularly reject prompts for medical illustration, historical events, horror art, fashion with reduced clothing, or even common brand names. Self-hosted Stable Diffusion has no such gatekeeping -- you decide what is acceptable for your project within the bounds of local law.
- Full model library access. Midjourney runs one proprietary model. DALL-E 3 runs one proprietary model. Leonardo offers a curated handful. With AUTOMATIC1111 you can swap between SDXL, SD 1.5, Pony, Flux (via extensions), and any fine-tune from Civitai in seconds, stack multiple LoRAs per generation, and merge checkpoints yourself.
- Workflow control. ControlNet, inpainting masks, regional prompting, prompt scheduling, ADetailer pipelines, custom samplers, and script-based batch jobs are either absent or heavily simplified in hosted tools. AUTOMATIC1111 exposes every knob.
- Data privacy. Your prompts, source images, and generated outputs never leave your server. Relevant for product design, client work under NDA, and anything involving faces of real people.
- Resale and commercial freedom. The base Stable Diffusion models are released under permissive licenses. Generated images are yours to use commercially, including as part of client deliverables, without the subscription-dependent licensing that Midjourney and Leonardo impose.
Cost Comparison: Hosted Services vs Self-Hosted SDXL
| Scenario | Midjourney Standard | DALL-E 3 (API) | Leonardo Artisan | Self-Hosted SDXL (GPU VPS) |
|---|---|---|---|---|
| Monthly cost | $30/mo | ~$0.04/image | $30/mo | From EUR 29.99/mo |
| Daily image cap | ~200 (fast hours) | Pay per image | ~8,500 tokens | Unlimited |
| NSFW / unfiltered | No | No | Partial | Yes |
| Custom models / LoRAs | No | No | Limited | Yes (thousands) |
| ControlNet / inpainting | No / limited | No | Partial | Full |
| API access | Limited | Yes (paid) | Yes (paid) | Free, built-in |
| Data stays private | No | No | No | Yes |
| Typical cost at 5,000 images/mo | $60+ (throttled) | ~$200 | $60+ (capped) | EUR 29.99 flat |
Prerequisites
Before you begin, make sure you have:
- A GPU VPS running Ubuntu 24.04 LTS with root or sudo access
- SSH access to your server
- An NVIDIA GPU with at least 8 GB of VRAM (12 GB+ strongly recommended for SDXL)
- At least 40 GB of free disk space for the WebUI, Python environment, and a handful of checkpoints
- 16 GB+ of system RAM so model loading does not thrash swap
Recommended Plan: CloudCore Business>
For comfortable SDXL generation, ControlNet workflows, and extension-heavy pipelines, we recommend the CloudCore Business plan:>
- NVIDIA GPU with 12-24 GB VRAM
- 8+ vCPU cores
- 24+ GB RAM
- 200+ GB NVMe SSD
- Unmetered bandwidth
- From EUR 29.99/month>
This gives you headroom for SDXL at 1024x1024 with ControlNet and ADetailer active simultaneously, plus disk space for a growing model library.
Connect to your server via SSH:
ssh root@your-server-ipStep 1: Update the System
Start with a fully patched system so kernel modules and driver packages resolve cleanly.
sudo apt update && sudo apt upgrade -yIf the kernel was updated, reboot before continuing:
sudo rebootInstall the build tools and libraries AUTOMATIC1111 needs to compile its Python extensions and run image I/O:
sudo apt install -y \
build-essential git curl wget \
libgl1 libglib2.0-0 \
libsm6 libxrender1 libxext6 \
ffmpeg pkg-config \
software-properties-common ca-certificatesStep 2: Install NVIDIA Drivers and CUDA 12
Stable Diffusion relies on PyTorch's CUDA build, which in turn needs a matching NVIDIA driver. AUTOMATIC1111's bundled PyTorch 2.1+ targets CUDA 12.1, so install a driver in the 535+ series (550 is the current recommended branch).
Install the recommended driver:
sudo apt install -y ubuntu-drivers-common
sudo ubuntu-drivers installReboot to load the kernel module:
sudo rebootReconnect via SSH, then verify the driver and GPU:
nvidia-smiExpected output (abbreviated):
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| 0 NVIDIA RTX A5000 Off | 00000000:00:05.0 Off | Off |
| N/A 35C P8 16W / 230W | 0MiB / 24564MiB | 0% Default |
+-----------------------------------------+------------------------+----------------------+The CUDA Version: 12.4 in the header reflects the maximum CUDA runtime the driver supports, not an installed toolkit. PyTorch ships its own CUDA runtime libraries, so you do not strictly need nvidia-cuda-toolkit. Install it only if you plan to compile custom CUDA kernels or extensions such as xformers from source:
sudo apt install -y nvidia-cuda-toolkit
nvcc --versionStep 3: Install Python 3.10 and Build Dependencies
Ubuntu 24.04 ships Python 3.12 by default, but AUTOMATIC1111 is officially tested against Python 3.10. Using 3.12 will cause dependency-resolution errors at first launch. Add the deadsnakes PPA and install Python 3.10 side-by-side:
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update
sudo apt install -y python3.10 python3.10-venv python3.10-devVerify:
python3.10 --versionExpected output:
Python 3.10.14Do not set 3.10 as the system default -- leave Ubuntu's 3.12 alone and call python3.10 explicitly for the WebUI.
Step 4: Create a Dedicated User
Running the WebUI under a dedicated non-root user is good hygiene: it limits the blast radius of any extension or custom script pulled from the internet.
sudo adduser --system --group --home /opt/sdwebui --shell /bin/bash sdwebui
sudo -u sdwebui -H bash -c 'cd && pwd'All remaining commands run as the sdwebui user:
sudo -iu sdwebuiStep 5: Clone AUTOMATIC1111 and First Launch
Clone the repository into the sdwebui home directory:
cd /opt/sdwebui
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webuiThe repository includes webui.sh, a launcher that creates a venv/, installs PyTorch and all requirements, and starts Gradio. On first run it downloads several gigabytes of Python wheels, so give it time.
Before the first run, edit webui-user.sh to pin the Python interpreter and set default launch flags:
nano webui-user.shSet these values (leave the other lines commented):
python_cmd="python3.10"
export COMMANDLINE_ARGS="--listen --api --xformers --enable-insecure-extension-access"Run the first launch:
./webui.shExpected output (abbreviated):
################################################################
Install script for stable-diffusion-webui
################################################################
Create and activate python venv
Installing torch and torchvision
...
Installing xformers
...
Launching Web UI with arguments: --listen --api --xformers --enable-insecure-extension-access
Running on local URL: http://0.0.0.0:7860Open http://your-server-ip:7860 in a browser to confirm Gradio is up. Then stop the process with Ctrl+C -- we will return shortly after downloading models.
What the Flags Do
--listen-- Bind Gradio to0.0.0.0so the server is reachable from outside the VPS. Without this it binds to127.0.0.1and you cannot reach it.--api-- Enable the/sdapi/v1/*REST API. Required for programmatic generation and tools like SD.Next, ComfyUI bridges, and Discord bots.--xformers-- Use thexformersattention kernels. Cuts VRAM usage by 20-40% on SDXL and speeds up generation.--medvram-- Add this if you have 8 GB VRAM and want to run SDXL. It offloads model components between CPU and GPU on demand at a small speed cost.--lowvram-- For 6 GB VRAM. Heavy offloading, noticeably slower, but makes SDXL viable.--enable-insecure-extension-access-- Required when running behind a reverse proxy with--listen, otherwise the extension manager refuses to install.
Step 6: Download Model Checkpoints
Checkpoints are the model weights that define the style and capability of every generation. They live in models/Stable-diffusion/ and can be several gigabytes each.
Download SDXL 1.0 base and refiner (recommended for photorealism and high-resolution output):
cd /opt/sdwebui/stable-diffusion-webui/models/Stable-diffusionwget -O sd_xl_base_1.0.safetensors \ https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors
wget -O sd_xl_refiner_1.0.safetensors \ https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0.safetensors
Download Stable Diffusion 1.5 (still widely used because thousands of LoRAs and ControlNet models target it):
wget -O v1-5-pruned-emaonly.safetensors \
https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensorsFor curated fine-tunes, browse Civitai and download .safetensors files into the same directory. Popular starting points:
| Checkpoint | Base | Strength | Typical Use |
|---|---|---|---|
| Juggernaut XL | SDXL | Photorealism, cinematic lighting | Product, portraits, marketing |
| RealVisXL V4 | SDXL | Photography realism | Commercial photography mockups |
| DreamShaper XL | SDXL | Versatile illustration | Concept art, book covers |
| Animagine XL | SDXL | Anime | Character art |
| epiCRealism | SD 1.5 | Photo realism on low VRAM | 8 GB GPU builds |
| Pony Diffusion V6 | SDXL | Stylized characters | Illustration, mascots |
Step 7: Add LoRAs, Embeddings, and VAEs
LoRAs are compact fine-tunes (50-400 MB each) that modify a base checkpoint's style or inject a subject. Drop them into models/Lora/ and invoke them in prompts with <lora:filename:0.8>.
mkdir -p /opt/sdwebui/stable-diffusion-webui/models/Lora cd /opt/sdwebui/stable-diffusion-webui/models/LoraExample: place a downloaded LoRA from Civitai here
wget -O my-style-lora.safetensors "https://civitai.com/api/download/models/XXXXX"
Textual inversion embeddings (small files, typically under 1 MB) go in embeddings/. Invoke them by filename in prompts. Common negative embeddings like easynegative and bad-hands-5 ship as embeddings.
VAEs (variational autoencoders) refine color and detail rendering. Drop them in models/VAE/. For SDXL, the baked-in VAE is usually fine; for SD 1.5 the vae-ft-mse-840000-ema-pruned.safetensors VAE is a common upgrade:
mkdir -p /opt/sdwebui/stable-diffusion-webui/models/VAE
cd /opt/sdwebui/stable-diffusion-webui/models/VAE
wget -O vae-ft-mse-840000-ema-pruned.safetensors \
https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensorsSelect the VAE in Settings -> VAE -> SD VAE.
Step 8: Install Extensions
Extensions extend the WebUI with entire workflows. Install them through Extensions -> Install from URL in the browser UI, or clone them manually into extensions/.
ControlNet -- Pose, Depth, and Structural Guidance
ControlNet lets you condition generation on an input image's pose, edges, depth map, or reference colors.
cd /opt/sdwebui/stable-diffusion-webui/extensions
git clone https://github.com/Mikubill/sd-webui-controlnet.gitDownload ControlNet model files (large, one-time):
mkdir -p /opt/sdwebui/stable-diffusion-webui/extensions/sd-webui-controlnet/models
cd /opt/sdwebui/stable-diffusion-webui/extensions/sd-webui-controlnet/modelsSDXL ControlNet models (pick the ones you need):
wget https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/diffusers_xl_canny_full.safetensors
wget https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/diffusers_xl_depth_full.safetensors
wget https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/thibaud_xl_openpose.safetensorsADetailer -- Automatic Face and Hand Fixing
ADetailer auto-detects faces and hands in every generation and runs a dedicated inpainting pass on them -- the single biggest quality improvement for any portrait workflow.
cd /opt/sdwebui/stable-diffusion-webui/extensions
git clone https://github.com/Bing-su/adetailer.gitRoop -- Face Swap
Roop (and its more actively maintained fork ReActor) swaps a target face into generated images. Useful for character consistency and avatar work.
cd /opt/sdwebui/stable-diffusion-webui/extensions
git clone https://github.com/Gourieff/sd-webui-reactor.gitOther High-Value Extensions
# Civitai Helper -- one-click model imports with previews
git clone https://github.com/butaixianran/Stable-Diffusion-Webui-Civitai-Helper.gitDynamic Prompts -- wildcard prompt templates
git clone https://github.com/adieyal/sd-dynamic-prompts.gitRegional Prompter -- per-region conditioning
git clone https://github.com/hako-mikan/sd-webui-regional-prompter.gitUltimate SD Upscale -- tiled upscaling beyond VRAM limits
git clone https://github.com/Coyote-A/ultimate-upscale-for-automatic1111.gitRestart the WebUI after installing extensions so they register their tabs and scripts. The full extension catalog is browsable in the WebUI under Extensions -> Available -> Load from, and documentation for every built-in feature lives on the AUTOMATIC1111 wiki.
Step 9: Configure Command-Line Flags
webui-user.sh is the canonical place to set launch arguments. A production configuration for a 12-24 GB GPU looks like this:
nano /opt/sdwebui/stable-diffusion-webui/webui-user.shpython_cmd="python3.10"
export COMMANDLINE_ARGS="--listen --port 7860 --api --xformers --enable-insecure-extension-access --no-half-vae --opt-channelslast"
export TORCH_COMMAND="pip install torch==2.1.2 torchvision==0.16.2 --extra-index-url https://download.pytorch.org/whl/cu121"Flag reference for common VRAM tiers:
| VRAM | Recommended Flags | Notes |
|---|---|---|
| 24 GB+ | --xformers --opt-channelslast | Full-speed SDXL, large batches |
| 12-16 GB | --xformers --medvram-sdxl | SDXL comfortable, SD 1.5 fast |
| 8-10 GB | --xformers --medvram | SDXL viable, SD 1.5 fast |
| 6 GB | --xformers --lowvram | SD 1.5 primary, SDXL slow |
| 4 GB | --xformers --lowvram --always-batch-cond-uncond | SD 1.5 only, 512x512 |
--no-half-vae-- Fixes black images with some SDXL checkpoints.--api-auth user:password-- HTTP basic auth on the REST API.--gradio-auth user:password-- HTTP basic auth on the browser UI (alternative to Nginx auth).--ckpt-dir /mnt/models/Stable-diffusion-- Use an external disk for checkpoints.--no-download-sd-model-- Skip the automatic SD 1.5 download if you already have checkpoints in place.
Step 10: Create a systemd Service
Running the WebUI under systemd keeps it alive across reboots, captures logs in journalctl, and restarts it automatically on crash.
Exit the sdwebui shell back to your sudo-capable user:
exitCreate the service unit:
sudo tee /etc/systemd/system/sdwebui.service > /dev/null <<'EOF' [Unit] Description=Stable Diffusion WebUI (AUTOMATIC1111) After=network-online.target Wants=network-online.target[Service] Type=simple User=sdwebui Group=sdwebui WorkingDirectory=/opt/sdwebui/stable-diffusion-webui ExecStart=/opt/sdwebui/stable-diffusion-webui/webui.sh Restart=on-failure RestartSec=10 TimeoutStopSec=30
Resource limits
LimitNOFILE=65536Environment
Environment="HOME=/opt/sdwebui" Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
[Install] WantedBy=multi-user.target EOF
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable --now sdwebui
sudo systemctl status sdwebuiExpected output:
● sdwebui.service - Stable Diffusion WebUI (AUTOMATIC1111)
Loaded: loaded (/etc/systemd/system/sdwebui.service; enabled; preset: enabled)
Active: active (running) since Thu 2026-04-16 12:00:00 UTC; 30s ago
Main PID: 4512 (webui.sh)Tail the startup logs:
sudo journalctl -u sdwebui -fFirst-start is slow -- PyTorch downloads and model loading can take 2-5 minutes. Subsequent starts usually complete in 30-60 seconds.
Step 11: Nginx Reverse Proxy with Basic Auth and TLS
Exposing port 7860 directly to the public internet is a bad idea. Gradio's default has no authentication, and the extension manager (with --enable-insecure-extension-access) will happily install code from any URL. Put it behind Nginx with HTTP basic auth and a Let's Encrypt certificate.
Install Nginx and the htpasswd utility:
sudo apt install -y nginx apache2-utils certbot python3-certbot-nginxCreate the auth file:
sudo htpasswd -c /etc/nginx/.sdwebui-htpasswd sduserCreate the site config:
sudo tee /etc/nginx/sites-available/sdwebui > /dev/null <<'EOF' server { listen 80; server_name sd.yourdomain.com; return 301 https://$host$request_uri; }server { listen 443 ssl http2; server_name sd.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/sd.yourdomain.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/sd.yourdomain.com/privkey.pem;
# Security headers add_header X-Content-Type-Options nosniff; add_header X-Frame-Options SAMEORIGIN; add_header Referrer-Policy strict-origin-when-cross-origin;
# Large uploads for img2img and ControlNet reference images client_max_body_size 100m;
# Long-running generations need extended timeouts proxy_read_timeout 1800s; proxy_send_timeout 1800s; proxy_connect_timeout 60s;
location / { auth_basic "Stable Diffusion WebUI"; auth_basic_user_file /etc/nginx/.sdwebui-htpasswd;
proxy_pass http://127.0.0.1:7860; proxy_http_version 1.1; proxy_set_header Host $host; 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;
# Gradio WebSocket upgrade proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
# Streaming responses must not be buffered proxy_buffering off; } } EOF
Enable the site, obtain a certificate, and reload:
sudo ln -s /etc/nginx/sites-available/sdwebui /etc/nginx/sites-enabled/
sudo nginx -t
sudo certbot --nginx -d sd.yourdomain.com
sudo systemctl reload nginxBecause Gradio uses WebSockets for progress streaming, the Upgrade and Connection headers above are mandatory -- without them, generations appear to hang.
Finally, block direct access to port 7860 from the public internet:
sudo ufw allow OpenSSH
sudo ufw allow 'Nginx Full'
sudo ufw deny 7860
sudo ufw enableYou can now reach the WebUI at https://sd.yourdomain.com/ with your basic-auth credentials, and the REST API at https://sd.yourdomain.com/sdapi/v1/.
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
CUDA out of memory on SDXL | 8-12 GB VRAM too tight for default settings | Add --medvram-sdxl to COMMANDLINE_ARGS, drop resolution to 1024x1024, reduce batch size to 1, disable hires fix. |
| Black images with SDXL | fp16 VAE overflow | Add --no-half-vae to COMMANDLINE_ARGS. |
RuntimeError: Torch is not able to use GPU | Driver/PyTorch mismatch | Reinstall driver 550+, delete venv/, re-run webui.sh to rebuild PyTorch. |
ModuleNotFoundError after extension install | Extension missing requirements | Restart service so its install.py runs: sudo systemctl restart sdwebui. |
| Gradio stuck on "Loading..." through Nginx | Missing WebSocket headers | Ensure Upgrade / Connection headers are set in the Nginx config. |
| WebUI not accessible at all | --listen missing | Edit webui-user.sh, add --listen, restart the service. |
| Python 3.12 errors at launch | Wrong Python version | Verify python_cmd="python3.10" is set and python3.10 is on PATH. |
| xformers fails to build | Toolchain or CUDA mismatch | Drop --xformers; PyTorch 2.1+ has native SDPA attention that is almost as fast. |
| Extensions tab blocked behind proxy | Default security rule | Ensure --enable-insecure-extension-access is in COMMANDLINE_ARGS. |
sudo journalctl -u sdwebui -fFAQ
Can I run Stable Diffusion WebUI without a GPU?
Technically yes -- add --use-cpu all --no-half to COMMANDLINE_ARGS and it will run on CPU. In practice this is unusable for real work: a single 512x512 SD 1.5 image takes 2-5 minutes on a 6 vCPU VPS, and a 1024x1024 SDXL image takes 15-30 minutes. Any serious image workflow needs a GPU. The CloudCore Business plan is our recommended entry point for GPU-backed Stable Diffusion.
How much VRAM do I need for SDXL?
The bare minimum is 8 GB VRAM with --medvram-sdxl and a batch size of 1, which produces 1024x1024 images in roughly 30-45 seconds per image. 12 GB (RTX 3060, A2000) is comfortable. 16-24 GB (RTX 4080, A4000, A5000) lets you run SDXL plus ControlNet plus ADetailer simultaneously at full speed. For SD 1.5 workloads, 6 GB is enough and 8 GB feels fast.
What is the difference between SD 1.5 and SDXL?
SD 1.5 is the 2022 model optimized for 512x512 generation. It is faster, needs less VRAM, and has the largest ecosystem of LoRAs and ControlNet adapters. SDXL (2023) is roughly 3x larger, targets 1024x1024 natively, produces much higher quality faces and text rendering, and handles complex prompts more reliably. Most professional workflows today are SDXL-first, with SD 1.5 kept around for niche LoRAs and ControlNet models that have not been ported. Keep both installed -- they each take about 7 GB of disk for the base checkpoint.
How is AUTOMATIC1111 different from ComfyUI?
AUTOMATIC1111 is a tab-based WebUI with form inputs for txt2img, img2img, inpainting, and so on. It is the easiest entry point and has the largest extension ecosystem. ComfyUI is a node-graph workflow editor where you wire up samplers, conditioning, and post-processing as a directed graph. ComfyUI is faster for SDXL, more flexible for complex multi-stage pipelines, and preferred by power users. Many practitioners run both on the same server. See our companion guide: How to Install ComfyUI on Ubuntu.
Is self-generated AI imagery legal to use commercially?
The base Stable Diffusion 1.5, SDXL, and Stable Diffusion 3 models are released under the CreativeML Open RAIL-M license (or permissive variants), which allows commercial use with a short list of prohibited use cases. Most Civitai fine-tunes carry the same or more permissive licenses, but individual checkpoints and LoRAs may restrict commercial use -- always check each model page. Generated images themselves are not currently protected by copyright in the United States if they are purely AI-generated (the Copyright Office requires meaningful human authorship), though this does not prevent you from using them in marketing, client deliverables, or products.
Can I expose the API for my application to call?
Yes. The --api flag enables /sdapi/v1/txt2img, /sdapi/v1/img2img, /sdapi/v1/controlnet/*, and dozens of other endpoints documented at https://sd.yourdomain.com/docs. Protect the API with either --api-auth user:password (Gradio level) or the Nginx basic auth we configured in Step 11. For high-throughput production calls, consider pairing AUTOMATIC1111 with a queue like Redis + a worker script, or graduate to a production-grade inference server -- see our vLLM install guide for the text-generation equivalent pattern.
How does image generation pair with self-hosted LLMs?
Many teams combine an image-generation server with a text LLM to produce complete content pipelines: an LLM rewrites rough prompts into detailed Stable Diffusion prompts, generates alt text, or chooses which LoRA to invoke. Install Ollama on the same or a separate VPS, then script the two together through their REST APIs. On a single-GPU box you can time-slice the two, or keep the LLM on CPU (via Ollama's CPU fallback) while the GPU is reserved for Stable Diffusion.
Next Steps
You now have a production-ready Stable Diffusion WebUI behind TLS and basic auth. Consider these follow-ups to get more out of your setup:
- Install ComfyUI side-by-side -- Many workflows are easier to build as node graphs. Install it on port 8188 and keep AUTOMATIC1111 on 7860. Start with our ComfyUI install guide.
- Add a text LLM -- Pair image generation with self-hosted language models. See our Ollama guide for the easy path, or vLLM for high-throughput production serving.
- Automate model downloads with Civitai Helper -- Paste any Civitai URL into the helper tab and it pulls the checkpoint, preview image, and metadata automatically.
- Schedule batch jobs -- Write a small Python script against the
/sdapi/v1/txt2imgendpoint to run prompt variations overnight. With unlimited generation, you can explore parameter sweeps of thousands of images at no extra cost.
- Read the wiki -- The AUTOMATIC1111 wiki documents every flag, sampler, and built-in feature. The "Features" and "Optimizations" pages are especially valuable for getting the most out of your GPU.
- Back up your models directory -- The
models/tree grows quickly and represents hours of curation. Snapshot it to object storage monthly so a failed disk does not cost you your library.
Need a GPU VPS to run Stable Diffusion?>
The CloudCore Business plan is the baseline recommendation for comfortable SDXL generation, with larger GPU VPS tiers available for 24 GB+ VRAM workloads.>
- NVIDIA GPU with 12-24 GB VRAM
- 8+ vCPU cores, 24+ GB RAM
- 200+ GB NVMe SSD, unmetered bandwidth
- Ubuntu 24.04 LTS images ready to go
- From EUR 29.99/month>
Browse GPU VPS plans and launch your AI image studio today.