DEV Community

yekk
yekk

Posted on

Guide to Deploying TeslaMate on a cloud server

Guide to Deploying TeslaMate

TeslaMate is a powerful, self-hosted data logger for your Tesla. This guide provides a complete walkthrough for securely deploying TeslaMate on a cloud server, enabling user authentication and covering everything from domain setup to SSL configuration.

Prerequisites

Before you begin, you will need the following:

1. A Cloud Server

It is highly recommended to use a cloud server located outside of mainland China for more stable access to the Tesla API. You can choose any cloud provider like Tencent Cloud, AWS, Google Cloud, or DigitalOcean.

Recommended Server Specifications:

  • Memory: 2 GB or more
  • Storage: 40 GB or more
  • Operating System: Ubuntu 24.04 LTS

2. A Domain Name

You will need a domain name to access your TeslaMate instance securely over the internet.

  1. Go to a domain registrar (e.g., Tencent Cloud, GoDaddy, Namecheap).
  2. Search for and purchase an affordable domain (e.g., with a .top, .xyz TLD).
  3. Complete any required identity verification.

3. DNS Configuration

After acquiring your server and domain, you need to point your domain to your server's IP address.

3.1 Add an A Record
In your domain provider's DNS management console, create a new record with the following details:

  • Host: teslamate (or any subdomain you prefer)
  • Type: A
  • Value: Your server's public IP address
  • TTL: 600 (or default)

3.2 Add a CNAME Record (Optional)
If you want to access your instance via www, you can add a CNAME record:

  • Host: www
  • Type: CNAME
  • Value: teslamate.yourdomain.com
  • TTL: 600 (or default)

Note: DNS changes can take 10-30 minutes to propagate. Please be patient.


One-Click Deployment Script

We provide an interactive installation script that automates the entire setup process.

  1. Log into your server via SSH.
  2. Execute the following command and follow the on-screen prompts:
bash -c "$(curl -sSL https://s.mytesla.cc/install.sh)"
Enter fullscreen mode Exit fullscreen mode

Script Features

Automated Setup: Automatically installs Docker and Docker Compose.
Interactive Configuration: Guides you through setting up environment variables.
Enhanced Security: Generates secure passwords and sets up basic user authentication.
SSL Included: Automatically configures a free SSL certificate from Let's Encrypt.
Auto-Start: Configures all services to start automatically on boot.
Easy Maintenance: Includes simple commands for updating the service and backing up/restoring data.


Recommended: Mytesla UI

After successfully deploying TeslaMate, we highly recommend enhancing your experience with Mytesla UI, a feature-rich user interface designed to work with your TeslaMate data.

Mytesla UI Key Features

  • Real-time Vehicle Monitoring

    • Live battery status and health display.
    • Real-time charging progress tracking.
    • Current vehicle location monitoring.
  • In-Depth Data Analysis

    • Detailed analysis of driving data and efficiency.
    • Comprehensive energy consumption reports.
    • Charging cost statistics with automatic calculation for peak/off-peak electricity rates.
  • Smart Notifications & Alerts

    • Notifications for charging completion.
    • Alerts when a trip is finished.
    • Periodic data summary reports.
    • Reminders for available software updates.

Get Mytesla UI

To learn more and get started, visit the official Mytesla .

Top comments (0)