Interactive .env Generator โ
Use this interactive questionnaire to quickly generate a clean, secure .env file tailored for your deployment.
๐
100% Client-Side Cryptography: All passwords and cryptographic secrets are generated in your browser memory using
window.crypto. Zero network telemetry or data retention. Start from:
Quick fill:
The public address you open in your browser or mobile app. Essential for CORS security and cookie sessions. For a direct or LAN address the port must match SPARKY_FITNESS_FRONTEND_PORT (3004), which is kept in step for you; behind a reverse proxy the URL has no port and none is added. PostgreSQL Superuser
The account that owns the schema and runs migrations. The database name, host and the restricted application user all have working defaults โ change them in Database Names & Connection below if you need to.
Setting up for the first time? Pick these now. PostgreSQL reads them only while it initialises an empty data directory; on every later start it keeps the credentials it already has. Changing them here afterwards does not rename the user or change the password โ it only changes what the server tries to log in with, and the connection then fails. To rotate them on a running instance,
ALTER the role inside PostgreSQL first, then put the new values here so the two match. Admin database user for migrations and RLS policies.
Database superuser password.
Security & Encryption Keys
Cryptographic secrets used to protect stored data and authenticate active sessions.
64-character Hex string (256-bit AES). Encrypts external API keys and tokens in Postgres.
Signs session JWTs and encrypts TOTP 2-Factor Authentication keys. Keep persistent.
Optional Configuration ModulesSelect what you need for your deployment environment
Click to Enable
Click to Enable
Click to Enable
Click to Enable
Click to Enable
Click to Enable
Click to Enable
Using defaults
Click to Enable
Click to Enable
Off
โ ๏ธ Check this before you use it. This generator is new and may still get things wrong. Read the output, confirm the values match your deployment โ especially ports, paths and URLs โ and keep a copy of any existing
.env before replacing it. See the Environment Variables reference for what each setting does. Hidden by default โ it contains your database password, encryption key and auth secret in clear text. You do not need to reveal it to copy or download the file.
What to do with the generated .env file? โ
- Place the generated
.envfile in the same directory as yourdocker-compose.yml. - Run:bash
docker compose pull && docker compose up -d - Open your browser to the URL you configured above (e.g.
http://localhost:3004). - Register your account. Unless you set
SPARKY_FITNESS_DISABLE_SIGNUP=true, the very first user to sign up is granted full Administrator privileges. If you setSPARKY_FITNESS_ADMIN_EMAIL, register with that address โ the server promotes the matching account on every startup. - Configure the rest from the right place for each feature:
- AI providers and OpenFoodFacts โ Admin > System Settings in the web interface.
- Garmin โ each user connects their own account under their integration settings.
- SMTP โ environment variables only; use the SMTP module in the generator above.
