Skip to content

Deploying EVCC

Introduction

EVCC (Electric Vehicle Charge Controller) is an open-source energy management solution designed to optimize electric vehicle charging using solar power and other renewable energy sources. It provides intelligent charging control that maximizes self-consumption of solar energy while respecting grid constraints and user preferences.

Built with Go, EVCC supports a wide range of chargers, vehicles, meters, and inverters from various manufacturers. Its modular architecture allows integration with existing home energy systems, making it ideal for homeowners who want to charge their EVs as sustainably and cost-effectively as possible.

Key highlights of EVCC:

  • Solar Surplus Charging: Automatically adjusts charging speed based on available solar power
  • Multi-Charger Support: Controls multiple charging stations simultaneously
  • Vehicle Integration: Connects directly to vehicle APIs for battery status and range information
  • Grid Meter Support: Monitors household consumption to prevent grid overload
  • Battery Storage Integration: Coordinates with home battery systems for optimal energy flow
  • Time-Based Charging: Schedule charging during off-peak hours for cost savings
  • Beautiful Web UI: Modern interface for monitoring and control
  • REST API: Full API for integration with home automation systems
  • Extensive Device Support: Compatible with chargers from ABB, go-e, Wallbox, Easee, and many more
  • 100% Open Source: Licensed under MIT with active community development

This guide walks through deploying EVCC on Klutch.sh using Docker, configuring your charging infrastructure, and setting up solar-optimized charging.

Why Deploy EVCC on Klutch.sh

Deploying EVCC on Klutch.sh provides several advantages for managing your EV charging:

Remote Access: Monitor and control your charging infrastructure from anywhere, not just your local network.

Reliable Uptime: Cloud hosting ensures your charge controller remains accessible even during home network issues.

Persistent Configuration: Your charging settings and historical data survive updates and redeployments.

HTTPS by Default: Secure access to your charging dashboard without manual certificate configuration.

Centralized Management: Manage multiple charging locations from a single interface.

Automatic Updates: Push configuration changes to GitHub and redeploy automatically.

Prerequisites

Before deploying EVCC on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your EVCC configuration
  • Network access to your charging equipment (may require VPN or port forwarding)
  • Documentation for your specific charger, inverter, and meter models
  • Basic familiarity with Docker and YAML configuration

Understanding EVCC Architecture

EVCC operates as a central controller that communicates with various devices:

Chargers: The physical charging stations that EVCC controls. Supported protocols include OCPP, Modbus, and manufacturer-specific APIs.

Vehicles: EVCC connects to vehicle APIs to retrieve state of charge, target charge level, and range information.

Meters: Grid meters, PV meters, and battery meters provide real-time power flow data for intelligent charging decisions.

Site Configuration: Defines the overall energy system including grid connection limits and priority rules.

Loadpoints: Represent individual charging locations with their associated charger and vehicle.

Preparing Your Repository

Create a GitHub repository with your EVCC configuration.

Repository Structure

evcc-deploy/
├── Dockerfile
├── evcc.yaml
└── .dockerignore

Creating the Dockerfile

FROM evcc/evcc:latest
# Copy custom configuration
COPY evcc.yaml /etc/evcc.yaml
# Set configuration file path
ENV EVCC_CONFIG=/etc/evcc.yaml
# Expose web interface and API
EXPOSE 7070
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:7070/api/health || exit 1

Sample Configuration File

Create an evcc.yaml configuration file:

network:
schema: https
host: your-app.klutch.sh
port: 7070
log: info
site:
title: My Home
meters:
grid: grid_meter
pv:
- pv_meter
meters:
- name: grid_meter
type: template
template: your-meter-template
- name: pv_meter
type: template
template: your-pv-template
chargers:
- name: wallbox
type: template
template: your-charger-template
vehicles:
- name: my_ev
type: template
template: your-vehicle-template
loadpoints:
- title: Garage
charger: wallbox
vehicle: my_ev
mode: pv

Environment Variables Reference

VariableRequiredDescription
EVCC_CONFIGNoPath to configuration file (default: /etc/evcc.yaml)
EVCC_DATABASE_DSNNoDatabase connection string for persistence
EVCC_NETWORK_PORTNoWeb interface port (default: 7070)

Deploying EVCC on Klutch.sh

    Identify Your Hardware

    Document your charging equipment:

    • Charger make and model
    • Inverter/solar system details
    • Grid meter type
    • Vehicle make and model

    Check the EVCC device database for supported hardware.

    Create Your Configuration

    Use the EVCC configuration wizard or manually create your evcc.yaml file with your specific device settings.

    Push Your Repository to GitHub

    Commit your Dockerfile and configuration to GitHub.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project for your EVCC deployment.

    Create a New App

    Create a new app and connect your GitHub repository containing the EVCC configuration.

    Configure HTTP Traffic

    Set up HTTP traffic handling:

    • Select HTTP as the traffic type
    • Set the internal port to 7070

    Set Environment Variables

    Add any required environment variables for your specific device integrations, such as API tokens for vehicle connections.

    Attach Persistent Volumes

    Mount PathSizePurpose
    /root/.evcc1 GBSQLite database and state
    /etc/evcc.yaml10 MBConfiguration file

    Deploy Your Application

    Click Deploy to build and launch your EVCC instance.

    Configure Network Access

    Ensure EVCC can reach your local charging equipment. This may require:

    • VPN connection to your home network
    • Port forwarding for device APIs
    • Cloud-to-cloud integrations for supported devices

Charging Modes

EVCC supports several charging modes:

Off: Charging disabled

Now: Charge immediately at maximum power

Min+PV: Minimum charging rate, increased when solar surplus is available

PV: Only charge when sufficient solar surplus is available

Target: Charge to reach a target state of charge by a specified time

Web Interface Features

The EVCC dashboard provides:

  • Real-time power flow visualization
  • Current charging status and speed
  • Solar production and consumption graphs
  • Vehicle state of charge display
  • Manual charging controls
  • Historical data and statistics

Home Automation Integration

EVCC integrates with popular home automation platforms:

  • Home Assistant: Native integration available
  • MQTT: Publish status and receive commands
  • REST API: Full programmatic control
  • Prometheus: Metrics export for monitoring

Troubleshooting

Charger Not Responding

  • Verify network connectivity to the charger
  • Check charger-specific configuration parameters
  • Review EVCC logs for connection errors

Vehicle Data Not Updating

  • Verify vehicle API credentials
  • Check for manufacturer API rate limits
  • Ensure vehicle has active connectivity

Solar Surplus Not Detected

  • Verify PV meter configuration
  • Check meter polling interval
  • Confirm meter readings in the dashboard

Additional Resources

Conclusion

Deploying EVCC on Klutch.sh provides a robust platform for intelligent EV charging management. By optimizing charging around solar production and electricity prices, EVCC helps reduce both energy costs and environmental impact. The combination of EVCC’s extensive device support and Klutch.sh’s reliable hosting creates a powerful solution for managing your electric vehicle charging infrastructure.