A lightweight server for managing, monitoring, and visualizing EV charger data.
2.1K
EV Charger Server is a full-featured, API-driven and web-based system for managing electric vehicle (EV) charging sessions, stations, and users. It supports both REST APIs and a modern dashboard for users, along with secure device integration via API keys.
š User Management
š Charger Management
ā” Charging Sessions
š” Device Integration
š Dashboard
Docker compose example:
version: '3.8'
services:
ev-charger-server:
image: geertmeersman/ev-charger-server:latest
container_name: ev-charger-server
restart: unless-stopped
environment:
SMTP_SERVER: ${SMTP_SERVER}
SMTP_PORT: ${SMTP_PORT}
SMTP_USERNAME: ${SMTP_USERNAME}
SMTP_PASSWORD: ${SMTP_PASSWORD}
FROM_EMAIL: ${FROM_EMAIL}
SECRET_KEY: ${SECRET_KEY}
BASE_URL: ${BASE_URL}
tty: true
ports:
- "8000:8000"
volumes:
- /volumes/ev-charger-server:/app/data
Dockerfile example:
FROM python:3.11-slim
# Set environment variables
ENV TZ=Europe/Brussels
COPY scripts/start.sh /start.sh
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN chmod +x /start.sh
ENTRYPOINT ["/start.sh"]
Build and run:
docker build -t ev-charger-server .
docker run -e WEB_PORT=8080 -p 8080:8080 \
-e SMTP_SERVER=smtp.example.com \
-e SMTP_PORT=587 \
-e SMTP_USERNAME=myuser \
-e SMTP_PASSWORD=mypassword \
-e [email protected] \
-e SECRET_KEY=mysecretkey \
-e BASE_URL=https://myapp.com \
ev-charger-server
| Variable | Description |
|---|---|
SMTP_SERVER | SMTP host for sending emails |
SMTP_PORT | SMTP port (e.g. 587 for TLS) |
SMTP_USERNAME | Username for SMTP authentication |
SMTP_PASSWORD | Password for SMTP authentication |
FROM_EMAIL | Default "from" address for all emails |
SECRET_KEY | Cryptographic key for session/token signing |
BASE_URL | Public base URL (used in email links, UI) |
WEB_PORT | (Optional) HTTP port (default: 8000) |
app/
āāā main.py # FastAPI app entry point
āāā database.py # DB engine and session factory
āāā models.py # SQLAlchemy data models
āāā templates/ # Jinja2 templates for the dashboard
āāā static/ # Static files (CSS, JS)
āāā reports/ # PDF report generation logic
āāā utils/ # Email sending, CSV parsing, helpers
āāā ...
Once running, the following documentation is available:
ā ļø This server runs in plain HTTP (not HTTPS) by default. It is strongly recommended to place a reverse proxy (such as NGINX, Caddy, or Traefik) in front of this application to:
You can also run this behind a secure load balancer or a platform (e.g. Fly.io, Render, Heroku) that provides HTTPS.
This project is licensed under the MIT License.
Content type
Image
Digest
sha256:eb287464eā¦
Size
251.2 MB
Last updated
2 months ago
docker pull geertmeersman/ev-charger-server