# Separate/multiple API/GUI ports and authentication

**URL:** https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800
**Category:** Feature
**Created:** [September 30, 2015, 3:05pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800 "2015-09-30T15:05:28Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Eddy2909](https://forum.syncthing.net/user_avatar/forum.syncthing.net/eddy2909/32/2011_2.png) [@Eddy2909](https://forum.syncthing.net/u/Eddy2909)
#### Post date: [September 30, 2015, 9:59am UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/1 "2015-09-30T09:59:35Z")

</div>

one request: for those devices behind a router at home it would be nice to change the rest api port to a “only rest api port”. at the moment the api uses the port on which the gui is also available right? I would not like to forward the the GUI port and set a password on my devices in my private network only to make the api available for the “outside”…

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [September 30, 2015, 12:06pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/2 "2015-09-30T12:06:20Z")

</div>

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/14):
>
> one request: for those devices behind a router at home it would be nice to change the rest api port to a “only rest api port”. at the moment the api uses the port on which the gui is also available right?

Why? Everything you can do with the GUI, you can do with the REST API (and vice versa). Why restrict one, but not the other?

---

<div class="post-metadata">

### Author: ![Eddy2909](https://forum.syncthing.net/user_avatar/forum.syncthing.net/eddy2909/32/2011_2.png) [@Eddy2909](https://forum.syncthing.net/u/Eddy2909)
#### Post date: [September 30, 2015, 12:20pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/3 "2015-09-30T12:20:41Z")

</div>

because for the api I need a key for accessing it. but I don’t want to add a password for the gui in my private home-net (which I will need to setup if I forward the port) 😄

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [September 30, 2015, 12:23pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/4 "2015-09-30T12:23:24Z")

</div>

No, you do not need an API key to access the REST API if you don’t have a password on the GUI.

---

<div class="post-metadata">

### Author: ![Eddy2909](https://forum.syncthing.net/user_avatar/forum.syncthing.net/eddy2909/32/2011_2.png) [@Eddy2909](https://forum.syncthing.net/u/Eddy2909)
#### Post date: [September 30, 2015, 12:23pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/5 "2015-09-30T12:23:50Z")

</div>

😕 wot?

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [September 30, 2015, 12:25pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/6 "2015-09-30T12:25:35Z")

</div>

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/18):
>
> No, you do not need an API key to access the REST API if you don’t have a password on the GUI.

Was it clearer the second time? 😉

---

<div class="post-metadata">

### Author: ![Eddy2909](https://forum.syncthing.net/user_avatar/forum.syncthing.net/eddy2909/32/2011_2.png) [@Eddy2909](https://forum.syncthing.net/u/Eddy2909)
#### Post date: [September 30, 2015, 12:34pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/7 "2015-09-30T12:34:04Z")

</div>

yes 😂

but I don’t get the point why. my case: I don’t want to enter user&pw everytime I’ll have a look on syncthing and making my ui public. I just need to use the api (secured by a key)

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [September 30, 2015, 12:38pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/8 "2015-09-30T12:38:58Z")

</div>

You could always run Syncthing through a proxy layer, e.g. sit it behind nginx. Then do evil stuff like get nginx to specify the username+password when it forwards connections…

---

<div class="post-metadata">

### Author: ![Eddy2909](https://forum.syncthing.net/user_avatar/forum.syncthing.net/eddy2909/32/2011_2.png) [@Eddy2909](https://forum.syncthing.net/u/Eddy2909)
#### Post date: [September 30, 2015, 12:58pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/9 "2015-09-30T12:58:40Z")

</div>

if I was a technical minded maybe… but what about emily b. from a.?

imho the api and the gui are completely different features for completely different usecases. (see above) I’d like to build up a online-syncthing management Platform which I could run 24/7 on a server. for that purpose I ONLY need the api and not the Gui…

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [September 30, 2015, 1:03pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/10 "2015-09-30T13:03:17Z")

</div>

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/23):
>
> emily b. from a.

Whoevever she is, she probably isn’t writing a client which uses the REST API, so it isn’t an issue for her 😉.

The GUI and REST API do the same thing. They are covered by the same authentication mechanisms.

Besides, you should really be using SyncTrayzor, which handles the GUI authentication without you having to input anything.

---

<div class="post-metadata">

### Author: ![Eddy2909](https://forum.syncthing.net/user_avatar/forum.syncthing.net/eddy2909/32/2011_2.png) [@Eddy2909](https://forum.syncthing.net/u/Eddy2909)
#### Post date: [September 30, 2015, 1:14pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/11 "2015-09-30T13:14:10Z")

</div>

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/24):
>
> Whoevever she is, she probably isn’t writing a client which uses the REST API, so it isn’t an issue for her

but she is able to run syncthing on her home devices…

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/24):
>
> The GUI and REST API do the same thing. They are covered by the same authentication mechanisms.

yes sure but why “opening” the Gui if I only need the api and vice versa?

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/24):
>
> Besides, you should really be using SyncTrayzor, which handles the GUI authentication without you having to input anything.

also remote devices?

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [September 30, 2015, 1:18pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/12 "2015-09-30T13:18:13Z")

</div>

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/25):
>
> but she is able to run syncthing on her home devices…

…and Syncthing will listen on 127.0.0.1, and no-one else will be able to connect to it. Therefore she won’t need a password. Therefore everything is fine.

It is **ONLY** when you want to connect to Syncthing from **another** machine that you need to mess around with passwords, and ‘emily b. from a.’ won’t be doing this, so this entire discussion is completely irrelevant for her.

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/25):
>
> yes sure but why “opening” the Gui if I only need the api and vice versa?

That’s not English, and I don’t understand it.

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/25):
>
> also remote devices?

You misunderstand. With SyncTrayor you can set a GUI password, and you’ll never have to type it into anywhere.

---

<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: [September 30, 2015, 1:23pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/13 "2015-09-30T13:23:08Z")

</div>

I’m not really following the stuff above, but the GUI is only a thin layer on top of the API. Basically the GUI is just the API + some static files. If you don’t load those static files, there’s no cost to the GUI. So disabling the GUI and keeping the API doesn’t make much sense to me.

---

<div class="post-metadata">

### Author: ![Eddy2909](https://forum.syncthing.net/user_avatar/forum.syncthing.net/eddy2909/32/2011_2.png) [@Eddy2909](https://forum.syncthing.net/u/Eddy2909)
#### Post date: [September 30, 2015, 1:25pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/14 "2015-09-30T13:25:19Z")

</div>

ok… maybe you misunderstood… my plan is to build up a little platform to manage all my (not emilys) devices remote from one place. for that purpose I need the api - and only the api. I would not like to setup a GUI password only to use the api for remote access via forwarded port…

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [September 30, 2015, 1:25pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/15 "2015-09-30T13:25:45Z")

</div>

He wants:

- The GUI to be only accessible to localhost, no password
- The REST API to be accessible from anywhere, and require an API key

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [September 30, 2015, 1:26pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/16 "2015-09-30T13:26:10Z")

</div>

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/28):
>
> ok… maybe you misunderstood… my plan is to build up a little platform to manage all my (not emilys) devices remote from one place. for that purpose I need the api - and only the api. I would not like to setup a GUI password only to use the api for remote access via forwarded port…

I understand all of that. Now please read what I said.

---

<div class="post-metadata">

### Author: ![Eddy2909](https://forum.syncthing.net/user_avatar/forum.syncthing.net/eddy2909/32/2011_2.png) [@Eddy2909](https://forum.syncthing.net/u/Eddy2909)
#### Post date: [September 30, 2015, 1:30pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/17 "2015-09-30T13:30:53Z")

</div>

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/30):
>
> I understand all of that. Now please read what I said.

I did - and it doesn’t makes it better 😥I think you did not get my intents 😞

my idea is to use my local GUI without setting up a pw, syntrayzor or any other stuff. I’m fine with it like it is! why installing nginx, synctrayzor or other stuff?

I just thought of forwaring a port up to use the api 😖

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [September 30, 2015, 1:32pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/18 "2015-09-30T13:32:55Z")

</div>

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/31):
>
> I’m fine with it like it is! why installing nginx, synctrayzor or other stuff?

Well it obviously isn’t fine the way it is, otherwise you wouldn’t be asking for things 😉

---

<div class="post-metadata">

### Author: ![Eddy2909](https://forum.syncthing.net/user_avatar/forum.syncthing.net/eddy2909/32/2011_2.png) [@Eddy2909](https://forum.syncthing.net/u/Eddy2909)
#### Post date: [September 30, 2015, 1:35pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/19 "2015-09-30T13:35:01Z")

</div>

harhar… 😋

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [September 30, 2015, 1:37pm UTC](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800/20 "2015-09-30T13:37:32Z")

</div>

> [@Syncthing Management Platform](https://forum.syncthing.net/t/syncthing-management-platform/5792/33):
>
> harhar… 😋

I’m serious though. You’ve got a problem. I’m suggesting solutions. Then you come back with “I’m fine like it is! I don’t need solutions”.

If you’ve got a problem, why don’t you need a solution to it?

[Next page](https://forum.syncthing.net/t/separate-multiple-api-gui-ports-and-authentication/5800.md?page=2)
