Configuration
Shiloh runs Tienda for its customers. This page is for people who run their own installation. It lists the names of the environment variables the application reads and what each does. It gives no values. A variable that is not set means the feature is off or a default applies, as noted.
This list is made from the code of release 1.1.0. A variable not listed here is either for development and tests or is not documented yet.
Core
| Name | What it does |
|---|---|
secret_key_base, set from the environment variable of that name in capitals | Required. The application's root secret. Keep it secret and stable. |
DATABASE_HOST, DATABASE_PORT, DATABASE_NAME, DATABASE_USERNAME, DATABASE_PASSWORD | The PostgreSQL connection. |
REDIS_URL | The Redis connection used for commands to the print hub. |
RAILS_LOG_LEVEL | Log level. Default info. Keep it at info or higher: at debug the whole mail is written to the log. |
RAILS_MAX_THREADS, WEB_CONCURRENCY, PORT | Web server threads, processes and port. |
SOLID_QUEUE_IN_PUMA | When set, the background job worker runs inside the web process. |
JOB_CONCURRENCY | Number of job worker processes. Default 1. |
Addresses
| Name | What it does |
|---|---|
API_PUBLIC_URL | The public address of the API, used when Tienda builds links to files and tickets. |
ADMIN_FRONTEND_URL | The back office address, used when returning from an accounting provider's consent page. |
COMMERCE_HOME_SHOP_HOSTS | A comma separated list of hosts that the installation's first shop answers for when no shop front claims the host. See Shop fronts and domains. |
Search
| Name | What it does |
|---|---|
MEILISEARCH_HOST | The search server. |
MEILISEARCH_API_KEY | The search server's key. If it is not set, MEILI_MASTER_KEY is used. |
File storage
| Name | What it does |
|---|---|
AWS_S3_BUCKET, AWS_S3_ENDPOINT, AWS_S3_REGION, AWS_S3_ACCESS_KEY_ID, AWS_S3_SECRET_ACCESS_KEY | An S3-compatible store for uploaded files such as product images. |
| Name | What it does |
|---|---|
POSTAL_HOST, POSTAL_SERVER_KEY | The installation's own mail server. A shop can have its own settings, which win. |
POSTAL_WEBHOOK_SECRET | Secret for the mail server's inbound webhook (replies and messages for CRM). |
POSTAL_WEBHOOK_PUBLIC_KEY | The mail server's public key, to verify delivery reports. See E-mail log. |
KARTA_WEBHOOK_SECRET | The secret of the Karta mail server's webhook, for delivery reports. Several, separated by commas, while rotating. |
OUTGOING_EMAIL | off stops the mail of every shop of the installation, and any mail whose shop cannot be told. Only the sign-in code of staff still goes out. The log shows each stopped mail as skipped. See E-mail log. |
MCP_CONCURRENT_CALLS, MCP_CONCURRENT_CALLS_PER_SHOP | How many MCP tool calls may run at the same time for one agent key (default 2) and for all the keys of one shop (default 3). Keep the shop value below the number of server threads. See MCP overview. |
EMAIL_LOG_BODY_DAYS, EMAIL_LOG_ROW_DAYS | How long the e-mail log keeps texts (default 90) and rows (default 400). See Data retention. |
Sign in with the Shiloh account
TIENDA_OIDC_ISSUER, TIENDA_OIDC_CLIENT_ID, TIENDA_OIDC_CLIENT_SECRET,
TIENDA_OIDC_APP_URL are required to switch it on. TIENDA_OIDC_REDIRECT_URI,
TIENDA_OIDC_ALLOWED_HOSTS and TIENDA_OIDC_SCOPES are optional. See
Sign in with the Shiloh account.
AI agents over OAuth
| Name | What it does |
|---|---|
TIENDA_OAUTH_ISSUER | The origin of the OAuth authorization server that clients are told about. Default: the request's own base URL. |
TIENDA_MCP_RESOURCE_URL | The audience and resource of an MCP token, exactly the public MCP address. Default: <base URL>/mcp. |
Set both to the fixed public values in production, so a proxy alias cannot change
the issuer or the audience a client is told about. The OAuth sign-in reuses the
TIENDA_OIDC_* provider: it needs no separate provider client. See
MCP overview.
Payment gateways
| Name | What it does |
|---|---|
SENTOO_MERCHANT_ID, SENTOO_MERCHANT_SECRET, SENTOO_TEST_TOKEN | A Sentoo account for the installation's first shop, used only when that shop has none of its own. |
PAGA_DIRECT_TOKEN, PAGA_DIRECT_TEST_TOKEN | The same for PagaDirect. |
SENTOO_URL, PAGA_DIRECT_URL | Force one gateway address for every shop, for a test installation that must never reach production. |
Other shops never fall back to these accounts.
POS mirror
A shop normally keeps its POS connection on the settings page. For one shop
without a stored connection, these variables work instead:
POS_SYNC_BASE_URL, POS_SYNC_API_KEY (both needed), POS_SYNC_APPLICATION_ID
(required when the installation has more than one shop), POS_SYNC_COMPANY_ID,
POS_PUSH_ENABLED, POS_SYNC_WEBHOOK_SECRET, POS_SYNC_OPENING_HOURS
(false keeps the POS hours out of the store hours). See
Connect a POS.
Events
| Name | What it does |
|---|---|
EVENTS_RESERVATION_MINUTES | How long a reserved ticket is held for an unpaid checkout. Default 30. |
EVENTS_UNPAID_ORDER_HOURS | How long an unpaid ticket order stays open. Default 48. |
EVENTS_WAITLIST_HOLD_HOURS | How long a place offered from the waiting list is held. Default 24. |
Accounting
| Name | What it does |
|---|---|
INTUIT_OAUTH_CLIENT_ID, INTUIT_OAUTH_CLIENT_SECRET, INTUIT_OAUTH_REDIRECT_URI | The QuickBooks application. |
INTUIT_SANDBOX | When not set to false, QuickBooks stays on the provider's sandbox. QuickBooks has not been tried against a real company. |
Printing and hub
| Name | What it does |
|---|---|
HUB_MAX_PAYLOAD_BYTES | Largest message accepted from a print hub. |
HUB_REDIS_POOL | Size of the Redis connection pool for hub commands. |
LABEL_PRINTER_IP, LABEL_PRINTER_PORT, LABEL_PRINTER_USB_PATH | A label printer reached directly. |
Other
| Name | What it does |
|---|---|
NOMINATIM_URL, NOMINATIM_EMAIL | The address lookup service used for customer addresses, and the contact address it asks for. |
OPENAI_API_KEY, OPENAI_ORG_ID | Optional. Switch on the features that use an AI service. |
Installable admin and driver apps
The admin and driver have separate manifests (id and scope / on their own
hosts), existing Tienda icons, iOS metadata and phone/desktop screenshots. Use
Install in Chrome, or Share → Add to Home Screen on iPhone. New service
workers wait for Update available → Reload.
These surfaces use the shared L1 generator in frontend/packages/shared/pwa.
Each app's build script runs it after Vite/SvelteKit. It fingerprints copies of
the existing icon PNGs, lists the build's hashed public CSS/JS/font assets, and
versions the worker from that list and its source. The shop retains its separate
worker and catalogue policy.
The worker stores only those public assets and /offline.html. Navigations
always use the network, falling back to the public offline page. API responses,
authenticated HTML, uploads and arbitrary query variants are never cached.
Admin technical documentation paths bypass the worker. Nginx serves /sw.js
with Cache-Control: no-cache from an exact-match location; the SPA HTML is
no-store. Browser history restores revalidate, and offline SPA Back navigation
opens the fallback page.
On driver upgrades, activation removes the old Workbox precache and
driver-api/delivery-api caches. The former localStorage route cache is also
removed; routes and stops now require a connection. Logout clears session and
local route/status state. This L1 change preserves already pending driver
write actions; it does not add offline actions or push notifications.
Validation commands: node --test frontend/packages/shared/pwa/worker.test.cjs,
bun run --cwd frontend/apps/driver test, the admin/shared Vitest suites, and
both frontend production builds. Check a production Nginx build in Chromium:
manifest/icon MIME types, installability, active worker, actual cache contents,
logout → offline → Back, and a waiting worker's explicit Reload.
Verifying a deployment
The release workflow pins the API, admin, shop and driver to the full commit SHA.
OSRM uses the commit SHA plus pipeline number; tiles keep the quarterly latest
image. Before requesting deployment, bin/ci-verify-deploy prepare resolves each
registry tag to its pushed manifest or index digest and records the running
container IDs. After the request, verify waits up to ten minutes and compares
Docker's running image IDs with those pushed digests. The production host uses Docker's
containerd image store, whose image IDs are OCI index digests; the Linux amd64
config digest is recorded separately and must not be confused with that ID. The code containers must
also be recreated after the request and be running and healthy. Unchanged tiles
may keep their container. A mismatch fails the deploy step, even if the deployment controller
accepted the request.
Verification uses repository-scoped commerce_verify_ssh_key and
commerce_verify_known_hosts CI secrets, available only to release events in the
Python image. SSH reads only selected container fields on the production host; container
environment variables are never collected. Registry credentials use the existing
CI registry secrets. HTTP release markers are supplementary evidence, not the
image verification gate. The verification does not change running containers or
customer data and does not roll back automatically.