{"id":15105964,"url":"https://github.com/lorenzschmid/anki-syncserver","last_synced_at":"2025-07-20T17:33:59.362Z","repository":{"id":255645402,"uuid":"851030190","full_name":"lorenzschmid/anki-syncserver","owner":"lorenzschmid","description":"Simple Anki server in form of a docker container based on the official CLI tool","archived":false,"fork":false,"pushed_at":"2024-09-13T18:18:41.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T14:34:24.653Z","etag":null,"topics":["anki","anki-sync","anki-sync-server","docker-image"],"latest_commit_sha":null,"homepage":"https://docs.ankiweb.net/sync-server.html","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lorenzschmid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-02T09:45:54.000Z","updated_at":"2024-12-30T22:30:22.000Z","dependencies_parsed_at":"2024-09-25T21:00:29.196Z","dependency_job_id":null,"html_url":"https://github.com/lorenzschmid/anki-syncserver","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"681e527d8bc217cd5bb818dc515071ad94c82648"},"previous_names":["lorenzschmid/anki-syncserver"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lorenzschmid/anki-syncserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzschmid%2Fanki-syncserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzschmid%2Fanki-syncserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzschmid%2Fanki-syncserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzschmid%2Fanki-syncserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lorenzschmid","download_url":"https://codeload.github.com/lorenzschmid/anki-syncserver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzschmid%2Fanki-syncserver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266166051,"owners_count":23886727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anki","anki-sync","anki-sync-server","docker-image"],"created_at":"2024-09-25T21:00:25.195Z","updated_at":"2025-07-20T17:33:59.328Z","avatar_url":"https://github.com/lorenzschmid.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anki Sync Server Docker Container\n\nThis docker container simply wraps the official minimal sync server based on Python. More information can be found in the [official documentation](https://docs.ankiweb.net/sync-server.html).\n\n\n## Configuration\n\nThe docker container uses the same environmental variable as described in the [official documentation](https://docs.ankiweb.net/sync-server.html). For more information, please consult it directly. The following environmental variables are bound to the container's setup and therefore, should not be changed:\n\n- `SYNC_BASE`\n- `SYNC_HOST`\n- `SYNC_PORT`\n\nAt least the following environmental variables has to be set outside of the container:\n\n- `SYNC_USER1`: The username and password for the first user in the format `user:password`.\n\nIn case of using `PASSWORDS_HASHED=1` and hashing `password` with [pbkdf2](https://git.sr.ht/~laalsaas/pbkdf2-password-hash), please take care to correctly escape any dollar signs (`$`) before using them in the terminal or an `.env` file.\n\n## Running the Docker Container\n\nTo start the Anki sync server in a Docker container:\n\n```sh\ndocker run \\\n  -d \\\n  --name anki-syncserver \\\n  --user anki:docker \\\n  -p 8080:8080 \\\n  -v ./data:/data \\\n  -e SYNC_USER1=user:password \\\n  ghcr.io/lorenzschmid/anki-syncserver\n```\n\n- `-d`: Runs the container in detached mode.\n- `--name`: Assigns a name to the container (`anki-syncserver`).\n- `--user`: Assigns the user and group under which the container should run (rootless).\n- `-p 8080:8080`: Maps port `8080` on the host to port `8080` in the container.\n- `-v ./data:/data`: Mounts the host directory `./data` to the container’s `/data` directory for data persistence.\n- `-e SYNC_USER1=user:password`: Sets the `SYNC_USER1` environment variable to configure the sync server’s username and password.\n\nor via docker compose:\n\n```yaml\nversion: '3.8'\n\nservices:\n  anki-syncserver:\n    image: ghcr.io/lorenzschmid/anki-syncserver\n    container_name: anki-syncserver\n    user: \"anki:docker\"  # Replace with your desired user_id:group_id\n    environment:\n      SYNC_USER1: \"user:password\"  # Replace with your desired username:password\n    ports:\n      - \"8080:8080\"\n    volumes:\n      - \"./data:/data\"\n    restart: unless-stopped\n```\n\n\n## Updating the Docker Container\n\nUpon each restart, the docker container verifies that it runs with the most recent version of the official sync server and updates automatically if a new version is available. The docker image itself likely does not need an update.\n\n\n## Building the Docker Image Locally\n\n1. Clone this Repository:\n   ```sh\n   git clone https://github.com/lorenzschmid/anki-syncserver.git\n   cd anki-syncserver\n   ```\n\n2. Build the Docker Image:\n   Run the following command in the directory containing your `Dockerfile`:\n   ```sh\n   docker build -t anki-syncserver .\n   ```\n\n   This command builds the Docker image and tags it as `anki-syncserver`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzschmid%2Fanki-syncserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Florenzschmid%2Fanki-syncserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzschmid%2Fanki-syncserver/lists"}