Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 桌面端内核进程使用随机端口 https://github.com/siyuan-note/siyuan/issues/4952

Liang Ding13602b8aedd9
diff --git a/kernel/util/working.go b/kernel/util/working.go
index 7fef00fd19..ee8f97437e 100644
--- a/kernel/util/working.go
+++ b/kernel/util/working.go
@@ -78,15 +78,15 @@ func Boot() {
Mode = *mode
Resident, _ = strconv.ParseBool(*resident)
ServerPort = *port
- if isRunningInDockerContainer() || "dev" == Mode {
- ServerPort = FixedPort
- }
ReadOnly, _ = strconv.ParseBool(*readOnly)
AccessAuthCode = *accessAuthCode
Container = ContainerStd
if isRunningInDockerContainer() {
Container = ContainerDocker
}
+ if ContainerStd != Container || "dev" == Mode {
+ ServerPort = FixedPort
+ }
msStoreFilePath := filepath.Join(WorkingDir, "ms-store")
ISMicrosoftStore = gulu.File.IsExist(msStoreFilePath)