Configuration
Everything a buyer might change without editing code is in the admin panel.
.env holds the rest.
Essential
| Variable | Effect if unset |
|---|---|
APP_KEY |
Encrypted API keys cannot be read. Never rotate it without re-entering every key. |
APP_URL |
Generated links point at the wrong host |
LOOM_SITES_DOMAIN |
Published sites have no address |
ANTHROPIC_API_KEY (or another provider) |
Generation fails with "no provider configured" |
QUEUE_CONNECTION |
Defaults to sync, so a generation blocks the whole request |
Credits
| Variable | Default | Effect |
|---|---|---|
LOOM_CREDITS_ENABLED |
true |
Set false to remove metering entirely |
LOOM_SIGNUP_CREDITS |
50 |
Granted once, on registration |
LOOM_PUBLISH_COST |
5 |
Charged only when a build succeeds |
LOOM_GENERATION_HOLD |
10 |
Reserved before a run; the surplus is refunded |
AI_CREDITS_PER_USD |
100 |
Credits per dollar of provider spend |
AI_MARGIN |
1.5 |
Multiplier on top of cost |
A run reserves credits up front and settles against real token usage afterwards, so a generation can never cost more than was held.
Build pipeline
| Value | Behavior |
|---|---|
auto |
esbuild when available, runtime otherwise. Recommended. |
bundled |
Always bundle. Fails loudly if Node is missing. |
runtime |
Never shell out. Correct for shared hosting. |
The runtime driver ships source and transpiles in the visitor's browser: slower first paint, but it runs anywhere PHP does.
Preview engine
LOOM_PREVIEW_SOURCE=self serves the framework and transpiler from your own
host, so an air-gapped install still previews. cdn resolves them from
LOOM_PREVIEW_CDN instead, which sheds the bytes.
To self-host, run npm run build:vendor — it writes the ESM builds into
public/vendor/preview/.
Limits
Hard ceilings in config/loom.php apply on top of per-plan limits and protect
the host regardless of how generous a plan is: 400 files per project, 512 KB per
file, 12 MB total, 8 levels of nesting.
Licence tier
LOOM_LICENSE_TIER=regular covers one end product whose users are not charged —
billing stays off. extended permits SaaS resale and unlocks it.