Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Dockerized ankisyncd, targeting more recent releases of Anki/AnkiDroid

License

Notifications You must be signed in to change notification settings

Zweihander-Main/docker-ankisyncd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker-ankisyncd

MOVED

Dockerized ankisyncd, targeting more recent releases of Anki/AnkiDroid

Uses ankicommunity/anki-sync-server codebase.

Tested

Platform Version Release Download
Linux 2.1.49 v2.3.0 Mega
AnkiDroid 2.15.6 v2.3.0 Mega

Instructions

Follow instructions from 'Setting up Anki' for setting up AnkiDroid and desktop versions.

Initial setup

Enter container:

$ docker exec -it anki /bin/bash

and execute:

$ cp ./ankisyncd_cli/ankisynctl.py .
$ python ./ankisyncctl.py adduser <username>

Copy step can be skipped if issue/128 is resolved.

Sample configuration with Traefik (does not work with v2.3.0 and prior releases)

labels:
  traefik.http.services.anki.loadbalancer.server.port: "27701"

This would allow connecting to the anki server through your main entrypoint (normal port 80/443).

Sample configuration with jwilder/nginx-proxy

Set VIRTUAL_PORT environment variable to 27701.

For v2.3.0 and prior, place the following in /etc/nginx/proxy.conf:

# HTTP 1.0 support
proxy_http_version 1.0;
proxy_buffering off;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;
proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
proxy_set_header X-Forwarded-Path $request_uri;

# Mitigate httpoxy attack
proxy_set_header Proxy "";

Env variables

Variable Default Value
ANKISYNCD_HOST 0.0.0.0
ANKISYNCD_PORT 27701
ANKISYNCD_DATA_ROOT /srv/ankisyncd
ANKISYNCD_BASE_URL /sync/
ANKISYNCD_BASE_MEDIA_URL /msync/
ANKISYNCD_AUTH_DB_PATH /srv/ankisyncd/auth.db
ANKISYNCD_SESSION_DB_PATH /srv/ankisyncd/session.db

Notes on usage:

  • If you have a large media collection, focus on syncing it first (it may take a few tries)
  • Don't use other/multiple addons for syncing

Links

Dev notes:

  • Github Action creates build with Docker tag based on Git semver tag
  • When no tag present, Action creates release with date

Available for Hire

I'm available for freelance, contracts, and consulting both remotely and in the Hudson Valley, NY (USA) area. Some more about me and what I can do for you.

Feel free to drop me a message at:

hi [a+] zweisolutions {●} com

License

ankicommunity/anki-sync-server is licensed under GPLv3

This repo is MIT

About

Dockerized ankisyncd, targeting more recent releases of Anki/AnkiDroid

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published