# 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:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![johan.meier](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@johan.meier](https://forums.ankiweb.net/u/johan.meier)\
**Post date:** [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/1 "2024-09-10T18:26:58Z")

</div>

Hi Anki Community

I’ve just created a anki sync server using docker (locally). How can I authenticate to the server locally in my network to sync my decks and view them on tablet and notebook. Can someone help me to setup the self-hosted sync server on desktop and mobile client (Images are welcome).

Greedings

---

<div class="post-metadata">

**Author:** ![Danika\_Dakika](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/danika_dakika/32/17815_2.png) [@Danika\_Dakika](https://forums.ankiweb.net/u/Danika_Dakika)\
**Post date:** [September 11, 2024, 6:06am UTC](https://forums.ankiweb.net/t/how-to-use-self-hosted-anki-server-on-linux-and-windows-anki-client/49264/2 "2024-09-11T06:06:05Z")

</div>

From your post I can’t tell whether you’ve read the instructions in the manual – specifically about “Client Setup.” [Sync Server - Anki Manual](https://docs.ankiweb.net/sync-server.html)

---

<div class="post-metadata">

**Author:** ![johan.meier](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@johan.meier](https://forums.ankiweb.net/u/johan.meier)\
**Post date:** [September 11, 2024, 1:09pm UTC](https://forums.ankiweb.net/t/how-to-use-self-hosted-anki-server-on-linux-and-windows-anki-client/49264/3 "2024-09-11T13:09:03Z")

</div>

> [@Danika\_Dakika](#):
>
> post I can’t tell whether you’ve read the instructions in the manual – specifically about “Client

@Danika_Dakika Thanks for the reply! I have read the manual. But how can I enter the credentials to log in to the sync server. A login prompt is not displayed.

---

<div class="post-metadata">

**Author:** ![Danika\_Dakika](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/danika_dakika/32/17815_2.png) [@Danika\_Dakika](https://forums.ankiweb.net/u/Danika_Dakika)\
**Post date:** [September 11, 2024, 3:36pm UTC](https://forums.ankiweb.net/t/how-to-use-self-hosted-anki-server-on-linux-and-windows-anki-client/49264/4 "2024-09-11T15:36:37Z")

</div>

Once you’ve pointed your client at the sync server, can you use the standard syncing login steps (also in the manual)?

---

<div class="post-metadata">

**Author:** ![johan.meier](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@johan.meier](https://forums.ankiweb.net/u/johan.meier)\
**Post date:** [September 11, 2024, 5:40pm UTC](https://forums.ankiweb.net/t/how-to-use-self-hosted-anki-server-on-linux-and-windows-anki-client/49264/5 "2024-09-11T17:40:27Z")

</div>

Can you send me some screenshot please. I’m questioned

---

<div class="post-metadata">

**Author:** ![johan.meier](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@johan.meier](https://forums.ankiweb.net/u/johan.meier)\
**Post date:** [September 11, 2024, 5:46pm UTC](https://forums.ankiweb.net/t/how-to-use-self-hosted-anki-server-on-linux-and-windows-anki-client/49264/6 "2024-09-11T17:46:42Z")

</div>

This is my configuration:

### Server

docker-compose.yml

 ![Screenshot 2024-09-11 194142](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/e/d/edbb6e6bcc90831e12c2e6a60f21b72078cdbc8c.png)

Dockerfile:

 ![Screenshot 2024-09-11 194231](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/2/f/2f30161ae5f6f6d3bea8f47ac5b6b0d4c150f18f.png)

.env:  
 ![Screenshot 2024-09-11 194320](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/9/9/996a0d49d0da8e80aedb6a31b59e4156f9de214a.png)

### Client

.bashrc

```auto
USER1=username1:password

```

Anki:

 ![Screenshot 2024-09-11 194620](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/1/f/1ffaec4fa44ccc91a63843afd1b23f27400153ac.jpeg)

Could you help me?

---

<div class="post-metadata">

**Author:** ![Danika\_Dakika](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/danika_dakika/32/17815_2.png) [@Danika\_Dakika](https://forums.ankiweb.net/u/Danika_Dakika)\
**Post date:** [September 11, 2024, 8:13pm UTC](https://forums.ankiweb.net/t/how-to-use-self-hosted-anki-server-on-linux-and-windows-anki-client/49264/7 "2024-09-11T20:13:43Z")

</div>

I can’t help you with any of the sync-server setup. The manual has all the answers for that. But you seem to be asking – “it’s set up, so what now?”

What happens when you click Sync? Or when you try to add “AnkiWeb” log-in information in Preferences? That’s how you cause an initial sync in Anki.

![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/4/3/43bdc981359d8976b16b2192bb795f4b11854257.png)

![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/2/1/2159a384faf19266fa68ad8896fbf7183a212828.png)

---

<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.

---

<div class="post-metadata">

**Author:** ![johan.meier](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@johan.meier](https://forums.ankiweb.net/u/johan.meier)\
**Post date:** [September 12, 2024, 7:42am UTC](https://forums.ankiweb.net/t/how-to-use-self-hosted-anki-server-on-linux-and-windows-anki-client/49264/9 "2024-09-12T07:42:24Z")

</div>

Thanks a lot for your time and effort! It helps me a lot.I don’t realised to time in the credentials in the normal Login frame. Thanks again!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [October 12, 2024, 7:42am UTC](https://forums.ankiweb.net/t/how-to-use-self-hosted-anki-server-on-linux-and-windows-anki-client/49264/10 "2024-10-12T07:42:40Z")

</div>

Closed on October 12, 2024, 7:42am UTC

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