Budibase/budibase · error · Error
No Budibase URL found
Error message
No Budibase URL found
What it means
Thrown when converting a file to base64 for upload via the Budibase Cloud AI file-upload endpoint, but env.BUDICLOUD_URL is not set. File uploads through Budibase AI (non-image, or images routed through cloud) require the cloud upload service, so without the URL the operation cannot proceed.
Source
Thrown at packages/server/src/sdk/workspace/ai/llm/bbai.ts:269
if (!response.ok) {
throw await HTTPError.fromResponse(response)
}
const result = await response.json()
if (typeof result.id !== "string") {
throw new Error("File id not found")
}
return unwrapLiteLLMFileId(result.id)
} else {
const fileBuffer = Buffer.from(await fileBlob.arrayBuffer())
const base64 = fileBuffer.toString("base64")
if (isImage) {
return `data:${type};base64,${base64}`
}
if (!env.BUDICLOUD_URL) {
throw new Error("No Budibase URL found")
}
const licenseKey = await licensing.keys.getLicenseKey()
if (!licenseKey) {
throw new Error("No license key found")
}
const response = await fetch(
`${env.BUDICLOUD_URL}/api/ai/upload-file`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
[constants.Header.LICENSE_KEY]: licenseKey,
},
body: JSON.stringify({
data: base64,
filename,
contentType: type,View on GitHub (pinned to a81a902e9a)
Solutions
- Set BUDICLOUD_URL to your Budibase Cloud endpoint in the environment of the service performing the upload
- Confirm the variable name is exactly BUDICLOUD_URL (no underscores)
- Restart the service after adding the env var
- If you do not use cloud file upload, avoid attaching files to Budibase AI chat/agents
Example fix
# before: .env missing cloud url LITELLM_URL=http://litellm:4000 # after BUDICLOUD_URL=https://cloud.budibase.com LITELLM_URL=http://litellm:4000
Defensive patterns
Strategy: validation
Validate before calling
if (!env.BUDICLOUD_URL) {
throw new Error("BUDICLOUD_URL must be set to upload files via Budibase AI")
} Try / catch
try {
await uploadToCloud(file)
} catch (e) {
if (e.message === "No Budibase URL found") {
return { error: "File upload unavailable: Budibase Cloud is not configured" }
}
throw e
} Prevention
- Set BUDICLOUD_URL (exact spelling) in every backend service env
- Add a config validation step at boot listing required AI-related env vars
- Disable file-attachment features in UI/config when cloud upload is unavailable
When it happens
Trigger: createBBAIClient attempts to upload a non-image file (or file requiring cloud path) while BUDICLOUD_URL is missing from the environment — typical in self-hosted installations without a Budibase Cloud license endpoint configured.
Common situations: Self-hosted deployments that never set BUDICLOUD_URL; cloud URL configured on server but not on the service performing the upload (worker); typos like BUDI_CLOUD_URL.
Understand the failure class
Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.
Related errors
- No license key found
- Gemini File Search failed. Set GEMINI_API_KEY on your local
- Budibase AI is not configured in this environment (BBAI_LITE
- Workspace DB not found - self-host users using cloud don't h
- CouchDB username not set
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/ede05e49485a4d46.
Report an issue: GitHub.