Skip to content
v2.7

Variables

Site variables and global project variables, at build time and in SSR, the OWBASE_SITE_* variables and when a change takes effect.

Variables reach the build and the SSR server in process.env. Use them for URLs, keys to other services and any configuration that changes between environments. Never leave a secret in the uploaded code.

  • Site: the site’s Variables tab. They apply only to it.
  • Global: Project settings → Global variables. They apply to all of the project’s functions and sites. If the site has a variable with the same name, its own wins.

Names: letters, numbers and _, not starting with a number. Check Secret for sensitive values: once saved, the value no longer appears in the console or the API.

  • On a static site, variables exist only during the build. The framework decides which ones end up in the browser code (for example, those starting with VITE_ in Vite): everything that goes to the browser is public, so no secrets in those.
  • On an SSR site, they also exist on the server, on every request, and don’t reach the browser unless your code sends them.

At build time and in SSR:

Variable What it is
OWBASE_SITE_API_ENDPOINT https://cloud.owbase.dev/v1: use it in the SDK’s setEndpoint
OWBASE_SITE_PROJECT_ID project ID
OWBASE_SITE_ID, OWBASE_SITE_NAME site ID and name
OWBASE_SITE_DEPLOYMENT deployment ID
OWBASE_SITE_RUNTIME_NAME, OWBASE_SITE_RUNTIME_VERSION runtime (Node, 22)
OWBASE_SITE_CPUS, OWBASE_SITE_MEMORY available CPU and memory
OWBASE_VERSION Owbase server version

For the SSR server to talk to the API with privileges (read other users’ data, for example), create a key under API keys with only the scopes needed and store it in a secret variable of the site.

The console warns you (“Settings or variables changed”) and offers Redeploy, which rebuilds the active code with the site’s current settings and the new variables.

A project global variable applies to all sites, and each site needs its own new deployment (or Redeploy) to see the change.

Was this page helpful?