Environment Variables

Complete reference for configuring a Storno.ro deployment. All variables are set in .env.local (development) or passed as environment variables (Docker / production).


Core

VariableRequiredDefaultDescription
APP_SECRETYesSymfony application secret. Use a random 32+ character string.
APP_ENVNodevEnvironment: dev, prod, or test
DATABASE_URLYesMySQL connection string, e.g. mysql://user:[email protected]:3306/storno
FRONTEND_URLYesFrontend URL for CORS origins and email links, e.g. https://app.storno.ro
PUBLIC_API_BASEYesHow the browser reaches the API. For single-domain setups this is FRONTEND_URL + /api (e.g. https://app.storno.ro/api), NOT a separate subdomain.
CORS_ALLOW_ORIGINNolocalhostCORS allowed origins regex. Must match your FRONTEND_URL. Example: ^https://app\.storno\.ro$

Authentication

VariableRequiredDefaultDescription
JWT_PASSPHRASEYesPassphrase for JWT RSA key pair
REGISTRATION_ENABLEDNo1Set to 0 to disable public registration
GOOGLE_CLIENT_IDNoGoogle OAuth client ID for Google Sign-In. In Docker Compose, this single value is mapped to OAUTH_GOOGLE_CLIENT_ID (backend) and NUXT_PUBLIC_GOOGLE_CLIENT_ID (frontend) automatically.
GOOGLE_CLIENT_SECRETNoGoogle OAuth client secret. Mapped to OAUTH_GOOGLE_CLIENT_SECRET (backend) in Docker Compose.
TURNSTILE_SECRET_KEYNoCloudflare Turnstile secret key for bot protection on login/register. If empty, captcha validation is skipped.
TURNSTILE_SITE_KEYNoCloudflare Turnstile site key. If empty, a test key is used (always passes). Get keys from Cloudflare dashboard.

ANAF / e-Factura

VariableRequiredDefaultDescription
OAUTH_ANAF_CLIENT_IDNoANAF OAuth client ID for e-Factura API access. Register at ANAF API portal.
OAUTH_ANAF_CLIENT_SECRETNoANAF OAuth client secret
OAUTH_ANAF_CLIENT_REDIRECT_URINoOAuth callback URL registered with ANAF. Must be https://<your-domain>/auth/callback/anaf/ (e.g. https://app.storno.ro/auth/callback/anaf/).
REDIRECT_AFTER_OAUTHNoFrontend URL to redirect to after ANAF OAuth flow

Email

VariableRequiredDefaultDescription
MAILER_DSNYesMail transport DSN, e.g. ses+smtp://KEY:[email protected]
MAIL_FROMNo[email protected]Default sender email address

Storage (S3)

VariableRequiredDefaultDescription
AWS_S3_BUCKETYesS3 bucket name for file storage (PDFs, XMLs, attachments)
AWS_DEFAULT_REGIONNous-east-1AWS region for S3
AWS_ACCESS_KEY_IDYesAWS IAM access key
AWS_SECRET_ACCESS_KEYYesAWS IAM secret key
STORAGE_ENCRYPTION_KEYNoEncryption key for user-provided storage credentials

Queue & Cache

VariableRequiredDefaultDescription
REDIS_URLNoredis://localhost:6379Redis connection URL. Used for cache and message queue in production.
💡

In development, the message queue and cache use the filesystem/database automatically. Redis is only required in production.

Real-time (Centrifugo)

VariableRequiredDefaultDescription
CENTRIFUGO_API_URLNoCentrifugo HTTP API URL, e.g. http://centrifugo:8000/api
CENTRIFUGO_API_KEYNoCentrifugo API key for server-to-server calls
CENTRIFUGO_TOKEN_HMAC_SECRETNoHMAC secret for generating client connection tokens

Stripe (Payments)

VariableRequiredDefaultDescription
STRIPE_SECRET_KEYNoStripe API secret key
STRIPE_PUBLISHABLE_KEYNoStripe publishable key (exposed to frontend)
STRIPE_WEBHOOK_SECRETNoSigning secret for Stripe webhook verification
STRIPE_CONNECT_WEBHOOK_SECRETNoSigning secret for Stripe Connect webhooks
STRIPE_PLATFORM_FEE_PERCENTNo2.0Platform fee percentage for Stripe Connect payments

PDF & Validation

VariableRequiredDefaultDescription
WKHTMLTOPDF_PATHNo/usr/local/bin/wkhtmltopdfPath to wkhtmltopdf binary for PDF generation
JAVA_SERVICE_URLNohttp://127.0.0.1:8082Java service URL for UBL XML validation and digital signatures

Self-Hosted

VariableRequiredDefaultDescription
LICENSE_KEYYesLicense key for self-hosted instances. Obtain from Licensing.
LICENSE_SERVER_URLNohttps://api.storno.roLicense validation server URL

Minimal Configuration

For a minimal self-hosted deployment, these variables are required:

APP_SECRET=your-random-secret-string-here
APP_ENV=prod
DATABASE_URL=mysql://storno:password@db:3306/storno
JWT_PASSPHRASE=your-jwt-passphrase
FRONTEND_URL=https://your-domain.com
MAILER_DSN=smtp://user:[email protected]:587
AWS_S3_BUCKET=your-bucket
AWS_ACCESS_KEY_ID=AKIA...
AWS_SECRET_ACCESS_KEY=your-secret
LICENSE_KEY=your-license-key

Generate the JWT key pair after setting the passphrase:

php bin/console lexik:jwt:generate-keypair