Environment variables
Every setting in .env, what it does and its default.
Copy .env.example to .env. Next.js reads it at start; restart after a change. Settings the head coach changes every day (gym name, address, hours, plans and prices) live in the database instead: Coach > Settings.
#Core
| Variable |
Default |
What |
DATABASE_URL |
file:./liyaqa.db |
SQLite file next to the schema, or a PostgreSQL URL (Requirements) |
SITE_URL |
http://localhost:3306 |
public address: sitemap, the ingest URL shown to members, secure cookies when it starts with https:// |
AUTH_SECRET |
– |
signs the session cookies; 32+ random characters |
GYM_TIMEZONE |
Asia/Muscat |
decides what "today" is for logs, streaks, check-ins and challenges |
UPLOAD_MAX_MB |
8 |
largest progress photo or coach image |
STORAGE_DIR |
./storage |
where uploads are kept (progress photos and coach images) |
#Accounts made by the seed
| Variable |
Default |
What |
HEAD_COACH_EMAIL / HEAD_COACH_PASSWORD / HEAD_COACH_NAME |
coach@liyaqa.test / liyaqa-demo-2026 |
the first head coach; created whenever it does not exist yet |
DEMO_MEMBER_EMAIL / DEMO_MEMBER_PASSWORD |
member@liyaqa.test |
the sample member with the richest data |
SAMPLE_PASSWORD |
liyaqa-demo-2026 |
password of every other sample account |
DEMO_INGEST_KEY |
a sample key |
a known ingest key for the demo member, so the curl examples work; leave empty on a real gym |
#Demo
| Variable |
Default |
What |
DEMO_HINT |
0 |
1 shows the demo sign-ins on the sign-in page |
DEMO_MODE |
0 |
1 makes both dashboards read-only with a banner (Demo mode) |
#Email (optional)
Used only for "forgot password" codes.
| Variable |
What |
MAIL_API_URL |
an HTTP email API that accepts {from, to, subject, text} JSON (Resend's https://api.resend.com/emails works as it is) |
MAIL_API_KEY |
sent as Authorization: Bearer … |
MAIL_FROM |
sender, e.g. Liyaqa <no-reply@your-gym.om> |
Without these the forgot-password page explains how to get a new password from the gym.
#AI (optional)
| Variable |
Default |
What |
AI_BASE_URL |
– |
any OpenAI-compatible endpoint, e.g. https://api.openai.com/v1 or a local Ollama http://localhost:11434/v1 |
AI_API_KEY |
– |
sent as a Bearer token when set |
AI_MODEL |
gpt-4o-mini |
model name |
Without AI both assistants still work with built-in rules (AI assistant).