文件
mynode/readme/dev/spec/multiple_instances.md
chen 301194963b
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
feat: Initial clean release of CHM
2026-11-04 11:29:39 +08:00

27 行
1.3 KiB
Markdown

# Multiple instance support
Joplin Desktop supports multiple instances through **profile locking** and **IPC messaging**.
### Profile Locking
- A lock file is updated every `x` seconds by each instance.
- If a valid lock exists, the new instance sends a message to all running instances and closes. This message prompts the other active instance to move to the front.
### IPC Messaging
- IPC is implemented using lightweight HTTP servers in each instance, communicating via `POST` requests.
- When a message is sent, the implementation automatically discovers running IPC servers.
- Messages are secured using a secret that is shared by all applications. That secret is read from the profile directory of the main instance. It is created by the server if it doesn't exist. This ensures that, for example, a browser cannot send a valid message to the apps.
### Instance Differentiation
- The `--alt-instance-id` flag must be used to launch an alternative instance. This disables services like the Web Clipper.
- The `altInstanceId` setting is consulted by the application to determine its type (main or alternative instance).
### Current Limitations
The system is designed to handle multiple instances but currently supports only two through the UI: a **main instance** and an **alternative instance**.