-
-
Notifications
You must be signed in to change notification settings - Fork 5
Installation
ankerctl runs as a Python application. You can install it from source with pip, run it via Docker, or deploy it as a Home Assistant Supervisor add-on. This page covers all three.
Note Minimum supported Python version is 3.10. Older releases ship with
paho-mqttandcryptographyconstraints that no longer build on 3.9.
# Install Python 3.10+ if not already present
sudo apt update && sudo apt install -y python3 python3-pip git ffmpeg
# Clone and install
git clone https://github.com/Django1982/ankermake-m5-protocol.git
cd ankermake-m5-protocol
pip3 install -r requirements.txt
# Run the web server
./ankerctl.py webserver run# Install Python and ffmpeg via Homebrew
brew install python@3.11 ffmpeg
# Clone and install
git clone https://github.com/Django1982/ankermake-m5-protocol.git
cd ankermake-m5-protocol
pip3 install -r requirements.txt
# Run the web server
./ankerctl.py webserver run- Install Python 3.10+ — make sure "Add Python to PATH" is enabled in the installer.
- Install git or GitHub Desktop.
- Open PowerShell in the cloned folder (Shift + right-click → "Open PowerShell window here") and run:
pip3 install -r requirements.txt
python3 ankerctl.py webserver runffmpeg is optional for the timelapse feature; install it from https://ffmpeg.org/download.html and add it to PATH.
The Docker image is django01982/ankerctl and requires network_mode: host because PPPP uses asymmetric UDP traffic.
git clone https://github.com/Django1982/ankermake-m5-protocol.git
cd ankermake-m5-protocol
cp .env.example .env # adjust values
docker compose up -dThe compose file mounts ~/.config/ankerctl/ into the container so configuration and SQLite state persist across restarts.
Important Docker installation works on Linux only. macOS and Windows hosts cannot use
network_mode: host, so PPPP discovery and the camera stream will not function in those environments — fall back to the Python install instead.
See Docker for compose file details, UID/GID customization, and the offline / self-hosted MQTT broker variant.
If you run Home Assistant OS or Supervised, you can install ankerctl as a managed add-on:
- Open Settings → Add-ons → Add-on Store → ⋮ → Repositories
- Add:
https://github.com/Django1982/ankermake-m5-protocol - Refresh the store and install the AnkerMake M5 Protocol add-on
- In the add-on's Configuration tab, set
FLASK_HOST(typically0.0.0.0for ingress) and any other env vars you need - Start the add-on; the web UI is reachable through the HA sidebar
The add-on uses a dedicated ankermake-m5-protocol-ha Docker image with the correct entrypoint and AppArmor full_access: true so PPPP UDP discovery works inside the Supervisor sandbox. Configuration persists under /data/.config/ankerctl and is symlinked into the container's home directory.
After installation you must give ankerctl access to your printer's account so it can authenticate to the cloud MQTT broker and decrypt traffic. Three options exist:
./ankerctl.py config importWhen called without an argument, the importer auto-detects supported caches:
- legacy
login.json(older AnkerMake desktop) - legacy
user_info(Windows AnkerMake) - newer eufyMake Studio LevelDB cache (
.ldbfiles)
For the LevelDB cache to be readable, eufyMake Studio must be open and signed in while the import runs.
# Explicit path
./ankerctl.py config import path/to/login.json
./ankerctl.py config import "%LOCALAPPDATA%\eufyMake Studio Profile\EBWebView\Default\Local Storage\leveldb\000123.ldb"In Setup → Account you can either:
- click Import From eufyMake Studio to scan the local cache automatically (Windows only, requires the slicer to be open and signed in), or
- upload a
login.json,user_info, or.ldbfile manually.
./ankerctl.py config login DE # CLIIn the web UI, Setup → Account → Manual login asks for email, country code, and password. If AnkerMake demands a CAPTCHA, the CLI opens it in your browser; the web UI displays it inline.
After import, run:
./ankerctl.py config showYou should see your account email and printer serial number with the sensitive user_id and auth_token redacted.
Run a smoke test:
./ankerctl.py mqtt monitor # Ctrl-C after a few events
./ankerctl.py pppp lan-search # printer should be discovered within ~5sIf LAN discovery hangs and you are on Linux with ufw active, see Firewall ufw.
| Platform | Path |
|---|---|
| Linux / macOS | ~/.config/ankerctl/default.json |
| Windows | %APPDATA%\ankerctl\default.json |
| Docker |
/home/ankerctl/.config/ankerctl/default.json (mounted from host) |
| HA add-on | /data/.config/ankerctl/default.json |
The same directory holds history.db (print history), filament.db (filament profiles), and the optional bed_leveling/ snapshots when ANKERCTL_LOG_DIR is set.
Security
default.jsoncontains youruser_id,auth_token, and per-printermqtt_key. Treat the file like a password — never commit it, never paste it into issues, and back it up encrypted.