# Local sync between android/linux since 1.25

**URL:** https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124
**Category:** Android
**Created:** [November 21, 2023, 8:09pm UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124 "2023-11-21T20:09:27Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![genevieve-me](https://forum.syncthing.net/user_avatar/forum.syncthing.net/genevieve-me/32/15515_2.png) [@genevieve-me](https://forum.syncthing.net/u/genevieve-me)
#### Post date: [November 21, 2023, 8:09pm UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/1 "2023-11-21T20:09:27Z")

</div>

Hi! I’m experiencing issues with only being able to sync with my android device over a relay (at much slower speeds than I get between Linux devices on the local network). I’m aware that there are dozens of threads about this topic, but I couldn’t find any since [the release of 1.25.0](https://forum.syncthing.net/t/syncthing-v1-25-0/20876/2), which included a fix to Android local discovery. (The most recent thread I found was “disconnected-devices-between-pixel-and-samsung/20889”).

I reset syncthing on my laptop and phone to test and have them both connected to my wifi network, with no firewalls in place on the router and the necessary ports open on my devices. I then added the phone by manually typing its ID into my laptop.

I can see that on my laptop, 4/5 discovery methods are successful, with “global@[https://discovery-v6.syncthing.net/v2](https://discovery-v6.syncthing.net/v2)” failing, and 3/5 are successful on my phone (the two IPv6 methods failing). 3/3 listeners are successful on both devices.

However, the connection type is “Relay WAN” and the addresses shown for the device connection (on both machines) is a remote IP from a Syncthing relay.

I’m running syncthing 1.26.1 on both devices (Syncthing-Fork via F-Droid on my phone). I’d appreciate any help debugging this. Thank you!

---

<div class="post-metadata">

### Author: ![bt90](https://forum.syncthing.net/user_avatar/forum.syncthing.net/bt90/32/18565_2.png) [@bt90](https://forum.syncthing.net/u/bt90)
#### Post date: [November 21, 2023, 8:40pm UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/2 "2023-11-21T20:40:38Z")

</div>

Can you ping your phone from your laptop?

---

<div class="post-metadata">

### Author: ![genevieve-me](https://forum.syncthing.net/user_avatar/forum.syncthing.net/genevieve-me/32/15515_2.png) [@genevieve-me](https://forum.syncthing.net/u/genevieve-me)
#### Post date: [November 25, 2023, 12:29am UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/3 "2023-11-25T00:29:03Z")

</div>

Yes I can, not a network issue as far as I can tell.

---

<div class="post-metadata">

### Author: ![bt90](https://forum.syncthing.net/user_avatar/forum.syncthing.net/bt90/32/18565_2.png) [@bt90](https://forum.syncthing.net/u/bt90)
#### Post date: [November 25, 2023, 6:02am UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/4 "2023-11-25T06:02:54Z")

</div>

How did you install syncthing on your laptop?

---

<div class="post-metadata">

### Author: ![genevieve-me](https://forum.syncthing.net/user_avatar/forum.syncthing.net/genevieve-me/32/15515_2.png) [@genevieve-me](https://forum.syncthing.net/u/genevieve-me)
#### Post date: [November 26, 2023, 4:08am UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/5 "2023-11-26T04:08:26Z")

</div>

Using [home-manager](https://github.com/nix-community/home-manager). (I’m just using the defaults, which runs `syncthing -no-browser -no-restart -logflags=0` as a systemd user service.)

---

<div class="post-metadata">

### Author: ![bt90](https://forum.syncthing.net/user_avatar/forum.syncthing.net/bt90/32/18565_2.png) [@bt90](https://forum.syncthing.net/u/bt90)
#### Post date: [November 26, 2023, 11:42am UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/6 "2023-11-26T11:42:34Z")

</div>

You can check the discovered IPs for remote devices using the CLI on your laptop:

```
syncthing cli show discovery

```

(we should really offer an option to display this in the web UI)

---

<div class="post-metadata">

### Author: ![genevieve-me](https://forum.syncthing.net/user_avatar/forum.syncthing.net/genevieve-me/32/15515_2.png) [@genevieve-me](https://forum.syncthing.net/u/genevieve-me)
#### Post date: [November 27, 2023, 2:41am UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/7 "2023-11-27T02:41:42Z")

</div>

```plaintext
> syncthing cli show discovery
{
  "VZ7QBZA-EDGMBJW-LMW224N-ZMELZHG-HBHMBKQ-6DPWNQV-QSYSJ7S-54D7BQG": {
    "addresses": [
      "quic://108.5.76.12:1024",
      "quic://108.5.76.12:22000",
      "relay://172.245.94.35:22067/?id=W3LBV2D-JAJNVKT-RA3SZLG-JVXGK4O-PPRIXAD-ALBMDKP-7PR7LCV-2CAZ4QW",
      "tcp://108.5.76.12:22000"
    ]
  }
}

```

Unfortunately I just see the the relay and the public IP address of my phone (the same public IP as my laptop).

However, it seems my laptop is receiving the local discovery packets from syncthing on my phone: I tried `sudo tcpdump 'udp and port 22000'` and see output like ` 21:30:10.829966 IP 192.168.1.155.snapenetio > seberg.snapenetio: UDP, length 1252`. (I’m pretty sure attaching this packet won’t leak anything other than my device ID?) [pcap.txt](https://forum.syncthing.net/uploads/short-url/mCIFjUqf2uvEjXPKyqGV2VkXhGT.txt) (5.4 KB)

So I’m not sure why it isn’t discovering my phone’s IP.

---

<div class="post-metadata">

### Author: ![bt90](https://forum.syncthing.net/user_avatar/forum.syncthing.net/bt90/32/18565_2.png) [@bt90](https://forum.syncthing.net/u/bt90)
#### Post date: [November 27, 2023, 5:59am UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/8 "2023-11-27T05:59:51Z")

</div>

> [@genevieve-me](#):
>
> sudo tcpdump 'udp and port 22000

That port is used for actual connections and global discovery. Local discovery uses 21027/UDP.

---

<div class="post-metadata">

### Author: ![genevieve-me](https://forum.syncthing.net/user_avatar/forum.syncthing.net/genevieve-me/32/15515_2.png) [@genevieve-me](https://forum.syncthing.net/u/genevieve-me)
#### Post date: [November 30, 2023, 3:37am UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/9 "2023-11-30T03:37:17Z")

</div>

My mistake, sorry. In that case it looks like the linux PC is sending out local discovery packets but the android phone is not. When I open the app on my phone to add a new device, I can see the local IP address of my laptop under ‘discovered devices’ (right next to the relay address which was actually getting used). So it seems like local connections should be possible. But for some reason, tonight the two devices are refusing to connect whatsoever, not even over a relay. I haven’t changed any settings or anything about the local network. Don’t have much time to look into it more for now, but I’d appreciate any suggestions on where to troubleshoot.

---

<div class="post-metadata">

### Author: ![bt90](https://forum.syncthing.net/user_avatar/forum.syncthing.net/bt90/32/18565_2.png) [@bt90](https://forum.syncthing.net/u/bt90)
#### Post date: [November 30, 2023, 6:03am UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/10 "2023-11-30T06:03:10Z")

</div>

The logs from Syncthing running on your phone might be helpful.

---

<div class="post-metadata">

### Author: ![Kezxo](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/k/e9bcb4/32.png) [@Kezxo](https://forum.syncthing.net/u/Kezxo)
#### Post date: [November 30, 2023, 10:36am UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/11 "2023-11-30T10:36:51Z")

</div>

I have also been having these issues on android 13 and windows 10 lately. Sometimes it connects via relay, syncs the files via the internet and when its done or enough time passed it finds the other client via my network somehow but then the files are often synced.

Weirdly enough i tried troubleshooting it a bit and tried using a third device (windows 11 laptop) and suddenly it worked fine and now all three connect instantly. (to ipv6 addresses i think?) I can’t reproduce it anymore…

I’m not sure why it started working again, i did disable the power saving setting for the network card on the win10 device just as a test. I’m not sure if that’s what fixed it though…

What is the best and easiest way to debug this and share logs without sharing lots of personal info from the logs? I’m using synctrazor.

---

<div class="post-metadata">

### Author: ![tomasz86](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@tomasz86](https://forum.syncthing.net/u/tomasz86)
#### Post date: [November 30, 2023, 10:42am UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/12 "2023-11-30T10:42:36Z")

</div>

You should probably open a new topic for your issue (because this one here is about Android and Linux), but with Windows involved, one thing to always verify is that your network is set to “private” and not “public”, as with the latter, the OS will block any direct connections.

---

<div class="post-metadata">

### Author: ![Kezxo](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/k/e9bcb4/32.png) [@Kezxo](https://forum.syncthing.net/u/Kezxo)
#### Post date: [November 30, 2023, 10:58am UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/13 "2023-11-30T10:58:28Z")

</div>

Maybe unless it’s actually an android issue.

But thanks for that tip, it was set to “public” and i have no idea why…

I’ll return if the issue returns.

---

<div class="post-metadata">

### Author: ![tomasz86](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@tomasz86](https://forum.syncthing.net/u/tomasz86)
#### Post date: [November 30, 2023, 2:01pm UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/14 "2023-11-30T14:01:22Z")

</div>

It defaults to “public” if you don’t click “yes” on the following pop-up when connecting to a network for the first time.

 ![image](https://forum-uploads.syncthingcdn.net/original/2X/4/4803247a80eff2f966828b2500c1e20da4588f6a.jpeg)

The funny thing is that in Windows 10 until v1809 or so, it was impossible to change the setting using the GUI, only via the command line.

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [December 31, 2023, 9:07am UTC](https://forum.syncthing.net/t/local-sync-between-android-linux-since-1-25/21124/16 "2023-12-31T09:07:26Z")

</div>

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