Video coming soon…

📡 Setup TeslaMate — Self-Hosted Tesla Data Logger

Deploy TeslaMate on Ubuntu with Docker — a powerful data logger for your Tesla that records drives, charging, efficiency, and location over time on your own server, on port 4321.

⚠️ This script is provided for demo and testing purposes only. Not intended for production use.

📦 Resources & Setup Scripts

Grab the automated bash script from GitHub to follow along with the video.

Automated install script — deploys TeslaMate with its PostgreSQL and MQTT broker on port 4321. Sign in with your Tesla account on first visit to start logging. Data is encrypted with a generated key.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/iot/teslamate/teslamate-ubuntu.sh
chmod +x teslamate-ubuntu.sh
sudo bash teslamate-ubuntu.sh

Tutorial Steps

1 Download the Script

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/iot/teslamate/teslamate-ubuntu.sh

2 Make it Executable

chmod +x teslamate-ubuntu.sh

3 Run the Installer

The script installs Docker if needed and starts TeslaMate with its PostgreSQL database and a Mosquitto MQTT broker on port 4321. It generates an encryption key to protect your Tesla tokens; you sign in on first visit.

sudo bash teslamate-ubuntu.sh

4 Open the Web UI and Sign In to Tesla

Open TeslaMate and sign in with your Tesla account (or an API token) to link your vehicle and begin logging its data:

http://<your-server-ip>:4321

Ports Used

PortPurpose
4321Web UI (host → container 4000) — sign in with Tesla on first visit
PostgreSQL + MQTTInternal — your data, plus a bundled Mosquitto broker
encryption keyGenerated — protects your Tesla tokens; back it up

Overview

Why Use It

When You Need It

    Who Should Use It

      Real Use Cases

        Main Features

          How to Use After Installation

            Security Best Practices

              Ports and Firewall Notes

              Backup and Maintenance

                Common Mistakes

                  Troubleshooting

                    Alternatives

                    When Not to Use It

                    PrismaTechWork Professional Help

                      Contact Us

                      Frequently Asked Questions