# Only run on specific Wifi networks

**URL:** https://forum.syncthing.net/t/only-run-on-specific-wifi-networks/27005
**Category:** Support
**Created:** [August 10, 2026, 6:33pm UTC](https://forum.syncthing.net/t/only-run-on-specific-wifi-networks/27005 "2026-08-10T18:33:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Iwanttosyncmybycicle](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/i/51bf81/32.png) [@Iwanttosyncmybycicle](https://forum.syncthing.net/u/Iwanttosyncmybycicle)
#### Post date: [August 10, 2026, 6:33pm UTC](https://forum.syncthing.net/t/only-run-on-specific-wifi-networks/27005/1 "2026-08-10T18:33:10Z")

</div>

Hi together,

I’d like to run the syncthing linux service (my machine is running systemd) only when a specific wifi (or list of wifis) is connected. Has someone done this before?

My motivation is to increase security (reduce attack surface) by not running a service with open ports on untrusted networks.

What I found so far:

1. I want the same behavior as on Android (_Settings_ → _Run Conditions_ → _Run on specified Wi-Fi networks_), but on Linux.
2. On linux, the [config option `allowedNetworks`](https://docs.syncthing.net/v2.1.0/advanced/device-allowednetworks.html) is nice to limit traffic to local networks only. However, it does not allow me to limit to a specific network.
3. Another user has a similar problem: [pause on metered wifi on linux](https://forum.syncthing.net/t/pause-on-metered-wifi-on-linux/26997)

Some more information:

- My system is using systemd and NetworkManager
- syncthing is running as user context, not system context

---

<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 10, 2026, 6:42pm UTC](https://forum.syncthing.net/t/only-run-on-specific-wifi-networks/27005/2 "2026-08-10T18:42:35Z")

</div>

There is no such functionality inside Syncthing itself. How about using a firewall to block Internet access for the Syncthing binary?

---

<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 9, 2026, 6:42pm UTC](https://forum.syncthing.net/t/only-run-on-specific-wifi-networks/27005/3 "2026-09-09T18:42:52Z")

</div>

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