teslamate install

I am trying to install Teslamate with docker but I am having problems. In short, when I paste the docker file from Docker install | TeslaMate, unfortunately I cannot install it at all. Can you please help? Thank you in advance.

Hi! I assume it is failing because of the definition and location of volumes in the provided compose file.

Here is my TeslaMate compose, you can adjust it or use it for inspiration:

name: teslamate
services:
  database:
    cpu_shares: 90
    command: []
    container_name: teslamate-db
    deploy:
      resources:
        limits:
          memory: 31863M
    environment:
      - POSTGRES_DB=teslamate
      - POSTGRES_PASSWORD=<your DB Password>
      - POSTGRES_USER=teslamate
      - TZ=<your Timezone>
    hostname: teslamate-db
    image: postgres:17
    labels:
      icon: https://github.com/homarr-labs/dashboard-icons/blob/main/png/teslamate.png?raw=true
    restart: unless-stopped
    volumes:
      - type: bind
        source: /DATA/AppData/teslamate/data/
        target: /var/lib/postgresql/data
    ports: []
    devices: []
    cap_add: []
    networks:
      - teslamate
    privileged: false
  grafana:
    cpu_shares: 90
    command: []
    container_name: teslamate-grafana
    depends_on:
      database:
        condition: service_started
        required: true
    deploy:
      resources:
        limits:
          memory: 31863M
    environment:
      - DATABASE_HOST=teslamate-db
      - DATABASE_NAME=teslamate
      - DATABASE_PASS=<your DB Password>
      - DATABASE_USER=teslamate
      - GF_AUTH_ANONYMOUS_ENABLED=true
    hostname: teslamate-grafana
    image: teslamate/grafana:latest
    labels:
      icon: https://github.com/homarr-labs/dashboard-icons/blob/main/png/teslamate.png?raw=true
    ports:
      - target: 3000
        published: "3000"
        protocol: tcp
    restart: unless-stopped
    volumes:
      - type: bind
        source: /DATA/AppData/teslamate/grafana/
        target: /var/lib/grafana
    devices: []
    cap_add: []
    networks:
      - teslamate
    privileged: false
  teslamate:
    cap_drop:
      - all
    cpu_shares: 90
    command: []
    container_name: teslamate
    depends_on:
      database:
        condition: service_started
        required: true
    deploy:
      resources:
        limits:
          memory: 31863M
    environment:
      - DATABASE_HOST=teslamate-db
      - DATABASE_NAME=teslamate
      - DATABASE_PASS=<your DB Password>
      - DATABASE_USER=teslamate
      - DISABLE_MQTT=true
      - ENCRYPTION_KEY=<some salt for encryption>
      - TZ=<your Timezone>
    hostname: teslamate
    image: teslamate/teslamate:latest
    labels:
      icon: https://github.com/homarr-labs/dashboard-icons/blob/main/png/teslamate.png?raw=true
    ports:
      - target: 4000
        published: "4000"
        protocol: tcp
    restart: unless-stopped
    volumes:
      - type: bind
        source: /DATA/AppData/teslamate/import/
        target: /opt/app/import
    devices: []
    cap_add: []
    networks:
      - teslamate
    privileged: false
networks:
  teslamate:
    name: teslamate
x-casaos:
  author: TeslaMate.org
  category: Utilities
  hostname: ""
  icon: https://github.com/homarr-labs/dashboard-icons/blob/main/png/teslamate.png?raw=true
  index: /
  is_uncontrolled: false
  main: teslamate
  port_map: "4000"
  scheme: http
  store_app_id: teslamate
  title:
    custom: TeslaMate

Notes:

  • Enter your timezone
  • Chose a DB password and define it accordingly (3 positions)
  • Chose an encryption key
  • MQTT is disabled. Enter your MQTT credentials if needed
  • Grafana authoritzation is disabled

Thank you very much. I will try it this weekend.