Skip to main content
pxxl.toml keeps your build and routing settings in your repository, so they deploy and roll back with your code. Put it in the repo root, or in the project’s base directory.
pxxl.toml

How it’s read

  • Pxxl reads pxxl.toml from GitHub at the commit being deployed. It looks in the base directory first, then the repo root.
  • pxxl.toml settings override the build settings saved in the dashboard.
  • If the file is invalid (wrong types, bad routing), the deploy fails and your current version stays live.
  • Unknown keys are ignored. Check spelling.
  • Don’t put secrets here. It’s committed with your code.
CLI deploys (pxxl deploy) use a few top-level keys instead. See Keys the CLI uses.
If the base directory has a Dockerfile, Pxxl builds it as a Docker project. [build], [packages], [env] and [functions] don’t apply then. Routing still does.

version

Required when you use any routing keys. The only value is 1.

build

How Pxxl installs, builds, and starts your app. Some keys have short aliases. Unsupported versions fall back to the default. Rust always uses stable.

packages

System packages to install. Up to 80 in total.

env

Plain, non-secret values for the build. Up to 80 keys, each value up to 8 KB.
A variable with the same name in the dashboard wins. Put secrets and runtime config in environment variables, not here.

services

For a project with multiple services. Each [services.<alias>] block changes one service you’ve already added in the dashboard. The alias must match. Keys: language, runtime, framework, packageManager, packageManagerVersion, installCommand, buildCommand, startCommand, entryFile, outputDirectory, baseDirectory, port, runtimeVersion, buildPackages, runtimePackages (with the same aliases as [build]).
Order of precedence: dashboard, then [build], then [services.<alias>].

routing

Routing rules run at the Pxxl edge, for static sites, web services, and functions. They need version = 1.

redirects

Send the browser to a new URL.
Redirect loops are rejected.

rewrites

Serve a different path, or proxy to another site, without changing the URL in the browser.
External rewrites are proxied by the edge. The method, body, query, cookies, and Authorization header are passed on. The destination must be https:// on port 443. Private IPs, localhost, .internal, .local, and Pxxl’s own domains are blocked.

headers

Add response headers.
Up to 32 headers per rule. You can’t set Authorization, Cookie, Set-Cookie, Host, Content-Length, Connection, Upgrade, Transfer-Encoding, Proxy-*, or X-Pxxl-*.

Path patterns

Use the same names in the destination: /:slug to /posts/:slug. Query strings are kept unless the destination sets its own.

Conditions

Match a rule only when a header, cookie, host, or query value is present (has) or absent (missing). Up to 8 per rule.
has_header = { key = "user-agent", regex = "..." } is a short form for one header condition.

Order and limits

  1. Response headers
  2. Redirects
  3. Rewrites
  4. Clean URLs
  5. SPA fallback
  6. Static files
Within each list, more specific (longer) sources match first. Real files like /favicon.ico and /assets/app.js win over parameter rewrites. Up to 64 rules in total. If you also have a vercel.json with routing, the deploy fails. Keep routing in one file.

microfrontends

Serve other projects of the same workspace on this project’s domains, each owning its own paths. Put it in the default app’s pxxl.toml; it applies with that project’s next deployment. See Microfrontends.
Limits: 20 apps and 64 paths per group. A server app’s paths need a fixed first segment, such as /blog/:path*.

functions

Turn a folder of handlers into HTTP endpoints. See Functions.

Not in pxxl.toml

Set these in the dashboard instead: health check path, replicas, CPU and memory, volumes, region, domains, cron jobs, and secrets.

Keys the CLI uses

pxxl init, pxxl link, and pxxl deploy write a few top-level keys. When you deploy with the CLI, these are the settings that apply: The two styles can live in one file. Git deploys read [build] and the sections above; CLI deploys read the top-level keys.

.pxxlignore

The CLI leaves these out of every upload: .git, node_modules, .env, .env.*, *.log, dist, build, .next, .turbo, .cache. Pxxl builds your app from source, so build folders don’t need uploading. .pxxlignore uses .gitignore syntax:
.pxxlignore
The CLI currently rewrites .pxxlignore with its default list when it updates pxxl.toml (init, link, unlink, and after each deploy). Extra lines you add are lost. Until this is fixed, re-add them before deploying, or keep large files out of the folder.
The CLI also skips symlinks and files that look like private keys (*.pem, *.key, id_rsa, credentials.json).

Full example

A Vite app that proxies /api to a backend, caches assets, and redirects an old path:
pxxl.toml