Files
shit_in_a_vault/000-configs/tools/VITE_PREVIEW_INSTRUCTIONS.md

3.0 KiB

title, status, folder, tags, created, updated, version
title status folder tags created updated version
Vite Preview Server active 000-configs/tools
tool
vite
preview
dev-server
2026-07-29 2026-07-29 1.0.0

Vite Preview Instructions for Open WebUI Coding AI

Use this when the user asks to make a Vite/React app live, visible, public, previewable, or available at the preview URL.

Public Preview URL

The stable public preview URL is:

https://preview.boogerclub.com

Caddy on the host already proxies this hostname to the open-terminal container on port 5173:

preview.boogerclub.com -> open-terminal:5173

Do not change the Open WebUI URL. Open WebUI stays at:

https://openwebui.boogerclub.com

Where Apps Live

Inside the Open WebUI terminal container:

/home/user/projects
/home/user/repos

On the host these map to:

/home/ubuntu/openwebui/projects
/home/ubuntu/repos

Start Command

For a Vite app, run this from the app directory:

npm run dev -- --host 0.0.0.0 --port 5173

Only one app can use the public preview slot at a time. If port 5173 is already in use, stop the old Vite dev server before starting the new one.

Required Vite Host Allowlist

If the preview URL shows this error:

Blocked request. This host ("preview.boogerclub.com") is not allowed.
To allow this host, add "preview.boogerclub.com" to `server.allowedHosts` in vite.config.js.

Add this to vite.config.ts or vite.config.js:

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [react()],
  server: {
    allowedHosts: ['preview.boogerclub.com'],
  },
})

If the config already has a server block, add only:

allowedHosts: ['preview.boogerclub.com']

Then restart Vite with:

npm run dev -- --host 0.0.0.0 --port 5173

Verification

From inside the terminal container, verify Vite is running:

curl -I http://127.0.0.1:5173

Expected result:

HTTP/1.1 200 OK

From the public internet, verify the live preview:

curl -I https://preview.boogerclub.com

Expected result:

HTTP/2 200
via: 1.1 Caddy

Also confirm Open WebUI still works:

curl -I https://openwebui.boogerclub.com

Expected result:

HTTP/2 200

Common Fixes

  • 502 from https://preview.boogerclub.com: Caddy is up, but no Vite server is listening on open-terminal:5173. Start the app with the standard command.
  • Blocked request... host is not allowed: add preview.boogerclub.com to server.allowedHosts in the app's Vite config and restart Vite.
  • App works at 127.0.0.1:5173 but not the public URL: check allowedHosts, then check DNS for preview.boogerclub.com.
  • Open WebUI should not be moved to the preview URL. Keep it on https://openwebui.boogerclub.com.

Current Known Working Example

The current working example app is:

/home/user/projects/candlestick-dashboard

It is configured with:

server: {
  allowedHosts: ['preview.boogerclub.com'],
}