Deploy TeslaMate & mytesla/teslamateapi - Setup Guide
Fresh Install: Full Docker Compose Stack
Deploy a complete TeslaMate stack from scratch using Docker Compose. Includes TeslaMate, mytesla/teslamateapi, PostgreSQL database, Grafana, and Mosquitto MQTT broker. Secrets (ENCRYPTION_KEY, DATABASE_PASS, API_ACCESS_KEY, API_SECRET_KEY) are generated automatically. Run: docker compose up -d.
Existing TeslaMate: Add TeslaMateAPI (One-click script)
If you already have TeslaMate running, add the mytesla/teslamateapi service with one command: curl -fsSL https://mytess.net/scripts/add-teslamateapi.sh -o add-api.sh && bash add-api.sh. The script reads your existing config, generates API_ACCESS_KEY and API_SECRET_KEY credentials for Mytess, and patches your docker-compose.yml automatically.
Existing TeslaMate: Add TeslaMateAPI (Manual / NAS)
Add a teslamateapi service block to your docker-compose.yml inside the services: section. Use image: mytesla/teslamateapi:latest. Set DATABASE_USER, DATABASE_PASS, DATABASE_NAME, DATABASE_HOST, ENCRYPTION_KEY, MQTT_HOST, API_ACCESS_KEY, and API_SECRET_KEY environment variables to match your existing TeslaMate configuration. Then run: docker compose up -d teslamateapi.
Configure Mytess App
Open Mytess → Settings → Server Config. Enter the API address (http://your-server-ip:3030 or your public domain), API Access Key, and API Secret Key. These are the TeslaMateAPI credentials for Mytess, not the Tesla access token or refresh token used by TeslaMate vehicle authorization. Tap Test Connection to verify, then select your vehicle.
Important: Use mytesla/teslamateapi image
Mytess requires the mytesla/teslamateapi image, NOT tobiasehlert/teslamateapi. The mytesla build includes custom logic for drive insights, driving analysis, push notifications, and geofence-based time-of-use billing that are not available in the standard image.