Skip to content

fix: derive TLS path from wiki dir for service compatibility#32

Merged
aniongithub merged 1 commit into
mainfrom
fix/tls-service-path
May 12, 2026
Merged

fix: derive TLS path from wiki dir for service compatibility#32
aniongithub merged 1 commit into
mainfrom
fix/tls-service-path

Conversation

@aniongithub
Copy link
Copy Markdown
Owner

On Windows, the service runs as SYSTEM, so os.UserHomeDir() returns C:\Windows\system32\config\systemprofile instead of C:\Users\<name>. The server couldn't find the certs generated by the user and fell back to plain HTTP on port 443, causing ERR_SSL_PROTOCOL_ERROR.

Fix: Derive the TLS directory as a sibling of the wiki directory (~/.mind-map/wiki~/.mind-map/tls). The wiki dir is always passed correctly via --dir, so it works regardless of which user the service runs as.

Also fixes the same issue on Linux when running via sudo.

When running as a Windows service (SYSTEM account) or via sudo,
os.UserHomeDir() returns the wrong home directory. The server
couldn't find the certs generated by the user.

Fix: derive TLS dir as a sibling of the wiki dir (e.g.
~/.mind-map/wiki -> ~/.mind-map/tls). The wiki dir is always
passed correctly via --dir.
@aniongithub aniongithub merged commit 898bbf8 into main May 12, 2026
1 check passed
@aniongithub aniongithub deleted the fix/tls-service-path branch May 12, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant