Install profiles and Docker
PotionUI installs in one of four shapes: everything on one GPU machine, a GPU machine that can add workers later, a machine without a GPU that sends work to a worker, or a worker that only serves another instance. This guide picks the shape for your setup, then covers ports, access from other devices, Docker, updating and stopping.
On this page
Which profile for which setup#
A profile decides what the ./potionui command installs and what it starts. Pick the row that matches the machine you are installing on.
| You have | Profile | What gets installed | Command |
|---|---|---|---|
| A GPU in this machine | local | The full CUDA stack, backend and frontend. | ./potionui start |
| A GPU here, and room to add remote workers later | hybrid | The same packages as local. After start it prints where to add a worker. | ./potionui start --profile hybrid |
| No GPU here (a VPS or a laptop) that sends work to a worker | remote | CPU-only PyTorch with no CUDA libraries. This is not a mode that generates on the CPU. | ./potionui start --profile remote |
| A GPU machine that only serves another PotionUI instance | worker | The full CUDA stack, no frontend, no database. | ./potionui worker start |
The profile you choose is saved in .runtime/install_profile, so a later plain ./potionui start or ./potionui doctor reuses it instead of falling back to local. --no-gpu still works as another name for --profile remote.
A studio usually runs one of two layouts. Everything on one machine is local. A browser-facing server without a GPU plus one or more GPU machines is remote on the server and worker on each GPU machine; Backends, remote workers and routing connects them.
PotionUI runs on Linux and Windows (x86_64) with an NVIDIA graphics card. On native Windows every command reads .\potionui.cmd … instead of ./potionui …, with the same profiles. WSL2 and Docker work too. macOS and AMD GPUs cannot generate locally, because the native engine needs CUDA. The hardware requirements list what each model family needs.
Install and start#
You need Python 3.12 and, for every profile except worker, Node.js 22 or newer (24 LTS recommended). The Install and first run guide has the full prerequisites.
-
Get the code
Shellclonegit clone https://github.com/PotionUI/PotionUI.git potionui && cd potionui
-
Check the machine
./potionui doctorruns every check (Python, Node.js, ffmpeg, the GPU, free disk space, both ports, thestoragefolder) and prints a repair command for anything missing. Add--profile remoteon a machine without a GPU, so the GPU check is informational only.Shelldoctor./potionui doctor
-
Start with your profile
./potionui startrepeats the blocking checks, creates./venv, installs the Python and frontend packages if they are missing, then starts the backend and the frontend and waits until both answer.Shellstart./potionui start # local ./potionui start --profile hybrid # or hybrid ./potionui start --profile remote # or remote
What you will seeThe profile in use, then
PotionUI is up.and an address such asOpen: http://localhost:26731. While nobody has claimed the instance, a second line gives the claim code:First-time setup: open http://localhost:26731 and use this claim code if asked: …. Withhybrid, a last line points to Admin, Backends, Add backend, Native (Remote Worker). -
Create the owner account
Open the address. The first account created becomes the owner, an administrator. The Install and first run guide walks through it; Claiming from another device below explains when the claim code is asked for.
One process or two
By default ./potionui start runs two processes: the backend and a frontend development server. Run ./potionui build once and later starts serve the built frontend from the backend, as one process on one port. start falls back to two processes on its own when a file under frontend/src is newer than the build, and ./potionui start --dev forces two processes. One port is simpler to put behind a reverse proxy.
Ports and how to change them#
| What | Default | Change it with |
|---|---|---|
| Backend (and the whole app in single-process mode) | 26730 | --backend-port or BACKEND_PORT |
| Frontend development server | 26731 | --frontend-port or FRONTEND_PORT |
| Remote worker | 7690 | ./potionui worker start --port, or POTIONUI_WORKER_PORT when you run worker.py yourself |
| Docker image | 26730 | The host side of -p |
The port options belong to ./potionui itself, so they come before the command:
./potionui --backend-port 27730 --frontend-port 27731 start
When the default backend port is taken by another program, start picks the next free port and says which one. A port you set yourself is never changed: if it is taken, start stops with an error. python api.py, used by the Docker image, always listens on 26730.
Reaching the app from other devices#
Out of the box PotionUI listens only on 127.0.0.1, so only the machine it runs on can open it. ./potionui start always binds there. To let phones, laptops or other people on your network in, use one of these:
- Docker. The container listens on all interfaces inside, and the
-pflag decides who can reach it. See Docker. ./run.sh --lan(Linux and WSL). Starts the backend on0.0.0.0and the frontend development server on all interfaces, and allows requests from any origin. It needs the virtual environment and frontend packages, so run./potionui startonce first, then./potionui stop.POTIONUI_HOST=0.0.0.0withpython api.py. Binds the backend to every interface on port26730. After./potionui buildthe backend also serves the app itself, so this is one process on one port. You can set the variable in.env.
./run.sh 26730 26731 --lan # then open http://<this-machine>:26731
Anyone who can reach the port can reach the PotionUI login page and its API. PotionUI is designed for hardware you control, on a workstation or a trusted local network. It is not hardened as an internet-facing service, and its own login is not designed to be your only line of defence on an open network. If you expose it beyond a trusted network, put an authenticating reverse proxy in front of it. Open the port only on networks where you trust every device.
Claiming from another device
The first account ever created becomes the owner. A browser on the server itself can create it directly. A browser on any other device must also enter a Claim code, a one-time code that only someone with access to the server's files or console can read. This stops a stranger on your network from claiming a fresh instance before you do.
./potionui startprints the code once the server is up.- It is stored in
storage/setup_claim_token, readable only by the account that runs PotionUI. In Docker it is/app/storage/setup_claim_tokeninside the container:docker exec <container> cat /app/storage/setup_claim_token. - The file is deleted once the owner account exists, and the claim cannot be repeated. Everyone after that signs in with an account an administrator creates, or registers if the owner turned on open registration.
Create the owner account before you open the port to the network or put a proxy in front of it. Inside Docker even a browser on the same machine may count as remote, so have the claim code ready there.
Running behind a reverse proxy#
Put an authenticating reverse proxy in front of PotionUI whenever it is reachable beyond a trusted network. PotionUI does not ship a proxy configuration. When you write one:
- Use single-process mode (
./potionui build) or the Docker image, so there is one upstream port:26730. - Forward WebSocket upgrades. Live progress and admin updates use WebSocket connections under
/ws/. - Set Public address in Administration, System Settings, Access to the address people use, for example
https://potion.example.com. PotionUI builds links for external clients such as MCP from it. Left empty, it uses the address the client connected to.
The worker profile#
A worker runs generations for another PotionUI instance. It has no frontend, no database and no accounts. Every request to it must carry a shared secret, the worker token.
-
Set a token
Generate a long random value and put it in
.envon the GPU machine asPOTIONUI_WORKER_TOKEN. The worker refuses to start without it.Shelltokenpython3 -c "import secrets; print(secrets.token_urlsafe(32))"
-
Check and start
./potionui worker doctorchecks Python, the GPU, disk space, the port, the worker folder and the token../potionui worker startinstalls the CUDA stack if needed and runs the worker in the foreground.Shellworker./potionui worker doctor ./potionui worker start --host 0.0.0.0 --port 7690
NoteThe worker binds
127.0.0.1unless you pass--host. The instance that sends it work must be able to reach it, so a worker on another machine needs--host 0.0.0.0or the address of a specific interface. -
Connect it
On the instance that dispatches work, add a backend of the engine Native (Remote Worker) with the worker's address and the same token. Add a remote native worker covers this and the model files a worker needs.
The token is the only thing that protects a worker. Anyone who has it can send the worker work and read what it produces. Keep it out of shared files, and keep the worker on a network you trust.
Worker settings are environment variables only:
| Variable | Default | Meaning |
|---|---|---|
POTIONUI_WORKER_TOKEN | none, required | The shared secret every request must carry. |
POTIONUI_WORKER_HOST | 127.0.0.1 | Bind address. It never defaults to 0.0.0.0. |
POTIONUI_WORKER_PORT | 7690 | Bind port. |
POTIONUI_WORKER_DIR | ./worker_data | The worker's journal, results and uploaded inputs. |
POTIONUI_WORKER_MODEL_DIR | /models | Where the worker keeps model files, one folder per model type, the same layout as the main models folder. |
Docker#
The published image runs one process on one port: the backend, serving the built app. It needs an NVIDIA GPU and the NVIDIA Container Toolkit. Everything the app keeps (database, settings, generations, uploads, logs) lives in two volumes, and the image contains none of it.
docker run --gpus all -p 26730:26730 \ -v potionui-models:/app/models \ -v potionui-storage:/app/storage \ ghcr.io/potionui/potionui:latest # open http://localhost:26730
- Who can reach it.
-p 26730:26730publishes the port on every interface of the host. Use-p 127.0.0.1:26730:26730to keep it on the host only, for example behind a proxy on the same machine. - Versions. Each release is tagged
:0.3.0,:v0.3.0and:0.3(newest patch of that line), as well as:latest. Pin a version tag so an update happens when you choose. - Logs. The server log is also written to
/app/storage/logs/potionui.login the storage volume. SetPOTIONUI_LOG_FILE=offfor a read-only filesystem. - Windows. Docker Desktop runs the image through WSL2.
To run ComfyUI beside it, add ComfyUI as a second service in your own compose file, started with --listen 0.0.0.0, and use the service name as the host of the ComfyUI backend:
services:
potionui:
image: ghcr.io/potionui/potionui:latest
depends_on:
- comfyui
# ...
comfyui:
image: your-comfyui-image
command: ["--listen", "0.0.0.0"]
# ...A worker image, ghcr.io/potionui/potionui-worker, carries the same tags. It is the image the RunPod Provider plugin starts on a rented GPU. It never contains a token: the token is passed as an environment variable when the container starts.
./potionui start-docker is a different thing: a contributor harness that simulates smaller machines with resource caps. It is not the way to run a studio.
Updating to a new version#
-
Back up first
A new version can bring database migrations that run on first start and cannot be undone. Take a backup with the
configtier at least; see Backup and restore. A backup restores onto the same or a newer version only. -
Read the release notes
Each release's changelog has an Upgrading entry that lists migrations, changed packages and anything you have to do by hand.
-
Replace the code
Docker: stop and remove the container, then start one from the new version tag with the same two volumes. All state is in the volumes, so nothing else moves. A checkout: stop PotionUI with
./potionui stopand check out the new release. -
Refresh the packages of a checkout
./potionui startinstalls Python packages only when the virtual environment cannot load them at all, so it does not pick up a changed package list on its own. Install the requirements again with the virtual environment active:pip install -r requirements.txt -c constraints.txt, or for theremoteprofilepip install -r requirements-cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu. If you use single-process mode, run./potionui buildagain. -
Start
Start as before. Migrations run on the first start.
What you will seeRight after a start the server answers that it is warming up while it loads presets and backends.
./potionui startkeeps waiting through that, and the Docker health check gives the first start a grace period.
Status and stopping#
| Command | What it does |
|---|---|
./potionui status | Says whether an instance started with ./potionui start is running, with each process, its port and its log file. |
./potionui stop | Stops the backend and the frontend together. Safe to run when nothing is running. |
| Ctrl-C | In the terminal that ran ./potionui start, ./potionui worker start or ./run.sh, stops what it started. |
docker stop <container> | Stops the Docker image. The volumes keep everything. |
If start reports a stale or partly running instance, run ./potionui stop, then ./potionui start again. When the backend or frontend does not come up in time, start prints the last lines of its log and stops whatever it started.
Logs
The server writes everything it logs to the console into storage/logs/potionui.log as well, rotated by size. POTIONUI_LOG_LEVEL, POTIONUI_LOG_DIR, POTIONUI_LOG_MAX_BYTES, POTIONUI_LOG_BACKUP_COUNT and POTIONUI_LOG_FILE=off tune it. Administrators can read the latest lines in Administration, System Settings, Logs. For a Windows issue report, attach potionui.cmd doctor --json, the files under logs/ and the output of nvidia-smi.