# How to use self hosted anki server on Linux and Windows Anki Client

**URL:** <https://forums.ankiweb.net/t/how-to-use-self-hosted-anki-server-on-linux-and-windows-anki-client/49264>\
**Category:** Syncing & AnkiWeb\
**Created:** [September 10, 2024, 6:26pm UTC](https://forums.ankiweb.net/t/how-to-use-self-hosted-anki-server-on-linux-and-windows-anki-client/49264 "2024-09-10T18:26:58Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![hkr](https://avatars.discourse-cdn.com/v4/letter/h/c6cbf5/32.png) [@hkr](https://forums.ankiweb.net/u/hkr)\
**Post date:** [September 12, 2024, 12:32am UTC](https://forums.ankiweb.net/t/how-to-use-self-hosted-anki-server-on-linux-and-windows-anki-client/49264/8 "2024-09-12T00:32:27Z")

</div>

Did you know that [there is an example Dockerfile for Self-Hosted Sync Server](https://github.com/ankitects/anki/tree/main/docs/syncserver) in Anki’s GitHub repository? If you haven’t tried it yet, you might want to give it a try first.

Here is a screencast of me trying out the Dockerfile in the repository. (Incidentally, this is my first time trying out the Self-Hosted Sync Server feature.)

The `compose.yaml` used in the video is below. I am not familiar with Docker at all, so there may be a more appropriate way to write `compose.yaml`.

### compose.yaml

```yaml
services:
  anki-sync-server:
    container_name: anki-sync-server
    build:
      context: .
      args:
        ANKI_VERSION: 24.06.3
    tty: true
    environment:
      - SYNC_USER1=username:password
      - SYNC_BASE=/.syncserver
    volumes:
      - ./.syncserver:/.syncserver
    ports:
      - "8080:8080"

```

* * *

Just FYI, when posting code, commands, or configuration files (like `Dockerfile` or `docker-compose.yml`), it’s generally more helpful to paste them as text rather than screenshots. This way, it’s easier for others to copy, test, and provide accurate answers. Plus, text can be searched, which is a huge benefit for anyone looking at the thread in the future.

For more tips on how to ask technical questions effectively, you might find Stack Overflow’s [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) page useful.

---

_[View the full topic](https://forums.ankiweb.net/t/how-to-use-self-hosted-anki-server-on-linux-and-windows-anki-client/49264)._
