DCAI
Loading Light/Dark Toggl

Build Stable Diffusion WebUI Forge on RunPod|Fast Startup & Low‑Cost with NV

⏱️19min read
📅 Sep 15, 2025
Build Stable Diffusion WebUI Forge on RunPod|Fast Startup & Low‑Cost with NV featured Image

In this guide, I build Stable Diffusion WebUI Forge (below, “Forge”) on RunPod and explain the best way to generate images comfortably at low cost. The key is to place Forge itself and all models on a low‑cost Network Volume (NV) and switch to the “half‑cost NV” approach. This removes repeated re‑downloads and rebuilds and cuts both cost and time significantly.

Once the environment is set up on a GPU cloud, you can use Forge smoothly from an iPhone, Android, or a laptop that isn’t suited to local generation. Being able to access an environment in the RTX 4090 or RTX 5090 class while away from home is a huge plus.

Prerequisite: you must have a RunPod account. If you haven’t signed up yet, read the guide below first.

What Is a RunPod Network Volume?

A Network Volume (NV) is storage that, unlike a Pod‑attached regular volume disk, can be shared by multiple Pods within the same region. That means you can switch GPU machines within the region and instantly reproduce the same environment. ⚠️ Cross‑region sharing or deployment is not supported.

Even when a Pod is stopped (treated as deleted), an NV costs about half the price of a regular volume to keep. In this guide we’ll build the Forge environment on the NV so you can repeatedly start/stop Pods and keep using the same setup.

Recommended Size and Monthly Cost

If you mainly generate with SDXL models like Illustrious, around 50GB is typically enough, depending on usage. A rough estimate at the time of writing is:

$0.07 per GB × 50GB = $3.50/month

Compared to regular volumes, the carrying cost feels roughly half. If you use larger models like Flux.1 frequently, aim for 80GB or more. You can increase capacity later but not decrease it. It’s safer to scale up gradually when you run short.

How to Create a Network Volume

Create an NV in the following order.

Network Volume Creation Screen 
  • Open RunPod “Storage”.
  • Choose region: Closer to you means lower latency, but popular regions may be crowded.
  • Name the volume: Tie it to your template name to prevent mistakes.
  • Set capacity: Around 50GB for SDXL‑centric use; 80GB+ if you rely on Flux models.
  • Check pricing: The monthly estimate appears at the bottom.
  • Create: “Create Network Volume” to finish.

Note: NVs are region‑locked. Always run your NV and Pod in the same region.

Which WebUI Forge Template to Use

The official RunPod “Stable Diffusion WebUI Forge” template is outdated and doesn’t support newer models like Flux.1. Instead, we’ll use DCAI’s lightweight “Forge Minimal DCAI” template to launch a fast and simple Forge environment. We’ll set the API key and Secrets as we go.

RunPod API Setup

The RunPod API lets you control RunPod GPU resources from outside. It’s required for the auto shutdown feature used by “Forge Minimal DCAI”.

How to Create an API Key

API Key Creation Screen 
  • Open RunPod “Settings” → “API Keys”.
  • Click “+ Create API Key” → enter an easy‑to‑recognize name.
  • Set “API Key Options” to Restricted.
  • Set api.runpod.io/graphql to Read / Write, and api.runpod.ai to None.
  • Click “Create” to issue. Make sure to temporarily save the shown rpa_xxxx... (you can only view it now).
    API Key Copy Screen 

About RunPod Secrets

Do not hard‑code sensitive values (API keys, passwords) in Environment Variables. Register them with RunPod Secrets and safely reference them from the template.

How to Create a Secret

Secret Creation Screen 
  • Open the RunPod “Secret” page.
  • Click “+ Create Secret”.
  • Secret Name: API_AutoStop
  • Secret Value: the API key you created above
  • Save with “Create Secret”.

About “Forge Minimal DCAI”

“Forge Minimal DCAI” is a template designed for fast startup on top of docker.io/dcainet/forge-min:latest with a minimal setup. Forge itself and the venv are placed on the NV, so the initial setup takes a few minutes, but subsequent starts are fast. Highlights:

  • Fast startup: Minimal components, no unnecessary software.
  • NV‑first design: Works on regular volumes but NV is recommended.
  • Forge (port 7860): Comfortable generation with the latest stack including Flux.1.
  • JupyterLab (port 8888): Handy for file management and terminal access.
  • Auto shutdown: Stops automatically after inactivity (stops without NV / terminates when using NV).

You can also enable these options:

  • Auto‑update Forge: Check and apply updates before launch.
  • Auto‑clean outputs: Delete generated images older than a set time at startup.
  • Auto‑empty trash: Clear the NV trash at startup.
  • Backup/restore: Save and restore settings with forge-backup.
  • Open/closed access: Optional password auth for Forge/JupyterLab.

✅ This template is unsupported. Install and operate it at your own risk. If you hit errors or issues, follow the official docs and issue guidelines for Stable Diffusion WebUI Forge and for each extension you use.

Deploy “Forge Minimal DCAI”

If you’ve deployed Kohya SS GUI in the previous guide, the steps are almost the same. Configure in this order:

  • Select Network Volume: At “Deploy a Pod”, choose the NV you created.
  • Select GPU: Choose a GPU in the same region as the NV (e.g., RTX4090).
  • Select template: “Change Template” → search and pick Forge Minimal DCAI.
  • Environment Variables: Open “Edit Template” and set required ENVs.

⚠️If it doesn’t appear in search results, please select your NV and GPU from the 🔗“Forge Minimal DCAI”.

Check these first:

ENV Configuration Example 
  • Make sure RUNPOD_API_KEY is {{ RUNPOD_SECRET_API_AutoStop }}.
  • For the first launch, set IDLE_ENABLE=false to disable auto shutdown during startup.
  • For the time zone format, enter a TZ identifier from 🔗List of tz database time zones.
  • For closed access, add the following at the bottom in the Raw Editor and click “Update Variables” (✅ also configure the RunPod Secrets).
    ENV Raw Editing Screen 
WEBUI_USERNAME={{ RUNPOD_SECRET_forge_username }}
WEBUI_PASSWORD={{ RUNPOD_SECRET_forge_password }}
JUPYTER_AUTH_ENABLE=true
JUPYTER_PASSWORD={{ RUNPOD_SECRET_Jupyter_password }}

✅ Always reference sensitive values like usernames and passwords via RunPod Secrets.

Toggle other features to false/true as needed. Main ENVs are:

KeyDescriptionDefault
TZTime zoneUTC
RUNPOD_API_KEYAPI key required for auto shutdown{{ RUNPOD_SECRET_API_AutoStop }}
IDLE_ENABLEEnable/disable auto shutdowntrue
IDLE_TIMEOUT_MINUTESIdle time before shutdown (minutes)15
JUPYTER_ENABLEEnable/disable JupyterLabtrue
AUTO_UPDATE_FORGECheck for and apply Forge updates at startupfalse
IMAGE_CLEAN_ON_STARTAuto‑delete images older than MAX_AGE_HOURS from Output at startupfalse
MAX_AGE_HOURSThreshold for auto deletion (hours)6
EMPTY_TRASH_ON_STARTEmpty the volume trash at startupfalse
FORGE_USERNAMEUsername for Forge password auth{{ RUNPOD_SECRET_forge_username }}
FORGE_PASSWORDPassword for Forge password auth{{ RUNPOD_SECRET_forge_password }}
JUPYTER_AUTH_ENABLEEnable/disable JupyterLab password authfalse
JUPYTER_PASSWORDJupyterLab password{{ RUNPOD_SECRET_Jupyter_password }}

After configuring the template, start with “Deploy On‑Demand”. The first run takes about 15 minutes to build the environment on the NV. When you see Startup time: ... (prepare environment: ...) in the logs, it’s ready.

How to Download and Place Models

There are two main ways to add models: (1) use a Forge extension, or (2) download directly from a JupyterLab terminal.

Method 1: Download via Forge extension

Development has ended, but the “sd-civitai-browser-plus” extension is still the easiest way. In Forge, go to “Extensions” → “Install from URL” and install the repository below.

https://github.com/BlafKing/sd-civitai-browser-plus

Then search and download any model you like. See the repository for usage. For detailed extension install steps, see the article below.

Method 2: Download in JupyterLab terminal

Use wget in a JupyterLab terminal to download directly. Civitai models are faster via the extension, but for Hugging Face this method is convenient.

This template symlinks the main folders to easy paths. Models live under /workspace/forge/models. ⚠️ embeddings is one level up.

For example, to save a checkpoint model, move to /workspace/forge/models/Stable-diffusion and open “Terminal”.

Make sure your prompt shows root@RUNPOD-ID:/workspace/forge/models/Stable-diffusion#.

You can upload from local too, but multi‑GB transfers take time. It’s better to download directly from Hugging Face or Civitai.

We’ll use wget here. ⚠️ For models that require login (e.g., Flux.1 [Dev]), consider downloading with curl.

Example model download:

Copy the link via “copy download link” on the model page, replace LINK and FILE_NAME below, and run.

wget --wait=10 --tries=10 "LINK" -O FILE_NAME.safetensors

With our example, it becomes:

wget --wait=10 --tries=10 "https://huggingface.co/OnomaAIResearch/Illustrious-XL-v2.0/resolve/main/Illustrious-XL-v2.0.safetensors?download=true" -O illustriousXL_v2.safetensors

Running the command above starts the download. On Civitai, right‑click “Download” and copy the link.

The method for downloading Civitai models that require user authentication is limited to Patreon paied supporters, but it’s explained in the article below.

Auto Shutdown

“Forge Minimal DCAI” enables auto shutdown by default (true). If there’s no external access for the minutes specified by IDLE_TIMEOUT_MINUTES, the Pod stops automatically. Without NV it stops; with NV it terminates.

Note: If you leave Forge open in your browser (including in the background tab), periodic access may continue and prevent shutdown from triggering.

Auto-clean the Output folder

Disabled by default (false). At startup it deletes generated images older than MAX_AGE_HOURS. Useful when NV space tends to get tight.

⚠️ When enabled, download any needed images before stopping the Pod. Also, data removed by this operation cannot be restored with mv.

Auto-empty the Trash

Disabled by default (false). Set EMPTY_TRASH_ON_START=true to empty the NV trash at startup.

To inspect its contents, run the following in the terminal at /workspace.

ls -al /workspace/.Trash-0/{files,info} 2>/dev/null

⚠️ Data deleted by this operation cannot be restored with mv.

Closed Access (password protected)

With open access, the RunPod URL is accessible by anyone. Considering the risk of exposing the URL in public, I strongly recommend closed access if you use multiple devices or locations. Configure the earlier ENVs (WEBUI_USERNAME / WEBUI_PASSWORD / JUPYTER_AUTH_ENABLE / JUPYTER_PASSWORD) via RunPod Secrets.

Backup

“Forge Minimal DCAI” can back up Forge settings on the NV (⚠️ models are not included). Useful if you want to pause NV usage and stop storage billing for a while.

Backup steps

Before deleting the NV, run forge-backup in JupyterLab or the standard RunPod Web Terminal. A file like forge_cfg_extlist_YYYYMMDD_HHMMSS.tar will be created under /workspace/outputs. Download and keep it locally.

Note: After running forge-backup, /workspace/forge will contain config-backup/ and extensions.txt. If they remain, they’ll be loaded on the next start and overwrite later changes. Delete them after taking the backup.

Restore

Restore Forge settings and extensions from the backup archive (⚠️ models are not restored).

Restore steps

  • Create a new NV and deploy with “Forge Minimal DCAI”.
  • Launch JupyterLab and upload the backup to /workspace/forge (config-backup/ and extensions.txt).
  • Restart the Pod and settings/extensions will be restored at next startup.
  • ⚠️ After the restart, delete the uploaded archive from forge (to prevent restoring every time).

RunPod Forge with RTX 5090 (Unofficial/Experimental)

At the time of writing, the official Forge repository doesn’t provide a stable, RTX 5090‑optimized build. Using DCAI’s “Forge Minimal 5090 DCAI Experimental”, some optimizations like xFormers are unavailable, but you can generate with major features like ADetailer and Hirex.fix. This experimental template is for those who want to try fast inference on the RTX 5090.

  • Available features: Basic extensions like ADetailer, Hirex.fix
  • Limitations: xFormers unsupported; compatibility may change.
  • Support: Not supported — use at your own risk.
  • Target: RunPod (Stable Diffusion WebUI Forge / template‑based).

How to: The steps are the same as “Forge Minimal DCAI”. In the template list, select “Forge Minimal 5090 DCAI Experimental” and deploy.

⚠️ Create a new Network Volume (NV). Reusing the NV from “Forge Minimal DCAI” can cause dependency mismatches and generation errors.

Setup steps (overview)

  • Create a new NV in the same region for RTX 5090.
  • Select Forge Minimal 5090 DCAI Experimental from templates.
  • Configure required ENVs/Secrets and deploy.

⚠️If it doesn’t appear in search results, please select your NV and GPU from the 🔗“Forge Minimal 5090 DCAI Experimental”

✅ If you prioritize stability, consider the classic “Forge Minimal DCAI” + RTX 4090 setup.

Forge's Flux.1 Generation Test
Using an RTX 5090 with Hirex.fix to double the resolution of Flux.1, I was able to generate it in about one minute.

Troubleshooting

Can't access Forge (port 7860)

Use RunPod “Connect” to open the HTTP port. Confirm that 7860 is listed in the template’s HTTP ports and that the Pod logs show Startup time or Running on. To avoid browser cache issues, try an incognito window.

First startup is long / looks frozen

The initial run takes about 15 minutes because it builds Forge and the venv on the NV. Use the prepare environment and Startup time logs to gauge progress. Subsequent starts are much faster.

Auto shutdown doesn't work / shuts down too soon

If it doesn’t trigger, confirm IDLE_ENABLE=true and that IDLE_TIMEOUT_MINUTES is appropriate. If you keep Forge open in a browser (including a background tab), it may not stop. If it shuts down too quickly, your timeout is likely too short. Increase the value and confirm periodic access to monitored ports (Forge/JupyterLab).

NV out of space / write failed (No space left on device)

Clean up Output, and delete unused or duplicate models/files. If needed, enable automatic cleanup with IMAGE_CLEAN_ON_START=true and MAX_AGE_HOURS. Note that JupyterLab’s trash remains in a hidden folder on the NV after deletion; set EMPTY_TRASH_ON_START=true to empty it. If space is still tight over time, expand your NV.

Extension/model download fails

This may be due to Civitai rate limiting or URL changes. Try the API‑enabled version of “sd‑civitai‑browser‑plus” (CivitaiAPI), or wait and retry. A 403 on Hugging Face means the model requires login (token). Switch to an authenticated download method.

Auth doesn't work / can't log in

Check values and Secret names for WEBUI_USERNAME/WEBUI_PASSWORD and JUPYTER_AUTH_ENABLE/JUPYTER_PASSWORD. After changes, restart the Pod to apply.

Can't connect to JupyterLab (port 8888)

Confirm JUPYTER_ENABLE=true and that 8888 is in HTTP ports. In RunPod “Connect”, select the port to access. If auth is enabled, recheck the password Secret settings.

Backup/restore runs every time

You might still have a restore archive under /workspace/outputs or leftovers like config-backup/ or extensions.txt under /workspace/forge. After recovery, delete them to prevent constant restores.

Accidentally deleted pip-constraints.txt

pip-constraints.txt pins torch/torchvision/torchaudio versions to keep the environment reproducible. If you deleted it by mistake, go to /workspace/forge in JupyterLab and run the command below.

echo -e 'torch==2.3.1\ntorchvision==0.18.1\ntorchaudio==2.3.1' > /workspace/forge/pip-constraints.txt

Conclusion

To recap: place Forge and your models on a Network Volume and combine the Forge Minimal DCAI template with Secrets for safe, fast operations. Choose extensions or wget/curl for model installs as appropriate, and use auto shutdown and Output cleanup to cut wasteful billing and storage. With backup/restore safeguarding your settings, you can quickly reproduce the same environment anytime. Note that perceived speed won’t match a local GPU, and during peak times, network throughput can bottleneck even if GPU computation finishes quickly.

Building this confirmed how well NV‑based operations pair with a minimal setup. The “on‑demand generation” experience—spinning up a powerful GPU only when needed and minimizing costs otherwise—works well even without a local GPU.

Thank you for reading to the end.

If you found this even a little helpful, please support by giving it a “Like”!