Getting started
Every setting, in one place.
Each app reads its own .env. The defaults work on your machine; this page says what to change for a real deployment.
The API
The API reads back-end/.env.
PORT: the API's port,8000by default.DB_TYPE:sqlite(the default, withSQLITE_DATABASEas the file) ormysql, withDB_HOST,DB_PORT,DB_USERNAME,DB_PASSWORDandDB_DATABASE.JWT_SECRETandJWT_EXPIRATION: the signing secret for sessions and how long a session lasts.CORS_ORIGIN: the browser origins allowed to call the API: the website and the dashboard.DASHBOARD_URLandPUBLIC_API_URL: where people reach the dashboard and the API, used in emails and links.SMTP_HOST,SMTP_PORT,SMTP_SECURE,SMTP_USER,SMTP_PASSWORD,SMTP_FROM: the mail server for invitations and password resets. Without them, each message is written to the API's log instead.CONTACT_INBOX: where messages from the contact form are forwarded. They are stored either way.BILLING_PROVIDER,STRIPE_SECRET_KEY,STRIPE_WEBHOOK_SECRET,BILLING_GRACE_DAYS: see Billing.PAYPAL_CLIENT_ID,PAYPAL_CLIENT_SECRET,PAYPAL_ENV: PayPal for the license checkout; see License checkout.R2_ACCESS_KEY_ID,R2_SECRET_ACCESS_KEY,R2_ENDPOINT,R2_BUCKET_NAME,R2_PUBLIC_URL: store uploads in Cloudflare R2. Without all five, uploads go toMEDIA_UPLOAD_DIRon the server.GOOGLE_API_KEY,OPENAI_API_KEY,DEEPSEEK_API_KEY: the assistant's model providers. Leave them empty and each person can add their own key.DEMO_MODE: see Demo mode.
The dashboard
The dashboard reads dashboard/.env.
PORT:3031by default.NEXT_PUBLIC_API_BASE_URL: the API's address, ending in/api. Leave it empty to run the dashboard on its built-in sample data, with no API: any password signs in, each seeded email opens its role, and changes stay in that browser. A Sample data notice says so on every page, andyarn remove:mockdeletes the sample data.NEXT_PUBLIC_WEBSOCKET_BASE_URL: the API's address without/api, for live permission updates.NEXT_PUBLIC_BASE_URLandNEXT_PUBLIC_WEBSITE_URL: the dashboard's own address and this site's.NEXT_PUBLIC_DEMO_MODE: keep it equal to the API'sDEMO_MODE.
The website
This site reads website/.env.
NEXT_PUBLIC_SITE_URL: the site's public address, used for canonical links, the sitemap and sharing cards.NEXT_PUBLIC_API_BASE_URL: the API's address, for the contact form and the license checkout.- Leave
NEXT_PUBLIC_API_BASE_URLempty to run the site on its built-in sample data, with no API: the contact form and the license checkout answer in the browser, the checkout opens the site's own test checkout, and nothing is sent anywhere. A Sample data notice says so on every page. NEXT_PUBLIC_DASHBOARD_URL: the dashboard's address, for sign-in and the live demo.NEXT_PUBLIC_PURCHASE_URL_SINGLEandNEXT_PUBLIC_PURCHASE_URL_STUDIO: an outside store's checkout for each license, if you sell through one. Empty, Continue opens this site's own checkout.NEXT_PUBLIC_DEMO_MODE: shows the demo line in the footer.
The NEXT_PUBLIC_ values are read when an app is built. Change one, then build again.