# \[SOLVED\] Changing listening port

**URL:** https://forum.syncthing.net/t/solved-changing-listening-port/69
**Category:** Support
**Created:** [May 12, 2014, 5:22pm UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69 "2014-05-12T17:22:38Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![developej](https://forum.syncthing.net/user_avatar/forum.syncthing.net/developej/32/5306_2.png) [@developej](https://forum.syncthing.net/u/developej)
#### Post date: [May 12, 2014, 5:22pm UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/1 "2014-05-12T17:22:39Z")

</div>

So I wanted to change the listening port of Syncthing. It works well when I go to localhost:newport, but I can’t connect to web ui with [http://mynoipaddress](http://mynoipaddress):mysyncthingport

I forwarded the port, and I have different services running on custom ports, say btsync which I would like to switch from. I can go to [http://mynoipaddress](http://mynoipaddress):mybtsyncport and it works well, but no luck with Syncthing…is it something with Syncthing or my router?

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [May 12, 2014, 9:38pm UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/2 "2014-05-12T21:38:21Z")

</div>

If you set the (GUI) listening address to `localhost:1234` you will only be able to connect to it from localhost (this is the default, for security reasons). If you set it to `:1234` (no IP address) you will be able to connect from anywhere.

---

<div class="post-metadata">

### Author: ![developej](https://forum.syncthing.net/user_avatar/forum.syncthing.net/developej/32/5306_2.png) [@developej](https://forum.syncthing.net/u/developej)
#### Post date: [May 12, 2014, 9:42pm UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/3 "2014-05-12T21:42:46Z")

</div>

Ah, that was easy. Thanks

---

<div class="post-metadata">

### Author: ![lxlx](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/l/a587f6/32.png) [@lxlx](https://forum.syncthing.net/u/lxlx)
#### Post date: [May 13, 2014, 3:24am UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/4 "2014-05-13T03:24:39Z")

</div>

Is there a way to do that at startup time with binary?

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [May 13, 2014, 3:42am UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/5 "2014-05-13T03:42:36Z")

</div>

You can edit the configuration file.

---

<div class="post-metadata">

### Author: ![jedie](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jedie](https://forum.syncthing.net/u/jedie)
#### Post date: [May 14, 2014, 7:46am UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/6 "2014-05-14T07:46:56Z")

</div>

Is the listening port the same port for data transfers?

EDIT: It’s seems to me that listening == transfer port is. Isn’t it? That’s good, so it’s easy to setup QoS in the router 😉

---

<div class="post-metadata">

### Author: ![developej](https://forum.syncthing.net/user_avatar/forum.syncthing.net/developej/32/5306_2.png) [@developej](https://forum.syncthing.net/u/developej)
#### Post date: [May 14, 2014, 10:30am UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/7 "2014-05-14T10:30:01Z")

</div>

It is not by default…this is my config.xml

```
...
<gui enabled="true">
        <address>:9092</address> # I set this, default was 8080 I think
        ...
</gui>
 <options>
        <listenAddress>:50001</listenAddress> # Also custom, it was 20k something
        ...
</options>
...

```

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [May 14, 2014, 12:40pm UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/8 "2014-05-14T12:40:31Z")

</div>

There are two different “listening” ports; one for data transfers, and where syncthing expects connections from other nodes (22000 by default) and one for the GUI (8080).

---

<div class="post-metadata">

### Author: ![jedie](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jedie](https://forum.syncthing.net/u/jedie)
#### Post date: [May 14, 2014, 3:05pm UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/9 "2014-05-14T15:05:15Z")

</div>

> [@calmh](#):
>
> There are two different “listening” ports; one for data transfers, and where syncthing expects connections from other nodes (22000 by default) and one for the GUI (8080).

That’s three, isn’t it?

1. data transfers
2. connections from other nodes
3. the WebGUI

But in config are only two, as developej posted.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [May 14, 2014, 3:09pm UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/10 "2014-05-14T15:09:31Z")

</div>

Numbers one and two are the same.

---

<div class="post-metadata">

### Author: ![jedie](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jedie](https://forum.syncthing.net/u/jedie)
#### Post date: [May 14, 2014, 3:30pm UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/11 "2014-05-14T15:30:12Z")

</div>

Ah, ok. Thanks, for response…

Maybe there is a better text in the WebGUI than “Sync Protocol Listen Addresses” ? Bad proposal: “Sync Protocol Listen/Transfer Addresses” or “Sync Protocol Listen&Data Addresses” or something…

Other question, related to this: The default address is just ":22000" Is this not the same as “0.0.0.0:22000” which IMHO is clearer to understand???

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [May 14, 2014, 3:36pm UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/12 "2014-05-14T15:36:00Z")

</div>

I think “data transfer” is implied by “sync protocol”, and the fact that there’s nothing else to choose in there. 🙂

Yes, 0.0.0.0:22000 is the same as :22000.

---

<div class="post-metadata">

### Author: ![jedie](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jedie](https://forum.syncthing.net/u/jedie)
#### Post date: [May 14, 2014, 3:41pm UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/13 "2014-05-14T15:41:00Z")

</div>

> [@calmh](#):
>
> Yes, 0.0.0.0:22000 is the same as :22000

Then i would prefer to insert “0.0.0.0:22000” instead of “:22000” because it’s IMHO more common, isn’t it?

EDIT: i created [https://github.com/calmh/syncthing/pull/216](https://github.com/calmh/syncthing/pull/216) (Sorry for two commits, i can just now only use github online)

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [May 14, 2014, 3:54pm UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/14 "2014-05-14T15:54:01Z")

</div>

(Pull request accepted)

I hadn’t really reflected on `:22000` being an unusual syntax, Go damage I guess. The change is fine by me.

Btw. I love how your pull requests come through with the branch name “Jedi Master”… 😉

---

<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: [May 12, 2017, 12:56pm UTC](https://forum.syncthing.net/t/solved-changing-listening-port/69/16 "2017-05-12T12:56:15Z")

</div>


