---
title: "Self-host Dify"
description: "Run Dify on an exe.dev VM: build AI chatbots, workflows, and agents with models from exe.dev's LLM gateway, a private console, and nightly backups."
url: https://exe-staging.dev/deploy/dify
category: "AI apps"
updated: 2026-11-16
---

# Self-host Dify

Build and publish AI apps and workflows. Models without API keys.

- **Software:** Dify (https://dify.ai)
- **Source:** https://github.com/langgenius/dify
- **License:** Dify Open Source License (Apache 2.0 with conditions)
- **Time:** 15 minutes
- **Example VM name:** `my-dify` (yours will differ; on the VM, `hostname` prints it)
- **Machine-readable:** https://exe-staging.dev/deploy/dify/manifest.json
- **File:** https://exe-staging.dev/deploy/dify/backup.sh
- **File:** https://exe-staging.dev/deploy/dify/exe-public.conf
- **File:** https://exe-staging.dev/deploy/dify/helpdesk-bot.yml
- **File:** https://exe-staging.dev/deploy/dify/sample-app.sh
- **File:** https://exe-staging.dev/deploy/dify/setup-models.sh

## What you get

- Dify 1.19 in Docker Compose with its own generated secrets in `~/dify/docker/.env` (mode 600), coming back after a reboot.
- The console at `https://<vm>.exe.xyz:8080/`, with you as admin, signed in with your exe.dev email.
- OpenAI and Anthropic models from exe.dev's LLM gateway, with no API keys.
- A published sample chatbot answering through port 8000, which serves apps and the API but not the console.
- Workflows that can call your exe.dev integrations, with no credentials stored in Dify.
- Nightly backups of the databases, files, and vectors into `~/dify-backups`, with one checked.

Running on the VM:

- **Dify 1.19**: The official Docker Compose setup, with PostgreSQL, Redis, Weaviate, the plugin daemon, and the code sandbox, data in `~/dify/docker/volumes`
- **Console (Dify's nginx)**: Studio, knowledge bases, settings, and everything else, port 8080
- **Apps and API (Dify's nginx, a second server)**: Published web apps, the service API, MCP, and webhooks; no console, port 8000
- **exe.dev LLM gateway**: GPT and Claude models through Dify's OpenAI and Anthropic plugins, with no keys

How it is reached:

- https://my-dify.exe.xyz:8080/ (private): The Dify console, after exe.dev login and Dify's own sign-in
- https://my-dify.exe.xyz/ (private): Published web apps and the API (/v1); make it public for customers and outside servers

## Deploy with Shelley

Open https://exe-staging.dev/new?prompt=Set%20up%20Dify%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe-staging.dev%2Fdeploy%2Fdify.md%20from%20top%20to%20bottom.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-dify.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-dify.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AThis%20recipe%20needs%20a%2040GB%20disk%2C%20and%20a%20new%20VM%27s%20may%20be%20smaller.%20Before%20you%20install%20anything%2C%20run%20%60df%20-h%20%2F%60.%20If%20its%20size%20is%20under%2036G%2C%20stop%20and%20ask%20me%20to%20grow%20the%20disk%2C%20either%20with%20this%20link%3A%20https%3A%2F%2Fexe.dev%2Fsuggest%3Fcommand%3Dresize%2520my-dify%2520--disk%253D40GB%20or%2C%20on%20my%20computer%2C%20with%20%60ssh%20exe.dev%20resize%20my-dify%20--disk%3D40GB%60.%20When%20I%20say%20it%27s%20done%2C%20run%20%60sudo%20resize2fs%20%22%24%28findmnt%20-no%20SOURCE%20%2F%29%22%60%2C%20check%20%60df%20-h%20%2F%60%20again%2C%20and%20carry%20on.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20Dify%201.19%20in%20Docker%20Compose%20with%20its%20own%20generated%20secrets%20in%20%60~%2Fdify%2Fdocker%2F.env%60%20%28mode%20600%29%2C%20coming%20back%20after%20a%20reboot.%0A-%20The%20console%20at%20%60https%3A%2F%2F%3Cvm%3E.exe.xyz%3A8080%2F%60%2C%20with%20you%20as%20admin%2C%20signed%20in%20with%20your%20exe.dev%20email.%0A-%20OpenAI%20and%20Anthropic%20models%20from%20exe.dev%27s%20LLM%20gateway%2C%20with%20no%20API%20keys.%0A-%20A%20published%20sample%20chatbot%20answering%20through%20port%208000%2C%20which%20serves%20apps%20and%20the%20API%20but%20not%20the%20console.%0A-%20Workflows%20that%20can%20call%20your%20exe.dev%20integrations%2C%20with%20no%20credentials%20stored%20in%20Dify.%0A-%20Nightly%20backups%20of%20the%20databases%2C%20files%2C%20and%20vectors%20into%20%60~%2Fdify-backups%60%2C%20with%20one%20checked.%0A%0ARead%20the%20whole%20recipe%2C%20including%20the%20closed%20details.%20For%20initial%20setup%2C%0Afollow%20%22Install%20by%20hand%22%20first%2C%20skipping%20VM%20creation%20and%20SSH%20but%20not%20the%0Adisk%20check%2C%20through%20%22Test%20a%20backup%22.%20The%20walkthrough%20at%20the%20top%20is%20for%0Athe%20owner%20afterwards.%20Do%20not%20run%20Restore%20unless%20the%20user%20asks.%0ANever%20print%20~%2Fdify%2Fdocker%2F.env%20or%20~%2Fdify-admin-password%20into%20the%20chat%3B%0Atell%20the%20owner%20where%20the%20password%20is.%20Don%27t%20share%20the%20VM%20or%20make%20it%0Apublic%3A%20the%20owner%20decides.%20Leave%20the%20Helpdesk%20bot%20app%20in%20place%20so%20the%0Aowner%20can%20see%20it.%20The%20API%20takes%20a%20few%20minutes%20to%20start%20on%20a%202-CPU%20VM%3B%0A502%20errors%20from%20nginx%20in%20that%20time%20are%20normal.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open.%0A to create a VM whose agent, Shelley, follows this recipe. From a terminal:

```sh
curl -fsSL https://exe-staging.dev/deploy/dify/prompt.txt | ssh exe.dev new --disk=40GB --prompt=/dev/stdin
```

It needs a 40 GB disk. The terminal command makes the VM that size; after the button, Shelley checks and, if the disk is smaller, gives you a link to grow it.

Or follow the steps below by hand.

Dify is an open-source workbench for AI apps: chatbots, workflows, and
agents built on a canvas, with knowledge bases for your documents. Each app
publishes as a web page, an API, and an MCP server.

On exe.dev the console stays private behind your login, and published apps
get a port of their own that you can make public. Models come from exe.dev's
[LLM gateway](/docs/integrations-llm) with no API keys, and workflows can
call your other exe.dev [integrations](/docs/integrations), so no
credentials are stored in Dify.

## Open the console

Open `https://my-dify.exe.xyz:8080/` and sign in with your exe.dev email and
the password in `~/dify-admin-password` on the VM. Change it under your
name → **Account**.

## Models and integrations

OpenAI and Anthropic models are ready in **Integrations → Model Provider**,
pointed at the gateway with a placeholder key. To connect them again, use
any key and the base URL `https://llm.int.exe.xyz/v1` (OpenAI) or
`https://llm.int.exe.xyz` (Anthropic).

<figure>
  <img src="https://exe-staging.dev/deploy/dify/openai-provider.png" alt="Dify's OpenAI provider settings with the API key placeholder and the API base URL https://llm.int.exe.xyz/v1" width="1440" height="900" loading="lazy">
  <figcaption>The OpenAI plugin, pointed at exe.dev's LLM gateway.</figcaption>
</figure>

HTTP Request nodes can call your integrations at
`https://<name>.int.exe.xyz`; exe.dev adds the credentials on the way out.

> [!WARNING]
> Anyone who can edit workflows uses your models and integrations as you.
> Invite only people you'd trust with those credentials.

## Build and publish an app

**Studio** has a sample chatflow, **Helpdesk bot**. Edit it, try it in
**Preview**, then **Publish**. Its **Access Point** page lists the web app
and the API, both at `https://my-dify.exe.xyz/`.

<figure>
  <img src="https://exe-staging.dev/deploy/dify/chatflow-preview.png" alt="The Helpdesk bot chatflow in Dify Studio, User Input to LLM to Answer, with a preview chat answering a returns question" width="1440" height="900" loading="lazy">
  <figcaption>A chatflow answering through gpt-5.4-mini on exe.dev's gateway.</figcaption>
</figure>

## Go public

When an app is ready for customers, run this on your computer:

```bash
ssh exe.dev share set-public my-dify
```

That opens port 8000: web apps, the API (still behind app keys), MCP, and
webhooks. The console stays on port 8080, which is always private.
`share set-private` closes it again.

<figure>
  <img src="https://exe-staging.dev/deploy/dify/public-webapp.png" alt="The published Helpdesk bot web app answering a visitor who is not signed in to exe.dev" width="1440" height="900" loading="lazy">
  <figcaption>The web app, opened by a visitor with no exe.dev account.</figcaption>
</figure>

> [!WARNING]
> Public apps chat on your LLM allocation. Watch each app's **Logs**.

## Bring your team

Share the VM with `ssh exe.dev share add my-dify teammate@example.com`, then
invite them in **Settings → Members**. Without email set up, Dify shows an
invitation link to send yourself.

## Keep your work

Backups run nightly into `~/dify-backups`, `.env` secrets included. Copy
them off the VM with `scp -r my-dify.exe.xyz:dify-backups .`. To update
Dify, back up, then ask Shelley or follow Dify's
[upgrade steps](https://docs.dify.ai/en/self-host/deploy/quick-start/docker-compose);
the changes from this page live in files updates don't touch.

## The nuts and bolts

Happy clicking Deploy? You can stop here. These are the same setup steps
Shelley follows, plus the maintenance commands for later.

<details id="create-the-vm" data-manual-setup class="dp-details">
<summary>Install by hand</summary>

### Create a VM

On your computer (pick another name if `my-dify` is taken):

```bash
ssh exe.dev new --name=my-dify --disk=40GB
ssh my-dify.exe.xyz
```

All remaining installation commands run **on the VM**, as `exedev`.
Commands use `hostname`, so your VM can have any name.

### Room on the disk

Check the disk:

```bash
df -h /
```

If **Size** is under 38G, the VM was made with a smaller disk. Grow it with
[this link](https://exe.dev/suggest?command=resize%20my-dify%20--disk%3D40GB)
(with your VM's name), or on your computer with
`ssh exe.dev resize my-dify --disk=40GB`. Then, back on the VM, grow the
filesystem to match:

```bash
sudo resize2fs "$(findmnt -no SOURCE /)"
df -h /
```

### Get Docker ready

Enable Docker at boot, or exe.dev's on-demand Docker won't start Dify after
a reboot. Dify needs Docker Compose 2.35 or newer:

```bash
sudo systemctl enable --now docker.service
systemctl is-enabled docker.service
docker compose version
```

Expect `enabled` and a version of 2.35 or later.

### Download Dify

Dify's Compose setup lives in the `docker` directory of its repository.
Clone the 1.19.0 release:

```bash
git clone -q -c advice.detachedHead=false --branch 1.19.0 --depth 1 \
  https://github.com/langgenius/dify.git ~/dify
cd ~/dify/docker
git describe --tags
```

Expect `1.19.0`.

### Configure it for exe.dev

Dify reads `.env` in `~/dify/docker`, on top of defaults in `envs/`. This
writes it **once**, starting from Dify's example: it moves Dify's nginx to
port 8080 for the console, tells Dify which addresses people use, replaces
the bundled default passwords with generated ones, and lets workflows reach
exe.dev integrations, which Dify's SSRF proxy would otherwise block as
private addresses.

```bash
cd ~/dify/docker
if [ ! -e .env ]; then
  cp .env.example .env && chmod 600 .env
  sed -i "s/^DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN=.*/DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN=$(openssl rand -hex 32)/" .env
  host=$(hostname).exe.xyz
  sandbox_key=$(openssl rand -hex 32)
  weaviate_key=$(openssl rand -hex 32)
  cat >> .env <<EOF

# exe.dev: the console on port 8080 (always private); published apps and
# the API on port 8000, the port https://$host/ reaches.
EXPOSE_NGINX_PORT=8080
CONSOLE_API_URL=https://$host:8080
CONSOLE_WEB_URL=https://$host:8080
NEXT_PUBLIC_SOCKET_URL=wss://$host:8080
APP_API_URL=https://$host
APP_WEB_URL=https://$host
SERVICE_API_URL=https://$host
FILES_URL=https://$host
TRIGGER_URL=https://$host
ENDPOINT_URL_TEMPLATE=https://$host/e/{hook_id}

# Replace the bundled default credentials.
DB_PASSWORD=$(openssl rand -hex 24)
REDIS_PASSWORD=$(openssl rand -hex 24)
PLUGIN_DAEMON_KEY=$(openssl rand -hex 32)
PLUGIN_DIFY_INNER_API_KEY=$(openssl rand -hex 32)
SANDBOX_API_KEY=$sandbox_key
CODE_EXECUTION_API_KEY=$sandbox_key
WEAVIATE_API_KEY=$weaviate_key
WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS=$weaviate_key

# Let workflows reach exe.dev integrations through Dify's SSRF proxy.
SSRF_PROXY_ALLOW_PRIVATE_DOMAINS=.int.exe.xyz
EOF
fi
grep -E '^(EXPOSE_NGINX_PORT|CONSOLE_WEB_URL|APP_WEB_URL)=' .env
```

Expect port 8080 and your VM's address, with and without `:8080`.

### Add the apps-and-API port

A second server in Dify's nginx answers on port 8000 with only what
published apps need: the web app pages, `/api`, `/v1`, `/files`, `/mcp`,
`/triggers`, and plugin endpoints under `/e/`. Read
[exe-public.conf](https://exe-staging.dev/deploy/dify/exe-public.conf) to see
exactly which paths. Dify's nginx loads every file in `nginx/conf.d`, and
Compose merges `docker-compose.override.yaml` into Dify's file, so neither
changes anything Dify ships:

```bash
cd ~/dify/docker
curl -fsSL https://exe-staging.dev/deploy/dify/exe-public.conf -o nginx/conf.d/exe-public.conf
cat > docker-compose.override.yaml <<'EOF'
# exe.dev: publish the apps-and-API server from nginx/conf.d/exe-public.conf.
services:
  nginx:
    ports:
      - "8000:8000"
EOF
docker compose config --quiet && echo ok
```

### Start Dify

Dify 1.19.0's plugin daemon runs as user 1001 but can't create its own
storage directory ([dify#45597](https://github.com/langgenius/dify/issues/45597)),
so plugin installs fail with `mkdir /app/storage/assets: permission denied`.
Create it first, then pull the images (about 12 GB) and start everything:

```bash
cd ~/dify/docker
mkdir -p volumes/plugin_daemon && sudo chown -R 1001:1001 volumes/plugin_daemon
docker compose pull -q
docker compose up -d
until curl -fs http://localhost:8080/console/api/setup; do sleep 10; done; echo
docker compose ps --format 'table {{.Service}}\t{{.Status}}'
```

The pull takes a few minutes. The API then runs its database migrations,
which take two or three minutes on 2 CPUs; the loop ends with
`{"step":"not_started"...}`. Every service should be `Up`.

### Make yourself the admin

Dify's first account owns the workspace. The VM is private, so nobody else
can reach the setup page, but create the account now. Use your exe.dev
email from the reflection integration, and a generated password:

```bash
owner=$(curl -fsS https://reflection.int.exe.xyz/email | jq -r '.email // empty')
echo "$owner"
```

If that prints nothing, set it yourself: `owner=you@example.com`. Then:

```bash
(umask 077; printf 'exe%s1\n' "$(openssl rand -hex 10)" > ~/dify-admin-password)
jq -n --arg email "$owner" --arg name "${owner%%@*}" --rawfile pw ~/dify-admin-password \
  '{email: $email, name: $name[0:30], password: ($pw | rtrimstr("\n"))}' \
  | curl -fsS http://localhost:8080/console/api/setup -H 'Content-Type: application/json' -d @-
echo
curl -fsS http://localhost:8080/console/api/setup; echo
```

Expect `{"result":"success"}`, then `"step":"finished"`.

### Connect the LLM gateway

[setup-models.sh](https://exe-staging.dev/deploy/dify/setup-models.sh) signs in as
you, installs the OpenAI and Anthropic plugins from Dify's marketplace,
points them at `https://llm.int.exe.xyz`, and sets the default models.
It's what you'd click through in **Integrations → Model Provider**:

```bash
cd ~
curl -fsSLO https://exe-staging.dev/deploy/dify/setup-models.sh
DIFY_EMAIL="$owner" bash setup-models.sh
```

Plugins take a minute to install. Expect both providers to end `active`.

### Check it works

[sample-app.sh](https://exe-staging.dev/deploy/dify/sample-app.sh) imports the
[Helpdesk bot](https://exe-staging.dev/deploy/dify/helpdesk-bot.yml), publishes it,
makes an API key, and asks it a question through port 8000:

```bash
cd ~
curl -fsSLO https://exe-staging.dev/deploy/dify/sample-app.sh
curl -fsSLO https://exe-staging.dev/deploy/dify/helpdesk-bot.yml
DIFY_EMAIL="$owner" bash sample-app.sh helpdesk-bot.yml
```

Expect the web app's address and an answer about 30-day returns. Then
check that port 8000 hides the console while port 8080 serves it:

```bash
for port in 8000 8080; do
  curl -s -o /dev/null -w "$port: %{http_code}\n" http://localhost:$port/console/api/setup
done
```

Expect `8000: 404` and `8080: 200`. Last, check that workflows reach
exe.dev integrations through Dify's SSRF proxy:

```bash
cd ~/dify/docker
docker compose exec -T api python -c 'import urllib.request as u
proxy = u.ProxyHandler({"https": "http://ssrf_proxy:3128"})
print(u.build_opener(proxy).open("https://llm.int.exe.xyz/models.json").status)'
```

Expect `200`.

### Set up nightly backups

[backup.sh](https://exe-staging.dev/deploy/dify/backup.sh) dumps both PostgreSQL
databases while Dify runs, pauses Weaviate for a few seconds to copy the
vectors, and packs the file volumes and your configuration into one
tarball. It keeps the newest 14.

```bash
curl -fsSL https://exe-staging.dev/deploy/dify/backup.sh -o ~/dify-backup.sh
chmod +x ~/dify-backup.sh
sudo tee /etc/systemd/system/dify-backup.service >/dev/null <<EOF
[Unit]
Description=Back up Dify to ~/dify-backups
Requires=docker.service
After=docker.service

[Service]
Type=oneshot
Environment=DIFY_DIR=$HOME/dify/docker
ExecStart=$HOME/dify-backup.sh
EOF
sudo tee /etc/systemd/system/dify-backup.timer >/dev/null <<'EOF'
[Unit]
Description=Back up Dify every night

[Timer]
OnCalendar=*-*-* 03:30:00
RandomizedDelaySec=30m
Persistent=true

[Install]
WantedBy=timers.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now dify-backup.timer
sudo systemctl start dify-backup.service
systemctl list-timers dify-backup.timer
ls -lh ~/dify-backups
```

Check that the timer has a next run and the directory has a tarball. For
failures: `journalctl -u dify-backup.service`.

### Test a backup

Unpack the newest backup in a **scratch directory** and load its database
dump into a throwaway PostgreSQL, without touching the running one:

```bash
latest=$(ls -1t ~/dify-backups/dify-*.tar.gz | head -n 1)
mkdir /tmp/dify-restore-test && cd /tmp/dify-restore-test
tar -xzf "$latest"
tar -tzf volumes.tar.gz | grep -c .
tar -tzf config.tar.gz
docker run -d --name dify-restore-test -e POSTGRES_PASSWORD=test postgres:15-alpine
until docker exec dify-restore-test pg_isready -U postgres -q; do sleep 1; done; sleep 2
gunzip -c postgres.sql.gz | docker exec -i dify-restore-test psql -q -U postgres -o /dev/null 2>&1 \
  | grep -Ev 'NOTICE|already exists|cannot (drop|be dropped)' || true
docker exec dify-restore-test psql -U postgres -d dify -tAc 'select name from apps'
docker exec dify-restore-test psql -U postgres -d dify_plugin -tAc 'select plugin_id from plugins'
```

Expect a count of files, the three configuration files, `Helpdesk bot`,
and the two plugins. Remove only the scratch copy:

```bash
docker rm -f dify-restore-test
cd ~ && rm -rf /tmp/dify-restore-test
```

Installation done. Leave sharing to the owner; continue with
[Open the console](#open-the-console).

</details>

<details id="back-up-and-restore" class="dp-details">
<summary>Back up and restore</summary>

On the VM, `sudo DIFY_DIR=$HOME/dify/docker ~/dify-backup.sh` makes an
extra backup and prints its path. Copy backups off the VM as shown in
[Keep your work](#keep-your-work).

### Restore

On a new VM, follow [Install by hand](#create-the-vm) through
[Download Dify](#download-dify), with the Dify version the backup came from.
Then copy the backup over from your computer:

```bash
scp dify-20261116-033012.tar.gz my-dify.exe.xyz:
```

Use your backup's actual filename here and below. All remaining commands
run **on the VM**. If Dify already runs there, stop it and keep its
directory aside first, and download the same release again:

```bash
cd ~/dify/docker && docker compose down
sudo mv ~/dify ~/dify.before-restore
git clone -q -c advice.detachedHead=false --branch 1.19.0 --depth 1 \
  https://github.com/langgenius/dify.git ~/dify
```

Unpack the configuration and files, and fix the addresses if the VM's name
changed:

```bash
mkdir -p /tmp/dify-restore && cd /tmp/dify-restore
tar -xzf ~/dify-20261116-033012.tar.gz
cd ~/dify/docker
tar -xzf /tmp/dify-restore/config.tar.gz
sudo tar -xzf /tmp/dify-restore/volumes.tar.gz
old=$(sed -n 's|^APP_WEB_URL=https://||p' .env)
sed -i "s|$old|$(hostname).exe.xyz|g" .env
grep -E '^(CONSOLE_WEB_URL|APP_WEB_URL)=' .env
```

Load the databases into a fresh PostgreSQL, then start the rest:

```bash
cd ~/dify/docker
docker compose up -d --wait db_postgres
gunzip -c /tmp/dify-restore/postgres.sql.gz \
  | docker compose exec -T db_postgres psql -q -U postgres -d postgres -o /dev/null
docker compose up -d
until curl -fs http://localhost:8080/console/api/setup; do sleep 10; done; echo
rm -rf /tmp/dify-restore
```

A few `NOTICE`, `already exists`, and `cannot be dropped` messages are
normal. Expect `"step":"finished"`, then sign in with your old password and
check your apps. On a new VM, recreate the backup timer
from [Install](#set-up-nightly-backups). Keep `~/dify.before-restore` until
you're happy everything is back.

</details>

<details id="troubleshooting" class="dp-details">
<summary>Troubleshooting</summary>

On the VM, in `~/dify/docker`:

- **502 Bad Gateway right after a start:** the API is still migrating and
  booting; give it three minutes. `docker compose logs -f api` shows
  progress, and `docker compose ps` shows `api` `healthy` when it's ready.
- **Plugin install fails with `permission denied`:**
  `sudo chown -R 1001:1001 volumes/plugin_daemon && docker compose restart plugin_daemon`.
- **Model errors:** `docker compose logs --tail=100 plugin_daemon`. Check
  the provider's base URL is `https://llm.int.exe.xyz/v1` (OpenAI) or
  `https://llm.int.exe.xyz` (Anthropic), and that the model is in
  `https://llm.int.exe.xyz/models.json`.
- **Web app or API links point at the wrong address:** the `*_URL` lines in
  `.env` must match your VM's name. Fix them, then `docker compose up -d`.
- **The console won't stay signed in:** open it at
  `https://<vm>.exe.xyz:8080/`, the address in `CONSOLE_WEB_URL`.
- **HTTP Request or Code nodes fail with `403`:** Dify's SSRF proxy blocks
  private addresses other than `*.int.exe.xyz`.
  `docker compose logs --tail=50 ssrf_proxy`.
- **Disk full:** `df -h /`, `docker system df`, and
  `du -sh ~/dify-backups ~/dify/docker/volumes`.
- **Everything else:** `docker compose logs --tail=100 api worker web nginx`.

</details>

## Frequently asked questions

### How big a VM do I need?

Dify asks for 2 CPUs and 4 GB of memory, and the default VM has 2 CPUs and 8 GB; the stack idles at about 2 GB. The images take about 12 GB of disk, so make the VM with 40 GB to leave room for updates, documents, and backups. Grow it later with `ssh exe.dev resize`.

### Do I need an OpenAI or Anthropic API key?

No. Dify's OpenAI and Anthropic plugins talk to exe.dev's [LLM gateway](/docs/integrations-llm), which needs no key, so a placeholder goes in the key field. Usage counts against your exe.dev LLM allocation. Other providers' plugins work too, with their own keys.

### Who can see my console and my apps?

The console on port 8080 is reachable only by people you share the VM with, and they still need a Dify account. Published apps and the API on port 8000 are private too until you run `share set-public`; then anyone can open your web apps, and the API needs an app's key.

### Can customers use my chatbot without an exe.dev account?

Yes, once port 8000 is public. It serves only web apps, the API, MCP, and webhooks, so making it public doesn't expose the console. See [Go public](#go-public).

### Is this the same as Dify Cloud?

It's the same open-source Dify (the Community Edition), with one workspace. It has no hosted model credits, no billing, and no single sign-on; email invitations need SMTP, but Dify shows an invitation link you can send yourself.

### Can I use Dify commercially?

Yes, including as the backend for your own products. The license adds two conditions to Apache 2.0: running Dify as a multi-tenant service needs a commercial license, and you may not remove Dify's logo or copyright from its web pages.

### How much does it cost?

Dify's Community Edition is free. You pay for your [exe.dev plan](https://exe.dev/pricing) and the disk, and model calls count against your exe.dev [LLM allocation](/docs/integrations-llm).


## Related

- [Self-host Open WebUI](https://exe-staging.dev/deploy/open-webui.md): A private ChatGPT for you and your team. No API keys.
- [Self-host n8n](https://exe-staging.dev/deploy/n8n-2.md): Connect your apps. Let the boring bits run themselves.
- [Deploy a Docker Compose app from GitHub](https://exe-staging.dev/deploy/docker-compose.md): Your compose.yaml on a VM of its own. git push to deploy.
- [Give agents API access without giving them the keys](https://exe-staging.dev/deploy/agent-secrets.md): Your agents call your APIs. The keys stay with exe.dev, outside the VM.
- [Self-host PostgreSQL](https://exe-staging.dev/deploy/postgres.md): Your own Postgres on a real disk, with backups you've actually restored.
- [Spinning up a Marimo Notebook](https://exe-staging.dev/deploy/marimo.md): An open source reactive notebook
