# Ankimobile Self Sync Server failure (the one bundled in Version 2.1.60-qt6)

**URL:** <https://forums.ankiweb.net/t/ankimobile-self-sync-server-failure-the-one-bundled-in-version-2-1-60-qt6/27862>\
**Category:** Help\
**Created:** [February 25, 2023, 1:58am UTC](https://forums.ankiweb.net/t/ankimobile-self-sync-server-failure-the-one-bundled-in-version-2-1-60-qt6/27862 "2023-02-25T01:58:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forums.ankiweb.net/u/Ben)\
**Post date:** [February 25, 2023, 1:58am UTC](https://forums.ankiweb.net/t/ankimobile-self-sync-server-failure-the-one-bundled-in-version-2-1-60-qt6/27862/1 "2023-02-25T01:58:20Z")

</div>

I’ve recently setup an sync server on my desktop machine as per the instructions in Self-Hosted Sync Server in the Anki Manual.

I’m running Ubuntu 22.04LTS on the desktop machine (server) and have enabled the firewall to all local traffic. (e.g. sudo ufw allow from 192.168.0.0/24). The server is working. I am able to sync to it from the desktop running the server as well as my Microsoft Surface 7 running Ubuntu 20.04LTS on the same LAN.

The issue I am having is with my iphone 13 (iOS 15.5) running Ankimobile 2.0.90(20090.2). When I try to sync using the same settings as my Surface which works (e.g. Self-hosted sync server: [http://192.168.0.211:8080/](http://192.168.0.211:8080/) ) my sync fails with the following message (typed out verbatim):

Error A network error occurred. Error details: error sending request for url (): error trying to connect: tcp connect error: No route to host (os error 65)

My server launch command is: ` SYNC_HOST=192.168.0.211 SYNC_USER1=Ben:test anki --syncserver`

Server is at the static IP of: 192.168.0.211

ss -tulpn on the server gives:  
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process  
tcp LISTEN 0 128 192.168.0.211:8080 0.0.0.0:\* users:((“anki”,pid=3612,fd=12))

sudo ufw status on the server gives:  
To Action From

* * *

8080 ALLOW 192.168.0.0/24  
8080/tcp ALLOW Anywhere  
Anywhere ALLOW 192.168.0.0/24  
8080/tcp (v6) ALLOW Anywhere (v6)

It seems the issue is with my iphone (since the Surface running Ubuntu is correctly syncing with the current server settings on the other Ubuntu machine). Has anyone had similar trouble getting Ankimobile to sync over a LAN? Is there some setting on the iphone that needs to be enabled/disabled to allow it to communicate out to the LAN as one would expect?

I tend to do the majority of my reviewing on my phone, so any feedback would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [February 27, 2023, 10:12am UTC](https://forums.ankiweb.net/t/ankimobile-self-sync-server-failure-the-one-bundled-in-version-2-1-60-qt6/27862/2 "2023-02-27T10:12:16Z")

</div>

What happens if you temporarily enable airplane mode and turn wifi back on? Your settings look correct, and local network syncing works on a test device here.

What happens if you run ‘python -m http.server’ on the server, then visit 192.168.0.211:8000 in Safari?

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forums.ankiweb.net/u/Ben)\
**Post date:** [February 28, 2023, 1:46am UTC](https://forums.ankiweb.net/t/ankimobile-self-sync-server-failure-the-one-bundled-in-version-2-1-60-qt6/27862/3 "2023-02-28T01:46:36Z")

</div>

Thanks for getting back to me Damien.

Airplane mode + turning the wifi back on yielded no further results. I then ran ‘python3.11 -m http.server’ on the server and was able to see the contents of my /home directory (of the server) within safari (on the iphone.) I tried removing then re-installing Anki on the iphone. After doing this when trying to sync, my phone prompted me to (I forget the message verbatim, but something along the lines of) “Give anki access to local area network.” This still didn’t work. I then went to setting\>Anki on the iphone and turned off “Allow Anki to access local network” then turned it back on. The iphone then successfully synced with the server.

I wrote out that long winded set of steps, just in case someone else encounters a similar situation (and to be honest, I’m not entirely sure which steps helped/didn’t help.) It is however now successfully syncing! Thank again for the suggestions. Your app has changed my life.

Cheers

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [February 28, 2023, 5:29am UTC](https://forums.ankiweb.net/t/ankimobile-self-sync-server-failure-the-one-bundled-in-version-2-1-60-qt6/27862/4 "2023-02-28T05:29:15Z")

</div>

Glad to hear you were able to resolve the issue; I’ve added a note about this to the syncing docs.

---

<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:** [March 30, 2023, 5:29am UTC](https://forums.ankiweb.net/t/ankimobile-self-sync-server-failure-the-one-bundled-in-version-2-1-60-qt6/27862/5 "2023-03-30T05:29:22Z")

</div>

Closed on March 30, 2023, 5:29am UTC

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