Skip to content

[BUG] HTTP/HTTPS gui address configuration #93

@summerroman

Description

@summerroman

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I am currently using the docker image lscr.io/linuxserver/syncthing:latest from 05.07.2025, which actually points to version v1.30.0-ls186 which also means version v1.30.0 of syncthing. I installed the container on my qnap nas in container station in a qnap specific brigde mode which allows the container to run in the current subnet of the nas with its own static IPv4 address.

So I wanted to change the default http/https gui listening port from 8384 to the standard https port 443. Configuring the port by setting the gui address in the /config/config.xml or via the official environment variable STGUIADDRESS to 0.0.0.0:443 failed.

The reason for this behavior is the start command for syncthing inside of the container. It is defined in the startup script file /etc/s6-overlay/s6-rc.d/svc-syncthing/run:

#!/usr/bin/with-contenv bash
# shellcheck shell=bash

exec \
    s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8384" \
        s6-setuidgid abc syncthing \
        -home=/config -no-browser -no-restart \
        --gui-address="0.0.0.0:8384"

Here you see that the command line argument --gui-address="0.0.0.0:8384" hardcodes the gui address of syncthing. Because of this a manual configuration in the config.xml or via the STGUIADDRESS environment variable have no effect.

So my workaround was to delete the line --gui-address="0.0.0.0:8384" in the startup script.

Expected Behavior

Change the startup script /etc/s6-overlay/s6-rc.d/svc-syncthing/run so that the gui address can be configured in the config.xml configuration file or via the STGUIADDRESS environment variable. The deletion of the --gui-address="0.0.0.0:8384" startup argument will solve this. Beside this, I do not know if the hardcoded definition of the gui address was intended for some reason. In my case I need this feature, because I cannot map the port like in other docker configurations and I don't want to hide the server behind a reverse proxy.

Steps To Reproduce

  1. create the container inside the container station of a QNAP NAS
  2. define the bride mode under networking and assign a static IPv4 address in the current subnet
  3. add the STGUIADDRESS environment variable and set it to 0.0.0.0:443
  4. start the container and check the gui listening port

Environment

QNAP QTS 5.2.5.3145
Container Station Version 3.0.9.1038 (2024/11/08)

CPU architecture

x86-64

Docker creation

{
AppArmorProfile:"docker-default"
Args:[]
Config:{
AttachStderr:false
AttachStdin:false
AttachStdout:false
Domainname:""
Entrypoint:[
"/init"
]
Env:[
"PUID=1008"
"S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0"
"S6_STAGE2_HOOK=/docker-mods"
"TZ=Europe/Berlin"
"HOME=/config"
"LSIO_FIRST_PARTY=true"
"PATH=/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
"PGID=1002"
"VIRTUAL_ENV=/lsiopy"
"GUI_PORT=443"
"PS1=$(whoami)@$(hostname):$(pwd)\$ "
"S6_VERBOSITY=1"
"TERM=xterm"
]
ExposedPorts:{
21027/udp:{}
22000/tcp:{}
22000/udp:{}
8384/tcp:{}
}
Hostname:"sync"
Image:"lscr.io/linuxserver/syncthing:latest"
Labels:{
build_version:"Linuxserver.io version:- v1.30.0-ls186 Build-date:- 2025-07-05T02:25:14+00:00"
maintainer:"thelamer"
org.opencontainers.image.authors:"linuxserver.io"
org.opencontainers.image.created:"2025-07-05T02:25:14+00:00"
org.opencontainers.image.description:"[Syncthing](https://syncthing.net) replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet."
org.opencontainers.image.documentation:"https://docs.linuxserver.io/images/docker-syncthing"
org.opencontainers.image.licenses:"GPL-3.0-only"
org.opencontainers.image.ref.name:"aa7357236935a19d9f0ce10077e4c703a2f23130"
org.opencontainers.image.revision:"aa7357236935a19d9f0ce10077e4c703a2f23130"
org.opencontainers.image.source:"https://github.com/linuxserver/docker-syncthing"
org.opencontainers.image.title:"Syncthing"
org.opencontainers.image.url:"https://github.com/linuxserver/docker-syncthing/packages"
org.opencontainers.image.vendor:"linuxserver.io"
org.opencontainers.image.version:"v1.30.0-ls186"
}
OpenStdin:true
StdinOnce:false
Tty:true
User:""
Volumes:{
/config:{}
}
WorkingDir:"/"
}
Created:"2025-07-06T12:39:23.375782152Z"
Driver:"overlay2"
ExecIDs:[
"e86066c9ecdc74d970d2674956e8463ed1a20ccbced22d2b1ba73ac052a5673f"
]
GraphDriver:{
Data:{
LowerDir:"/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/2441de4d62f2c46e77e1172cf47c8c090d6c5cb57754239f25fbb12050026264-init/diff:/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/349efd77069f90abe9ab5d10236d03893f7d33737dc7ddec91afca073986d1ce/diff:/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/2e00716df8fe9deb3c11fad9d2e7e8950598bed4bf5b5e2e76e6fc6597b133c6/diff:/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/44ea6bb462b86d559ebdb3838e4386ad4950a912a90fc41b15d09bd45a7ca29b/diff:/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/7869396124ebd8ba91f73209814c6b28022a8277f4ba6ae58c746249b64230e1/diff:/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/0195c433dbd63a6461ab7d9e200941c1ead17a15da90aeb8b4401c4dc70b8f90/diff:/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/b628f1b1bcd5dc8befd8cebd12718357cdaf9f88a77359452f236917e6089b6f/diff:/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/acf14053d942e7fe83ed41b9ce7bb0f92c20f1ba49e0feeb7901ec076d8aedff/diff:/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/9ef292e125515d6001e5f4a7c936c855b0327ef95935dc554803b92ddd7bc00d/diff:/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/99137a190e789da976ccb15f4062d42e57432050394ae4fd4dc5b67a2d76bea9/diff:/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/8c9ec8b83849f1890a50a1e0e23f17c6331ff1535ae9c8f115ab3dbc0da78afa/diff"
MergedDir:"/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/2441de4d62f2c46e77e1172cf47c8c090d6c5cb57754239f25fbb12050026264/merged"
UpperDir:"/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/2441de4d62f2c46e77e1172cf47c8c090d6c5cb57754239f25fbb12050026264/diff"
WorkDir:"/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/overlay2/2441de4d62f2c46e77e1172cf47c8c090d6c5cb57754239f25fbb12050026264/work"
}
Name:"overlay2"
}
HostConfig:{
AutoRemove:false
Binds:[
"/share/sync-user-1:/sync/user-1"
"/share/sync-user-2:/sync/user-2"
"/share/sync-user-3:/sync/user-3"
"/share/sync-user-4:/sync/user-4"
"/share/sync-user-5:/sync/user-5"
"/share/sync:/config"
]
BlkioWeight:0
Cgroup:""
CgroupParent:""
CgroupnsMode:"host"
ConsoleSize:[
0
0
]
ContainerIDFile:""
CpuCount:0
CpuPercent:0
CpuPeriod:0
CpuQuota:0
CpuRealtimePeriod:0
CpuRealtimeRuntime:0
CpuShares:0
CpusetCpus:""
CpusetMems:""
DeviceCgroupRules:[]
Dns:[
"192.168.0.1"
"8.8.8.8"
]
IOMaximumBandwidth:0
IOMaximumIOps:0
Init:false
IpcMode:"private"
Isolation:""
LogConfig:{
Config:{
max-file:"10"
max-size:"10m"
}
Type:"json-file"
}
MaskedPaths:[
"/proc/asound"
"/proc/acpi"
"/proc/kcore"
"/proc/keys"
"/proc/latency_stats"
"/proc/timer_list"
"/proc/timer_stats"
"/proc/sched_debug"
"/proc/scsi"
"/sys/firmware"
"/sys/devices/virtual/powercap"
]
Memory:1073741824
MemoryReservation:536870912
MemorySwap:2147483648
NanoCpus:1000000000
NetworkMode:"qnet-static-bond0-76e39f"
OomKillDisable:false
OomScoreAdj:0
PidMode:""
PortBindings:{}
Privileged:false
PublishAllPorts:false
ReadonlyPaths:[
"/proc/bus"
"/proc/fs"
"/proc/irq"
"/proc/sys"
"/proc/sysrq-trigger"
]
ReadonlyRootfs:false
RestartPolicy:{
MaximumRetryCount:0
Name:"no"
}
Runtime:"runc"
ShmSize:67108864
UTSMode:""
Ulimits:[
{}
]
UsernsMode:""
VolumeDriver:""
VolumesFrom:[]
}
HostnamePath:"/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/containers/77a97e49202bcbd686730100061a06036053d3495b797b8ec1321f6a81ac49b6/hostname"
HostsPath:"/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/containers/77a97e49202bcbd686730100061a06036053d3495b797b8ec1321f6a81ac49b6/hosts"
Id:"77a97e49202bcbd686730100061a06036053d3495b797b8ec1321f6a81ac49b6"
Image:"sha256:7c37a3effa0a718372f75aa5606faf3dc3cff470ac6614ff8564214fc3efddd7"
LogPath:"/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/containers/77a97e49202bcbd686730100061a06036053d3495b797b8ec1321f6a81ac49b6/77a97e49202bcbd686730100061a06036053d3495b797b8ec1321f6a81ac49b6-json.log"
MountLabel:""
Mounts:[
{
Destination:"/sync/user-1"
Mode:""
Propagation:"rprivate"
RW:true
Source:"/share/sync-user-1"
Type:"bind"
}
{
Destination:"/sync/user-2"
Mode:""
Propagation:"rprivate"
RW:true
Source:"/share/sync-user-2"
Type:"bind"
}
{
Destination:"/sync/user-3"
Mode:""
Propagation:"rprivate"
RW:true
Source:"/share/sync-user-3"
Type:"bind"
}
{
Destination:"/sync/user-4"
Mode:""
Propagation:"rprivate"
RW:true
Source:"/share/sync-user-4"
Type:"bind"
}
{
Destination:"/sync/user-5"
Mode:""
Propagation:"rprivate"
RW:true
Source:"/share/sync-user-5"
Type:"bind"
}
{
Destination:"/config"
Mode:""
Propagation:"rprivate"
RW:true
Source:"/share/sync"
Type:"bind"
}
]
Name:"/sync"
NetworkSettings:{
Bridge:""
EndpointID:""
Gateway:""
GlobalIPv6Address:""
GlobalIPv6PrefixLen:0
HairpinMode:false
IPAddress:""
IPPrefixLen:0
IPv6Gateway:""
LinkLocalIPv6Address:""
LinkLocalIPv6PrefixLen:0
MacAddress:""
Networks:{
qnet-static-bond0-76e39f:{
Aliases:[
"77a97e49202b"
"sync"
]
DNSNames:[
"sync"
"77a97e49202b"
]
EndpointID:"3a298947da973509071ab4edcc6a686846778350e638601e35d1a8456875611b"
Gateway:"192.168.0.1"
GlobalIPv6Address:""
GlobalIPv6PrefixLen:0
IPAMConfig:{
IPv4Address:"192.168.0.22"
}
IPAddress:"192.168.0.22"
IPPrefixLen:24
IPv6Gateway:""
MacAddress:"02:42:fd:a6:2d:42"
NetworkID:"6165491d6e1757d11f678330a709feabd75f427b29829e21237acca28373bcd6"
}
}
Ports:{}
SandboxID:"08492daa7b27a7a7220d15c8ee185232850f556cef0ca5e8b94df72a744e1f48"
SandboxKey:"/var/run/docker/netns/08492daa7b27"
}
Path:"/init"
Platform:"linux"
ProcessLabel:""
ResolvConfPath:"/share/CACHEDEV1_DATA/container/container-station-data/lib/docker/containers/77a97e49202bcbd686730100061a06036053d3495b797b8ec1321f6a81ac49b6/resolv.conf"
RestartCount:0
State:{
Dead:false
Error:""
ExitCode:0
FinishedAt:"2025-07-06T13:13:22.383729997Z"
OOMKilled:false
Paused:false
Pid:15535
Restarting:false
Running:true
StartedAt:"2025-07-06T13:14:51.523588224Z"
Status:"running"
}
}

Container logs

[LZTX7] 2025/07/06 09:03:13.156138 api.go:412: INFO: GUI and API listening on [::]:8384
[LZTX7] 2025/07/06 09:03:13.156396 api.go:413: INFO: Access the GUI via the following URL: http://127.0.0.1:8384/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions