selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
teslamateapi logo

Self-host teslamateapi

v1.25.0

REST API for TeslaMate vehicle data

ReleaseOpen SourceMIT
Updated9 hours ago
LanguageGo
Setup difficultyModerate
Stars
257
Port
8080 (HTTP API)
Requires
MQTT Broker, PostgreSQL
Docker
tobiasehlert/teslamateapi
Install with Docker Compose

What is teslamateapi?

TeslaMateApi is a Go-based RESTful API that connects to a self-hosted TeslaMate instance's PostgreSQL database and MQTT broker to serve vehicle data as JSON. It provides endpoints for cars, battery health, charges, drives, vehicle status, software updates, and global settings. Commands such as wake up, climate control, door lock/unlock, and charging can be sent to the vehicle when enabled via environment variables. Authentication is handled via a user-defined API token (minimum 32 characters) passed as a Bearer token, custom header, or query parameter. The project is deployed via Docker (image tobiasehlert/teslamateapi) with docker-compose, requiring a PostgreSQL database and MQTT broker (typically the same ones used by TeslaMate). It is licensed under MIT and actively maintained.

Should you self-host teslamateapi?

teslamateapi scores 46/100 on selfhost.directory (how scoring works) and ranks #3 of 5 in Vehicle Management. It has 257 GitHub stars.

It shipped 6 stable releases in the past year. The latest, v1.25.0, came out on 7 July 2026. New versions land roughly every 3 weeks.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is TeslaMate (74/100, 9 196 stars). It scores higher overall, so compare the two before you pick. See teslamateapi vs TeslaMate side by side.

Features

  • REST API

teslamateapi README

How to install teslamateapi

Install teslamateapi with Docker Compose

PostgreSQL database and MQTT broker (e.g., mosquitto)
Environment variables
DATABASE_USER, DATABASE_PASS, DATABASE_NAME, DATABASE_HOST, ENCRYPTION_KEY, MQTT_HOST, TZ, plus optional variables

services: teslamateapi: image: tobiasehlert/teslamateapi:latest restart: always depends_on: - database environment: - ENCRYPTION_KEY=MySuperSecretEncryptionKey - DATABASE_USER=teslamate - DATABASE_PASS=secret - DATABASE_NAME=teslamate - DATABASE_HOST=database - MQTT_HOST=mosquitto - TZ=Europe/Berlin ports: - 8080:8080

Simple deployment alongside TeslaMate's database and MQTT broker

teslamateapi releases & version history

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…