# TeslaMate

Data logger and dashboards for Tesla vehicles that keep trips, charges and battery data.

- Replaces: [TeslaFi](https://openlogs.fyi/alternatives/teslafi)
- Summary: Paid vehicle data logging services, such as TeslaFi.
- Stack: Elixir (language), PostgreSQL (database)
- Deployment: docker_compose
- License: AGPL-3.0 (osi) [source](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/LICENSE)
- Business model: unknown. The README at the pinned commit does not state a business model, so it stays unknown. ([source](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/README.md), read 2026-10-22)
- Difficulty: medium. 4 services (1 database or broker: postgres), 5 volume mounts, no env values to set, no elevated host access. Heuristic score 5 of 11: medium.
- Requirements: not stated
- Repository: [teslamate-org/teslamate](https://github.com/teslamate-org/teslamate)

## Install

1. Docker with the Compose plugin ([source](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md#L26-L83))

   ```text
   A host with Docker and the Docker Compose plugin. This entry runs from a compose file.
   ```

2. Save the code block as docker-compose.yml ([source](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md))

   ```yaml
   services:
     teslamate:
       image: teslamate/teslamate:latest
       restart: always
       environment:
         - ENCRYPTION_KEY=secretkey #replace with a secure key to encrypt your Tesla API tokens
         - DATABASE_USER=teslamate
         - DATABASE_PASS=password #insert your secure database password!
         - DATABASE_NAME=teslamate
         - DATABASE_HOST=database
         - MQTT_HOST=mosquitto
       ports:
         - 4000:4000
       volumes:
         - ./import:/opt/app/import
       cap_drop:
         - all
   
     database:
       image: postgres:18-trixie
       restart: always
       environment:
         - POSTGRES_USER=teslamate
         - POSTGRES_PASSWORD=password #insert your secure database password!
         - POSTGRES_DB=teslamate
       volumes:
         - teslamate-db:/var/lib/postgresql
   
     grafana:
       image: teslamate/grafana:latest
       restart: always
       environment:
         - DATABASE_USER=teslamate
         - DATABASE_PASS=password #insert your secure database password!
         - DATABASE_NAME=teslamate
         - DATABASE_HOST=database
       ports:
         - 3000:3000
       volumes:
         - teslamate-grafana-data:/var/lib/grafana
   
     mosquitto:
       image: eclipse-mosquitto:2
       restart: always
       command: mosquitto -c /mosquitto-no-auth.conf
       # ports:
       #   - 1883:1883
       volumes:
         - mosquitto-conf:/mosquitto/config
         - mosquitto-data:/mosquitto/data
   
   volumes:
     teslamate-db:
     teslamate-grafana-data:
     mosquitto-conf:
     mosquitto-data:
   ```

3. What the compose file check ran with ([source](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md#L26-L83))

   ```text
   This compose file is copied unchanged from the code block in https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md#L26-L83. The block sits inside a list in the page, so the indent of its lines was removed, as the rendered page shows it. The check ran on that block alone. The Docker installation guide tells the reader to create a docker-compose.yml with this content.
   ```

4. Start it ([source](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md))

   ```bash
   docker compose up -d
   ```

5. Open the app ([source](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md))

   ```text
   Open http://localhost:4000. The compose file publishes host port 4000 for the teslamate service.
   ```

Compose file check: config_ok on 2026-10-22.

## Gotchas and maintenance

### Gotchas

- Some images use the latest tag or no tag: Images without a pinned version: teslamate: teslamate/teslamate:latest, grafana: teslamate/grafana:latest. A later pull can get a different version. ([source](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md), checked 2026-10-22)
- The compose file has placeholder values: Placeholder values: DATABASE_PASS is "password" (teslamate), POSTGRES_PASSWORD is "password" (database), DATABASE_PASS is "password" (grafana). ([source](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md), checked 2026-10-22)
- The compose file publishes host ports: Host ports: 4000 (teslamate), 3000 (grafana). A port without a host address listens on all host network interfaces. ([source](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md), checked 2026-10-22)
- The compose file mounts host folders: Host paths mounted into containers: ./import at /opt/app/import (teslamate). ([source](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md), checked 2026-10-22)

### Signals

Computed from a GitHub snapshot taken 2026-10-22.

- Open issues and pull requests: 67
- Stars: 9157, forks: 1022
- Last push: 2026-10-21 (1 days ago)
- Latest release: v4.3.0 on 2026-09-29 (23 days ago)

## Sources

- [Repository: https://github.com/teslamate-org/teslamate](https://github.com/teslamate-org/teslamate)
- [License: https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/LICENSE](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/LICENSE)
- [Business model: https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/README.md](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/README.md)
- [Compose file: https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md)
- [Install step: https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md#L26-L83](https://github.com/teslamate-org/teslamate/blob/9f4098eeb8460c7d56235dd8d3fe0afedcdf682b/website/docs/installation/docker.md#L26-L83)

---
Canonical: https://openlogs.fyi/tools/teslamate  
Last updated: 2026-10-22
