TeslaMate is a data logger for Tesla vehicles. It writes your Tesla data to your own database.
A mobile web browser and a Grafana dashboard are not easy to use when you are away from home. Most Tesla owners use Tesla apps with subscriptions. These apps send your private data to a third-party server. They also charge a monthly fee.
Fastcruise is a native iOS app. It is compatible with TeslaMate. It connects directly to your own TeslaMate instance. This guide shows you how to set up Fastcruise. Then you can stop the subscriptions and keep your data private.
The setup wizard does the server steps of this guide for you. It asks for no password and no key. fastcruise.app/skills/teslamateapi-setup/setup-wizard.sh
You can also give the skill to your AI agent: fastcruise.app/skills/teslamateapi-setup.md
Do not send your password or your encryption key to the agent. The agent does not need them.
Prerequisites
- A TeslaMate instance that operates. (TeslaMate installation guide)
- The Fastcruise app on your iOS device. Download it from the App Store.
Step-by-step: Configure TeslaMateApi for Fastcruise
TeslaMate is a data logger. But TeslaMate has no interface for other apps. Thus Fastcruise cannot read your data directly.
By default, TeslaMate writes your car data to a database and shows charts in Grafana. TeslaMate has no API for a native iOS app.
TeslaMateApi is the bridge. It reads your private database. It changes the raw data into JSON. Fastcruise can read JSON.
The core setup: configure TeslaMateApi
If you followed the official TeslaMate installation guide, your docker-compose.yaml file is almost the same as this file:
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:Each service in this docker-compose.yml file does one task. The teslamate service gets the data. The database service stores the data. The grafana service shows the data in charts.
To use Fastcruise, add one more service: TeslaMateApi. TeslaMateApi is the data bridge for your iPhone.
Add the TeslaMateApi service to your docker-compose.yml file:
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:8080Set these environment variables:
ENCRYPTION_KEY: Use the same encryption key as the TeslaMate service.DATABASE_USER,DATABASE_PASS,DATABASE_NAME,DATABASE_HOST: Use the same database credentials as the TeslaMate service.MQTT_HOST: Use the same MQTT host as the TeslaMate service.TZ: Set your local time zone (for example,America/Los_Angeles). See the list of valid time zones.
Make sure that you set all environment variables correctly. If the database credentials do not agree, TeslaMateApi cannot connect to your database. Then Fastcruise shows errors when it gets data.
Use the same encryption key as the TeslaMate service. TeslaMateApi decrypts the Tesla tokens with this key. TeslaMateApi starts when the key does not agree, so the test can pass with an incorrect key.
The complete docker-compose.yml file is now almost the same as this file:
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
teslamateapi:
image: tobiasehlert/teslamateapi:latest
restart: always
depends_on:
- database
environment:
- ENCRYPTION_KEY=<YOUR_ENCRYPTION_KEY>
- DATABASE_USER=teslamate
- DATABASE_PASS=<YOUR_DATABASE_PASSWORD>
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- MQTT_HOST=mosquitto
- TZ=<YOUR_TIMEZONE>
ports:
- 8080:8080
volumes:
teslamate-db:
teslamate-grafana-data:
mosquitto-conf:
mosquitto-data:After you save the file, tell Docker to get the new image and to start the API service.
docker-compose up -dDo a check of the status of your containers. The new teslamateapi service must be in the "Up" state:
> docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
teslamate-test-database-1 postgres:18-trixie "docker-entrypoint.s…" database 56 seconds ago Up 56 seconds 5432/tcp
teslamate-test-grafana-1 teslamate/grafana:latest "/run.sh" grafana 56 seconds ago Up 56 seconds 0.0.0.0:3000->3000/tcp, [::]:3000->3000/tcp
teslamate-test-mosquitto-1 eclipse-mosquitto:2 "/docker-entrypoint.…" mosquitto 56 seconds ago Up 56 seconds 1883/tcp
teslamate-test-teslamate-1 teslamate/teslamate:latest "tini -- /bin/dash /…" teslamate 56 seconds ago Up 56 seconds 0.0.0.0:4000->4000/tcp, [::]:4000->4000/tcp
teslamate-test-teslamateapi-1 tobiasehlert/teslamateapi:latest "./app" teslamateapi 56 seconds ago Up 55 seconds 0.0.0.0:8080->8080/tcp, [::]:8080->8080/tcpCheck that TeslaMateApi operates
Do a test: get data from TeslaMateApi. Open your web browser and go to:
http://<YOUR_SERVER_IP>:8080/api/v1/cars
Replace <YOUR_SERVER_IP> with the IP address or hostname of your TeslaMate server.
The response contains the information about your car. It is like this:
{
"data": {
"cars": [
{
"car_id": 1,
"name": "Apollo",
"car_details": {
"eid": hahdh,
"vid": jaidji,
"vin": "aojsdoja",
"model": "Y",
"trim_badging": "74D",
"efficiency": null
},
"car_exterior": {
"exterior_color": "Quicksilver",
"spoiler_type": "None",
"wheel_type": "HelixV220"
},
"car_settings": {
"suspend_min": 21,
"suspend_after_idle_min": 15,
"req_not_unlocked": false,
"free_supercharging": false,
"use_streaming_api": true
},
"teslamate_details": {
"inserted_at": "2025-12-20T10:09:34+01:00",
"updated_at": "2025-12-20T10:10:15+01:00"
},
"teslamate_stats": {
"total_charges": 0,
"total_drives": 0,
"total_updates": 1
}
}
]
}
}Troubleshooting
At the first start, the database needs about two minutes before it is ready. The message connection refused in the log is normal in this time. Wait and read the log again.
If the teslamateapi service shows the status Restarting or Exit 1 after two minutes, the service cannot connect to your database. Read the error in the log:
docker-compose logs <service_name>A wrong password prevents a correct start of the teslamateapi service. The service then shows an error like this one:
2025/12/20 10:08:50.317921 [error] initDBconnection - database ping error: pq: password authentication failed for user "teslamate"
Compare these values of the two services. The values must agree:
DATABASE_USERwithPOSTGRES_USERDATABASE_PASSwithPOSTGRES_PASSWORDDATABASE_NAMEwithPOSTGRES_DB
Make TeslaMateApi safe
By default, TeslaMateApi has no authentication and no encryption. If you put the API on the internet without more security, other persons can get your Tesla data. They only need your server IP address and port. If you have little IT experience, use a VPN for access to your home network. Do not put the API directly on the internet.
To keep your Tesla data safe, use these security measures:
- Use a reverse proxy with HTTPS: Set up a reverse proxy (for example, Nginx or Traefik) in front of TeslaMateApi. The proxy does the HTTPS encryption. Then the data between your iPhone and the API is encrypted.
- Use authentication: Use basic authentication on your reverse proxy. Then only approved users have access.
- Use firewall rules: Set your firewall to give access to the TeslaMateApi port (8080) only to trusted IP addresses or VPN connections.
- Do regular updates: Keep TeslaMateApi and all related services at the newest version. Then you get the security patches and the improvements.
Alternative: let a tool do the server work
The setup wizard does the steps above for you. Run it on the TeslaMate server:
curl -fsSL https://fastcruise.app/skills/teslamateapi-setup/setup-wizard.sh -o setup-wizard.sh
bash setup-wizard.shThe wizard changes the Compose file, starts the TeslaMateApi service, and does a test of the API. It asks for no password and no key. The values stay on your server.
The wizard waits for the first start. The database can need a few minutes before the API answers. When the wizard says that the database refuses the connection, the password is not correct.
The script of the skill can also do a check of the two services. The output shows the key names only:
python3 add-service.py --compose docker-compose.yml --checkEach line must say match.
An AI agent can do the same work. Give this link to your agent:
https://fastcruise.app/skills/teslamateapi-setup.md
Then do the app steps in the next section on your iPhone.
Do not send your password, your encryption key, or your access token to the agent. The agent does not need these values. The skill tells the agent to keep the values on the server.
Connect Fastcruise to TeslaMateApi
TeslaMateApi operates. Now connect Fastcruise on your iOS device.
-
Open the Fastcruise app on your iPhone.
-
The first time you open Fastcruise, the app shows a setup screen. Enter your connection details there.

- At the end of the setup, enter the connection details of your TeslaMateApi instance:
- URL:
http://<YOUR_SERVER_IP>:8080(replace<YOUR_SERVER_IP>with your server's IP address or hostname)
- URL:

Your iPhone can ask you to let Fastcruise connect to devices on the local network. Fastcruise needs this access to speak to your TeslaMateApi instance. Give the access. The first connection can fail. Tap the Connection Status box again and again until the connection is correct.
Now tap Save. Fastcruise connects to your TeslaMateApi instance and starts to get your Tesla data.
Go to the home screen. The dashboard shows the status of your car:

First sync: The app shows only a small quantity of data at the start. Historical drives and charge sessions appear after the first new trips or charges. The logger records the data at that time.
Next steps: widgets and customization
Your Tesla data is now on your iPhone.
- iOS widgets: Long-press your home screen to add Fastcruise widgets. A widget shows your range and the status. You do not open the app.
- Change the currency unit in the Fastcruise settings to your local currency.
- Privacy: Fastcruise is self-hosted. Your data never goes to a third-party server.
- Questions: the Fastcruise FAQ answers common questions about setup, privacy, and remote access.
Did this guide help you? Send an email to contact@fastcruise.app and tell us your experience.
Fastcruise is a community tool. The official TeslaMate project does not endorse or support it.