Cloud Native 8 min read

Deploy a Private Anki Sync Server on K3s with Docker

This guide explains how to set up a private Anki synchronization server using the anki‑sync‑server Docker image, deploy it on a K3s cluster with a Kubernetes manifest, and configure desktop, Android, and iOS clients for fast, secure flashcard syncing without relying on the official server.

Programmer DD
Programmer DD
Programmer DD
Deploy a Private Anki Sync Server on K3s with Docker

Anki Overview

Anki is a spaced‑repetition flashcard application that schedules cards based on user feedback. Each flashcard (or “flash card”) contains a single piece of knowledge, making it ideal for learning English vocabulary, historical dates, formulas, etc.

Why Deploy a Private Sync Server?

The official Anki sync server is hosted abroad with limited bandwidth, resulting in slow synchronization across devices. A private sync server allows fast, reliable syncing for multiple clients.

Available Sync Server Project

The anki-sync-server project (written in Python) supports the latest Anki version. A ready‑made Docker image is available.

Deploying on K3s

Deploy the server in a K3s cluster using the following manifest:

# docker-anki-server.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: docker-anki-server
  labels:
    app: docker-anki-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: docker-anki-server
  template:
    metadata:
      labels:
        app: docker-anki-server
    spec:
      volumes:
      - name: data
        hostPath:
          path: /data/anki
      containers:
      - name: docker-anki-server
        image: johngong/anki-sync-server:latest
        ports:
        - containerPort: 27701
        env:
        - name: TZ
          value: Asia/Shanghai
        - name: USER
          value: ********
        - name: PASSWORD
          value: ********
        livenessProbe:
          httpGet:
            path: /
            port: 27701
        readinessProbe:
          httpGet:
            path: /
            port: 27701
        volumeMounts:
        - mountPath: /config
          name: data
          readOnly: False
---
apiVersion: v1
kind: Service
metadata:
  name: docker-anki-server
  labels:
    app: docker-anki-server
spec:
  selector:
    app: docker-anki-server
  ports:
  - protocol: TCP
    name: http
    port: 27701
    targetPort: 27701

Apply the manifest: $ kubectl apply -f docker-anki-server.yaml After deployment, monitor the service in the KubeSphere console. Expose the service via an Ingress with HTTPS to satisfy the Android client’s requirement.

Client Configuration

Desktop (macOS/Windows/Linux)

Open Tools → Add‑ons and click Get Add‑ons .

Enter the code 358444159 to install the custom sync server redirector add‑on.

Open the add‑on’s Configure page and replace the syncaddr value with your server’s address.

Sync from the main Anki window and provide the username and password defined in the manifest.

Android (AnkiDroid)

In Settings → Advanced Settings → Custom Sync Server , enter the server URL, username, and password. No additional plug‑in is required.

iOS

The iOS client does not support custom sync servers. Users may need to switch to Android for private syncing.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DockerK3sspaced repetitionAnkiSync Server
Programmer DD
Written by

Programmer DD

A tinkering programmer and author of "Spring Cloud Microservices in Action"

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.