Skip to content

Configuration Options

The acme.config.json file in your project root controls build settings, deployment targets, routing rules, and more. This page documents every supported field.

{
"name": "my-project",
"build": {
"command": "npm run build",
"output": "./dist",
"node_version": "20"
},
"deploy": {
"target": "cloudflare-workers",
"routes": ["example.com/*"],
"minify": true
},
"env": {
"production": {
"API_URL": "https://api.example.com"
},
"preview": {
"API_URL": "https://staging-api.example.com"
}
}
}
FieldTypeRequiredDescription
namestringYesProject name. Must be URL-safe (lowercase, hyphens allowed).
buildobjectNoBuild configuration (see below).
deployobjectNoDeployment configuration (see below).
envobjectNoEnvironment variable overrides keyed by environment name.
FieldTypeDefaultDescription
commandstring"npm run build"Shell command to run during the build step.
outputstring"./dist"Directory containing the build output, relative to project root.
node_versionstring"20"Node.js major version used during remote builds.
install_commandstring"npm ci"Command to install dependencies before building.
FieldTypeDefaultDescription
targetstring"cloudflare-workers"Deployment target. Options: cloudflare-workers, docker, static.
routesstring[][]Custom domain routing patterns (e.g., ["example.com/*"]).
minifybooleantrueWhether to minify the output during deployment.
regionstring"auto"Preferred deployment region. Use "auto" for global distribution.

Environment-specific variable overrides. Keys are environment names (production, preview, or custom names), and values are objects mapping variable names to their values.

{
"env": {
"production": {
"DATABASE_URL": "postgres://prod-host:5432/db",
"LOG_LEVEL": "warn"
},
"preview": {
"DATABASE_URL": "postgres://staging-host:5432/db",
"LOG_LEVEL": "debug"
}
}
}

Run the following command to validate your configuration file against the schema:

Terminal window
acme config validate

This checks for missing required fields, invalid values, and deprecated options.