This Docker image sets up AnkiWeb inside a docker container.
AnkiWeb is a free companion to the computer version of Anki. AnkiWeb can be used to review online when you don't have access to your home computer, and can be used to keep your cards synchronized across multiple machines
To use docker-ankiweb, follow these steps:
-
Clone and start the container:
docker run -p 8080:8080 \ -e SYNC_USER1=user@example.org:pass1 \ -v ./data:/data \ docker.io/aguslr/ankiweb:latest -
On your Anki app, go to
Preferences > Syncingand enter http://127.0.0.1:8080 as the self-hosted sync server. -
Log In with your credentials
user@example.organdpass1.
The image is configured using environment variables passed at runtime:
| Variable | Function | Default | Required |
|---|---|---|---|
SYNC_HOST |
IP address to listen on | 127.0.0.1 |
N |
SYNC_PORT |
Port to listen on | 8080 |
N |
SYNC_BASE |
Directory to store data | /data |
N |
PASSWORDS_HASHED |
Whether to use hashed passwords | 0 |
N |
SYNC_USER1 |
First user's username:password |
EMPTY | Y |
SYNC_USER<N> |
<N> user's username:password |
EMPTY | N |
MAX_SYNC_PAYLOAD_MEGS |
Upload limit in MB | 100 |
N |
Instead of pulling the image from a remote repository, you can build it locally:
-
Clone the repository:
git clone https://github.com/aguslr/docker-ankiweb.git -
Change into the newly created directory and use
docker-composeto build and launch the container:cd docker-ankiweb && docker-compose up --build -d