From 52aa5b2433052a84f933d3fe2de74bbeb0fe74ca Mon Sep 17 00:00:00 2001 From: tiyn Date: Sat, 22 Nov 2025 08:44:47 +0100 Subject: [PATCH] added anki --- wiki/docker/ankitects_-_syncserver.md | 58 +++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 wiki/docker/ankitects_-_syncserver.md diff --git a/wiki/docker/ankitects_-_syncserver.md b/wiki/docker/ankitects_-_syncserver.md new file mode 100644 index 0000000..6e1bb80 --- /dev/null +++ b/wiki/docker/ankitects_-_syncserver.md @@ -0,0 +1,58 @@ +# ankitects - anki + +This is a [Docker](/wiki/docker.md) container for a [Anki syncserver](/wiki/anki.md#setup-server). +The official container is part of the +[Anki GitHub repository](https://github.com/ankitects/anki/tree/main/docs/syncserver) and has to be +build manually. + +The syncserver can be installed to handle the syncing of data in a self-hosted way. +It is described [on GitHub](https://github.com/ankitects/anki/tree/main/docs/syncserver) and can be +setup via [Docker](/wiki/docker.md). + +## Set-up + +Due to the syncserver having to be set up manually first navigate to the +[Anki syncserver GitHub subpage](/wiki/anki.md#setup-server). +From there download the `Dockerfile` and the `entrypoints.sh`. +Then create the file `rebuild.sh`. +Change the settings according to your needs and run `./rebuild.sh` afterwards. +Especially set the `` (for example `24.11`) aswell as the `` and ``. + +## Environment-variables + +Set the following variables with the -e tag. + +| Name | Usage | Default | +| -------------- | -------------------------------------------------------- | ------- | +| `SYNC_USER1` | contains the `` and `` of the first user | | + +## Ports + +Set the following ports in the `ports:` section. + +| Container Port | Recommended outside port | Protocol | Description | +| -------------- | ------------------------ | --------- | ------------- | +| `27701` | `8080` | TCP | Default port | + +## Volumes + +Set the following volumes with the -v tag. + +| Outside mount/volume name | Container mount | Description | +| ------------------------- | --------------- | ------------- | +| `akni-sync-server-data` | `/anki-data` | Data storage | + +## rebuild.sh + +```sh +#!/bin/sh +docker stop anki-sync-server +docker rm anki-sync-server +docker build -f ./Dockerfile --no-cache --build-arg ANKI_VERSION= -t anki-sync-server . +docker run -d \ + -e "SYNC_USER1=:" \ + -p 27701:8080 \ + --mount type=volume,src=anki-sync-server-data,dst=/anki_data \ + --name anki-sync-server \ + anki-sync-server +```