# Trouble connecting phone to PC

**URL:** https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595
**Category:** Support
**Created:** [July 31, 2023, 12:38pm UTC](https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595 "2023-07-31T12:38:26Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![CliffMaximus25](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/f1d935/32.png) [@CliffMaximus25](https://forum.syncthing.net/u/CliffMaximus25)
#### Post date: [July 31, 2023, 12:38pm UTC](https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595/1 "2023-07-31T12:38:26Z")

</div>

Hi 😀

I’m having trouble locally connecting my phone to my PC with Syncthing

Phone is on Android 11 (LineageOS), I’m aware that there is an aspect of the API that breaks interface address discovery

I have applied this [alternative workaround](https://github.com/syncthing/syncthing-android/issues/1628#issuecomment-1116034144) to remove the local discovery aspect which conflicts with the API, on top of trying quic:// and tcp4:// as prefix when changing the pc’s address on my phone, however in the WebGUI I am met with either:

1. tcp4:// as prefix: `connection refused (dial tcp4 [RESERVED DEVICE DCHP ADDRESS:PORT]: connect: connection refused`

or

1. quic:// as prefix: `operation not permitted (dial: INTERNAL_ERROR (local): write udp [::]:[PORT]>[RESERVED DEVICE DHCP ADDRESS:PORT]: sendto: operation not permitted`

in the PC’s device info that I added through QR code

I’ve made sure to allow synctrayzor & syncthing through the windows firewall, alongside allowing them full internet access in [Simplewall](https://github.com/henrypp/simplewall).

On my phone I’ve also tried connecting with both the official Syncthing app and Syncthing-fork, running syncthing as super-user

I don’t know what else could be preventing the connection between my phone & PC, any help would be appreciated

---

<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: [July 31, 2023, 1:04pm UTC](https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595/2 "2023-07-31T13:04:30Z")

</div>

> [@CliffMaximus25](#):
>
> I’ve made sure to allow synctrayzor & syncthing through the windows firewall, alongside allowing them full internet access in [Simplewall](https://github.com/henrypp/simplewall).

Just to be sure, have you set your network connection in Windows to private (see [https://support.microsoft.com/windows/make-a-wi-fi-network-public-or-private-in-windows-0460117d-8d3e-a7ac-f003-7a0da607448d](https://support.microsoft.com/windows/make-a-wi-fi-network-public-or-private-in-windows-0460117d-8d3e-a7ac-f003-7a0da607448d))?

> [@CliffMaximus25](#):
>
> running syncthing as super-user

If you run Syncthing as superuser, then you don’t need any workarounds, because with root access, local discovery works just fine.

---

<div class="post-metadata">

### Author: ![CliffMaximus25](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/f1d935/32.png) [@CliffMaximus25](https://forum.syncthing.net/u/CliffMaximus25)
#### Post date: [July 31, 2023, 2:56pm UTC](https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595/3 "2023-07-31T14:56:51Z")

</div>

Thanks for the reply,

> [@tomasz86](#):
>
> Just to be sure, have you set your network connection in Windows to private (see [Make a Wi-Fi network public or private in Windows - Microsoft Support](https://support.microsoft.com/windows/make-a-wi-fi-network-public-or-private-in-windows-0460117d-8d3e-a7ac-f003-7a0da607448d))?

My network connection was set to public. I’ve set it to private now but that hasn’t fixed the problem

---

<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: [July 31, 2023, 3:56pm UTC](https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595/4 "2023-07-31T15:56:03Z")

</div>

What about the router? Can you check whether there is network isolation or similar option enabled there (as that would prevent the devices from seeing each other)?

Can you try to revert all network-related settings in Syncthing to the defaults and see what happens? By the defaults I mean this in the general settings:

 ![image](https://forum-uploads.syncthingcdn.net/original/2X/c/c179e24996c3e1fb9102b5c8985daf48015e937f.png)

and this in each device’s settings:

 ![image](https://forum-uploads.syncthingcdn.net/original/2X/b/b56ea82e64a221b09a3139c3639c099717417839.png)

After doing so, please post screenshots of the Syncthing WebGUI on both sides. On Android, you can access it from the left slide-out menu (or remotely on a larger screen if you know what you’re doing). I’m also assuming that Syncthing is still running as root on the Android side.

When it comes to the Web GUI, I’d basically like to see this part:

 ![image](https://forum-uploads.syncthingcdn.net/original/2X/9/90a075a0420a32f4490c62a0d9de8a05a3fd7b60.png)

If the numbers are different (i.e. not all listeners and discovery work), please click them and post screenshots of any error messages logged there.

---

<div class="post-metadata">

### Author: ![CliffMaximus25](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/f1d935/32.png) [@CliffMaximus25](https://forum.syncthing.net/u/CliffMaximus25)
#### Post date: [July 31, 2023, 9:03pm UTC](https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595/5 "2023-07-31T21:03:40Z")

</div>

> [@tomasz86](#):
>
> Can you check whether there is network isolation or similar option enabled there (as that would prevent the devices from seeing each other)?

I checked and there doesn’t seem to be anything like this enabled preventing devices from talking to one another.

UPnP is enabled on the router.

The Synthing documentation recommends [enabling UPnP in it](https://docs.syncthing.net/users/firewall.html), but I’m not seeing it either in Settings or Advanced Settings.

> [@tomasz86](#):
>
> Can you try to revert all network-related settings in Syncthing to the defaults and see what happens? By the defaults I mean this in the general settings:

Reset Syncthing on the phone and PC, managed to connect both to each other through VPN with global discovery & relays (have been using it like this in the past, I want to use it exclusively locally now), so Syncthing itself works.

**Progress:** Syncthing on the phone now detects the PC in discovered devices when adding a new device! However I still can’t establish a connection between them.

On the phone under remote devices:

PC \> Address:

```plaintext

dynamic
tcp://[address1*]:22000
connection refused
tcp://[ReservedDHCPAddress]:22000
connection refused
quic://[address1]:22000
operation not permitted
tcp://[ReservedDHCPAddress]:22000
operation not permitted

```

\*address1 is a random address

Something somewhere is stopping them from connecting. Reminder that I was just able to connect them both being connected to a VPN through relays and global discovery

> [@tomasz86](#):
>
> When it comes to the Web GUI, I’d basically like to see this part:

PC:

 ![1](https://forum-uploads.syncthingcdn.net/original/2X/0/078efcb463813cff58b616a7e8d8afbb6b47184b.jpeg)

Phone:

 ![2](https://forum-uploads.syncthingcdn.net/original/2X/2/24e123c67049c7e0815114f9d9e1f60f86ffa90d.png) ![3](https://forum-uploads.syncthingcdn.net/original/2X/b/b4dca3da234b57a0edb7874ab287b639d9cfe63e.png) ![4](https://forum-uploads.syncthingcdn.net/original/2X/7/7c08f0358487009fc476d4d76cc37372dee19467.png)This is with all settings on default for both the phone and PC (except Global Discovery and Relays disabled). I’m following the steps of the alternate workaround where I reserve a DHCP address for one device (PC) then add it to the phone. The discovery failures are to be expected as I do not have IPv6 enabled.

---

<div class="post-metadata">

### Author: ![Nummer378](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nummer378/32/5958_2.png) [@Nummer378](https://forum.syncthing.net/u/Nummer378)
#### Post date: [July 31, 2023, 11:07pm UTC](https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595/6 "2023-07-31T23:07:27Z")

</div>

> [@CliffMaximus25](#):
>
> The Synthing documentation recommends [enabling UPnP in it](https://docs.syncthing.net/users/firewall.html), but I’m not seeing it either in Settings or Advanced Settings.

The setting the docs refer to is called “Enable NAT traversal” in Connection Settings. It’s enabled by default though.

UPnP isn’t relevant if you’re not talking through the NAT though, e.g. if your devices are on the same network.

> [@CliffMaximus25](#):
>
> ```plaintext
> tcp://[ReservedDHCPAddress]:22000
> connection refused
> 
> ```

That means there’s either a firewall issue on the PC, or the PC isn’t listening on the correct interface or port. What listen address are you using on the PC?

> [@CliffMaximus25](#):
>
> ![3](https://forum-uploads.syncthingcdn.net/original/2X/b/b4dca3da234b57a0edb7874ab287b639d9cfe63e.png)

Looks like a crashed, stuck instance here. I would suggest to reboot the Android and see if that removes the errors. It’s probably not the root cause though.

It’s also possible that you’re trying to run syncthing-android and syncthing-fork at the same time: Don’t do that: They will conflict with each other. Choose one.

---

<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: [August 1, 2023, 7:06am UTC](https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595/7 "2023-08-01T07:06:06Z")

</div>

> [@CliffMaximus25](#):
>
> This is with all settings on default for both the phone and PC (except Global Discovery and Relays disabled). I’m following the steps of the alternate workaround where I reserve a DHCP address for one device (PC) then add it to the phone. The discovery failures are to be expected as I do not have IPv6 enabled.

The workaround isn’t necessary if you run Syncthing on Android as root (which you said you did). Unless you would prefer not to run it with such privileged access and are trying to find a solution to avoid it, of course.

This is more or less what the situation in the GUI in relation to listeners and discovery with all settings at default should look on Android when running as root.

 ![image](https://forum-uploads.syncthingcdn.net/original/2X/a/a3ed5311815e6abbcf4bb35981ec0cdd0367f74a.png) ![image](https://forum-uploads.syncthingcdn.net/original/2X/2/25ad89dfa1f9f59253ef27a974a755275a217c34.png) ![image](https://forum-uploads.syncthingcdn.net/original/2X/d/d16228f78b0c817d6805e7dffd2c268ddd5ce635.png)

> [@Nummer378](#):
>
> It’s also possible that you’re trying to run syncthing-android and syncthing-fork at the same time: Don’t do that: They will conflict with each other. Choose one.

It’s actually possible to run both, but you do need to change the GUI port in the app settings, and then tweak the ports in all other connection-related settings inside Syncthing itself. Of course, for troubleshooting purposes it would be much better to keep just one Syncthing app running right now.

---

<div class="post-metadata">

### Author: ![CliffMaximus25](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/f1d935/32.png) [@CliffMaximus25](https://forum.syncthing.net/u/CliffMaximus25)
#### Post date: [August 1, 2023, 8:53pm UTC](https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595/8 "2023-08-01T20:53:31Z")

</div>

> [@Nummer378](#):
>
> That means there’s either a firewall issue on the PC, or the PC isn’t listening on the correct interface or port. What listen address are you using on the PC?

I’ve left that at “default”

> [@Nummer378](#):
>
> It’s also possible that you’re trying to run syncthing-android and syncthing-fork at the same time: Don’t do that: They will conflict with each other. Choose one.

You’re right, I had both Syncthing and Syncthing-Fork running at the same time. Disabling Syncthing restored listeners to 2/2 green. (quic:// & tcp:// 0.0.0.0:22000)

> [@tomasz86](#):
>
> The workaround isn’t necessary if you run Syncthing on Android as root (which you said you did). Unless you would prefer not to run it with such privileged access and are trying to find a solution to avoid it, of course.

I’m running it as root at the moment to see if the android API restriction is the source of the issue, which it doesn’t seem to be

> [@tomasz86](#):
>
> This is more or less what the situation in the GUI in relation to listeners and discovery with all settings at default should look on Android when running as root.
> 
> ![image](https://forum-uploads.syncthingcdn.net/original/2X/a/a3ed5311815e6abbcf4bb35981ec0cdd0367f74a.png)
> 
> ![image](https://forum-uploads.syncthingcdn.net/original/2X/2/25ad89dfa1f9f59253ef27a974a755275a217c34.png)
> 
> ![image](https://forum-uploads.syncthingcdn.net/original/2X/d/d16228f78b0c817d6805e7dffd2c268ddd5ce635.png)

Yes this is almost what I have, the difference between your screenshots and what I have on my phone is in discovery failures I have:

```plaintext
IPv4 local: write upd4 0.0.0.0:[randomport]>[destinationaddress*:21027]: sendto: operation not permitted

```

\*Analysing traffic with [NetworkTrafficView](https://www.nirsoft.net/utils/network_traffic_view.html), I see that it’s the destination address shown here and not the source address which is the reserved DHCP address I gave the PC when following the [workaround instructions](https://github.com/syncthing/syncthing-android/issues/1628#issuecomment-1116034144) which is slighlty different at the end

I have tried completely disabling Windows fireall and Simplewall both at the same time and the phone still can’t connect to the PC, nothing changes.

Checked the router and there doesn’t seem to be any features/settings that prevent devices from communication

Are there any other settings like:

> [@tomasz86](#):
>
> Just to be sure, have you set your network connection in Windows to private?

That I should know of for Syncthing to work? or any Windows services/components that should be enabled?

Reminder that I have no issues connecting the devices through a VPN using relays & global discovery

I have a very hardened and minimal Windows, so it’s possible I have disabled features, services & applied registry tweaks that would indirectly hinder Syncthing from working properly locally

---

<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: [August 1, 2023, 10:07pm UTC](https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595/9 "2023-08-01T22:07:09Z")

</div>

> [@CliffMaximus25](#):
>
> That I should know of for Syncthing to work? or any Windows services/components that should be enabled?
> 
> Reminder that I have no issues connecting the devices through a VPN using relays & global discovery
> 
> I have a very hardened and minimal Windows, so it’s possible I have disabled features, services & applied registry tweaks that would indirectly hinder Syncthing from working properly locally

Honestly, if it’s a heavily tweaked custom Windows setup, it’s difficult to say anything conclusive without testing the same on a clean Windows installation. I’m mainly a Windows user and up to now have installed Syncthing on dozens of Windows machines. Normally, setting the network to private should be the only thing needed to make everything connect locally without issues.

What kind of tweaks have you applied specifically? I also like to tweak my Windows installations, however I generally only follow the official Microsoft guide from [https://learn.microsoft.com/windows/privacy/manage-connections-from-windows-operating-system-components-to-microsoft-services](https://learn.microsoft.com/windows/privacy/manage-connections-from-windows-operating-system-components-to-microsoft-services), meaning no custom debloating scripts from the Internet, etc. which usually disable (or worse, remove irreversibly) way too much.

---

<div class="post-metadata">

### Author: ![CliffMaximus25](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/f1d935/32.png) [@CliffMaximus25](https://forum.syncthing.net/u/CliffMaximus25)
#### Post date: [August 2, 2023, 3:32pm UTC](https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595/10 "2023-08-02T15:32:39Z")

</div>

> [@tomasz86](#):
>
> Honestly, if it’s a heavily tweaked custom Windows setup, it’s difficult to say anything conclusive without testing the same on a clean Windows installation. I’m mainly a Windows user and up to now have installed Syncthing on dozens of Windows machines. Normally, setting the network to private should be the only thing needed to make everything connect locally without issues.
> 
> What kind of tweaks have you applied specifically? I also like to tweak my Windows installations, however I generally only follow the official Microsoft guide from [Manage connections from Windows 10 and Windows 11 Server/Enterprise editions operating system components to Microsoft services - Windows Privacy | Microsoft Learn](https://learn.microsoft.com/windows/privacy/manage-connections-from-windows-operating-system-components-to-microsoft-services), meaning no custom debloating scripts from the Internet, etc. which usually disable (or worse, remove irreversibly) way too much.

Mostly applied a lot of scripts/tweaks from [this project](https://github.com/undergroundwires/privacy.sexy) related to privacy, ran O&O Shut up too.

Again, nothing changes when completely disabling the firewall & simplewall at the same time. I don’t know what else could be preventing the phone from connecting to the PC

---

<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: [September 1, 2023, 3:33pm UTC](https://forum.syncthing.net/t/trouble-connecting-phone-to-pc/20595/11 "2023-09-01T15:33:28Z")

</div>

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