Configurate custom sync server for Anki Desktop

I have set up a self-hosted Anki Sync Server with this Docker https://hub.docker.com/r/kuklinistvan/anki-sync-server. How can I now connect the sync server to my Linux Anki desktop app?

I tried this guide [here] (Sync Server - Anki Manual). Under Tools > Preferences > Syncing I have entered the IP of my sync server. How can I see if the syncronisation is working?

Do I have to make any configurations in Docker for it to work? I have created a user.

3 Likes

That should be enough. But I need to ask, is that image not terribly outdated?
I use the following:

Dockerfile

# syntax=docker/dockerfile:1
FROM python:latest
ARG ANKI_VERSION
ENV ANKI_VERSION $ANKI_VERSION

RUN pip install --no-cache-dir anki==${ANKI_VERSION} aqt==${ANKI_VERSION}

ENV SYNC_BASE=/data
ENV SYNC_HOST=0.0.0.0
ENV SYNC_PORT=8080

VOLUME [ "/data" ]
WORKDIR /data
EXPOSE ${SYNC_PORT}/tcp

ENTRYPOINT [ "python", "-m", "anki.syncserver" ]

docker-compose.yml

services:
  anki:
    build:
      context: .
      args:
        - ANKI_VERSION=24.6.3
    image: anki:latest
    volumes:
      - ./data:/data
    ports:
      - "8080:8080/tcp"
    container_name: anki

Hey @voczi

thanks for your reply. Can you provide me more informations about the docker compose and a little manual maybe?

I’m a beginner in docker.

Greedings, Niclas

Create those two files with their respective contents. Then it should just be a matter of running “docker compose up -d”

1 Like

could also just publish an image for this if you or anyone would like this

1 Like

Yes that would be nice. I was able to start the server and a client. But I can’t see, that the client has a connection to the anki server. Do you know, how I can check this? Has your soliution a multiuser support? And if yes, how can I add the users to system and activate those in the clients?

if you have set the custom sync server url to your local instance, then it should 100% be connected. if you really want to make sure, then you could use network monitors to check this (OS-dependent, but maybe try wireshark).
you can indeed add multiple users, there should be a guide somewhere.
i think its just better if i work on a docker image for the sync server with a couple helper scripts, maybe add actual verbosity to the logs too… i have to do some more research

If I type in the ip of the local anki server, I can’t see any log entries from docker run command. Anki also dont ask for credentials. Im questioned. What is it like for you?

can you check the /data folder?
its normal to have pretty much zero logging.

In the /data directory I see only a folder with the username as name. In this folder I see 3 db files. I mean in the terminal promt output I see only one entry, that the anki server is listening on port 8080. But I think, the server doesnt run corrently. Or the configuration for the client is wrong

Sorry, I think I will only have time to have a closer look at this some time in late August/early September. I will let you know.
But as I said, as long as you can see your user in the data folder and sync’ing works then it should be fine.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.