Repository navigation
Configuration
🌐 Language: EN · DE · FR · ES · TR · EL
All Tesla Carview settings are configured via the .env file at /opt/tesla-carview/backend/.env.
After any change to .env, restart the backend:
docker compose -f /opt/tesla-carview/docker-compose.prod.yml up -d --build backend| Variable | Example | Description |
|---|---|---|
JWT_SECRET |
some-random-64-char-string |
Secret key for signing login tokens. Generate with: openssl rand -hex 32
|
TESLA_CLIENT_ID |
abc123... |
From Tesla Developer Portal |
TESLA_CLIENT_SECRET |
xyz789... |
From Tesla Developer Portal |
TESLA_AUTH_BASE |
https://auth.tesla.com/oauth2/v3 |
Tesla OAuth base URL — pre-filled by setup wizard; only change if Tesla updates their auth endpoint |
FRONTEND_URL |
https://tesla.yourdomain.com |
The public URL of your installation |
DATABASE_PATH |
/app/data |
Where databases are stored (don't change in Docker) |
| Variable | Default | Description |
|---|---|---|
AUTO_UPDATE_ENABLED |
false |
Set to true to auto-update nightly |
MFA_REQUIRED_FOR_NEW_USERS |
false |
Force MFA setup for all new user accounts |
REGISTRATION_REQUIRES_INVITE |
false |
Require an invite code to register a new tenant |
POLL_INTERVAL_MS |
60000 |
How often to poll Tesla API when car is active (ms) |
POLL_SLEEP_INTERVAL_MS |
600000 |
Polling interval when car is sleeping (ms) |
| Variable | Description |
|---|---|
AWATTAR_ENABLED |
true/false — enable aWATTar (DE/AT, free) |
TIBBER_TOKEN |
Your Tibber API token (get at developer.tibber.com) |
| Variable | Default | Description |
|---|---|---|
DEMO_ENABLED |
false |
Enable public demo tenant with fake data |
DEMO_MAX_CONCURRENT |
10 |
Max simultaneous demo users |
DEMO_LIFETIME_DAYS |
14 |
How long demo accounts last |
VAPID keys are required for push notifications ("Charging complete", "Service interval due"). Without them, pushes don't work — the rest of the app runs normally.
| Variable | Default | Description |
|---|---|---|
VAPID_PUBLIC_KEY |
— | Public key — generate with npx web-push generate-vapid-keys
|
VAPID_PRIVATE_KEY |
— | Private key (generated at the same time) |
VAPID_CONTACT |
mailto:noreply@example.com |
Contact URI for the push service — ideally your own email |
Generate both keys with one command:
npx web-push generate-vapid-keysFleet Telemetry provides real-time GPS and telemetry pushed directly from the car to your server — instead of polling the Tesla API every minute. It is optional for most installations, but recommended (or required) for newer Tesla models.
When Fleet Telemetry matters:
- Newer models (e.g. Model Y Juniper, VINs starting with XP7) no longer return GPS data via the standard polling API — Fleet Telemetry is then the only way to get live location data.
- For older models, it's an optional upgrade: lower API load, faster data, and real-time position updates.
Prerequisites:
- The Virtual Key must be paired first (see Tesla API Setup)
- Fleet Telemetry must be approved for your Client-ID in the Tesla Developer Portal — this is a separate approval step beyond basic API access. Request it under your app settings.
| Variable | Description |
|---|---|
FLEET_TELEMETRY_ENABLED |
true/false — enable real-time GPS via Fleet Telemetry |
FLEET_TELEMETRY_PORT |
Port for Fleet Telemetry server (default: 4443) |
VIRTUAL_KEY_PRIVATE_KEY_PATH |
Path to Virtual Key private key file |
openssl rand -hex 32
# Output: something like a8f3e9b2c1d4...
# Copy this into your .env file# View current .env (careful with sharing output — contains secrets):
cat /opt/tesla-carview/backend/.env
# Check which environment variables the running container sees:
docker compose -f /opt/tesla-carview/docker-compose.prod.yml exec backend env | grep -v PASSWORD | grep -v SECRETSome settings do not require .env changes — they are configured directly in the admin interface and stored in the database. These settings survive updates and do not require a container restart.
| Setting | Location | Notes |
|---|---|---|
| SMTP / e-mail delivery | Admin → Admin Settings → E-Mail | Host, port, user, password, sender — includes a send-test button |
| OpenChargeMap API key | Admin → Admin Settings → External APIs | Charging station overlay on route planner — free, register at openchargemap.io/site/develop |
| HERE Maps API key | Admin → Admin Settings → External APIs | Real-time traffic on route planner — free tier (250 k req/month), register at developer.here.com |
| xAI API key | Admin → Admin Settings → External APIs | Grok Chat AI assistant — get at console.x.ai |
| Anthropic API key | Admin → Admin Settings → Monitoring | AI-powered autofix (Claude Haiku) — see below |
| Self-healing toggle | Admin → Admin Settings → Monitoring | Enable/disable automatic container restart |
| Alert e-mail address | Admin → Admin Settings → Monitoring | Where monitoring alerts are sent |
| Monta credentials | Settings → Vehicle profile → Home charging | Per-vehicle: Client ID, Client Secret, Charge-Point ID — available for all vehicle categories |
| Electricity price per kWh | Settings → Vehicle profile or setup wizard | Per-vehicle energy cost for charging calculations |
All of the above can also be configured during the setup wizard — no direct server access required.
Tesla Carview includes a two-tier self-healing monitoring system that runs automatically on the server:
- Tier 1 — Rule-based autofix (runs every 20 minutes): Handles known, deterministic problems — restarting stopped containers, clearing full disks, fixing file permissions. No AI required, always active.
- Tier 2 — AI autofix (optional): Triggered when Tier 1 cannot fix a problem. Sends the error log to Claude Haiku (Anthropic) and asks it to suggest and optionally apply a fix — a more powerful fallback for unusual problems.
Tier 2 is entirely optional and can simply be left out. The system self-heals reliably with Tier 1 alone — for most installations that is more than sufficient. Without an Anthropic key, unsolvable problems trigger an e-mail alert instead.
Get a key at console.anthropic.com (pay-per-use, Claude Haiku is very cheap — typically a few cents per month for occasional autofix calls).
For a complete list of every environment variable with detailed descriptions, see the technical documentation: docs/10-configuration.en.md
🇬🇧 Home · Installation · Troubleshooting · License | 🇩🇪 Startseite · Installation · Fehlerbehebung | 🇫🇷 Accueil | 🇪🇸 Inicio | 🇹🇷 Ana Sayfa | 🇬🇷 Αρχική
GitHub Repository · Report an Issue
Tesla Carview — non-commercial, self-hosted Tesla data logger · © Sven Krische
🇬🇧 English
🚀 Getting Started
🌐 Network & Infrastructure
⚙️ Configuration
🔐 Security
📱 Reference
🇩🇪 Deutsch
🚀 Einstieg
🌐 Netzwerk & Infrastruktur
⚙️ Konfiguration
🔐 Sicherheit
📱 Referenz
🇫🇷 Français
🚀 Démarrage
🌐 Réseau & Infrastructure
⚙️ Configuration
🔐 Sécurité
📱 Référence
🇪🇸 Español
🚀 Primeros pasos
🌐 Red & Infraestructura
⚙️ Configuración
🔐 Seguridad
📱 Referencia
🇹🇷 Türkçe
🚀 Başlarken
🌐 Ağ & Altyapı
⚙️ Yapılandırma
🔐 Güvenlik
📱 Başvuru