Skip to content

Installation

Daniel Heinen edited this page May 9, 2026 · 1 revision

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-mqtt and cryptography constraints that no longer build on 3.9.

1. Install from Git (recommended)

Linux

# 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

macOS

# 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

Windows

  1. Install Python 3.10+ — make sure "Add Python to PATH" is enabled in the installer.
  2. Install git or GitHub Desktop.
  3. Open PowerShell in the cloned folder (Shift + right-click → "Open PowerShell window here") and run:
pip3 install -r requirements.txt
python3 ankerctl.py webserver run

ffmpeg is optional for the timelapse feature; install it from https://ffmpeg.org/download.html and add it to PATH.

2. Install from Docker

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 -d

The 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.

3. Home Assistant Supervisor add-on

If you run Home Assistant OS or Supervised, you can install ankerctl as a managed add-on:

  1. Open Settings → Add-ons → Add-on Store → ⋮ → Repositories
  2. Add: https://github.com/Django1982/ankermake-m5-protocol
  3. Refresh the store and install the AnkerMake M5 Protocol add-on
  4. In the add-on's Configuration tab, set FLASK_HOST (typically 0.0.0.0 for ingress) and any other env vars you need
  5. 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.

Importing your AnkerMake account

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:

Option A — CLI import from a cached login

./ankerctl.py config import

When 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 (.ldb files)

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"

Option B — Web UI upload

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 .ldb file manually.

Option C — Email/password login

./ankerctl.py config login DE          # CLI

In 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.

Verifying the install

After import, run:

./ankerctl.py config show

You 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 ~5s

If LAN discovery hangs and you are on Linux with ufw active, see Firewall ufw.

Where configuration lives

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.json contains your user_id, auth_token, and per-printer mqtt_key. Treat the file like a password — never commit it, never paste it into issues, and back it up encrypted.

Clone this wiki locally