by Michael Naumov
Give a note or an attachment a permanent key on request, and open it through a link that keeps working wherever the file moves.
Permanent Links
A path is an address, not an identity. When a note moves, is renamed or grows into a folder, Obsidian updates every link inside the vault, but it cannot update the links that live outside it: obsidian://open?file=... links in bookmarks, messages, emails, task trackers and other vaults. Each of those breaks the first time the file moves.
Permanent Links gives a note or an attachment a permanent key, only when you ask for one, and copies a link that carries the key. The link keeps opening the file wherever it has moved since, and says so plainly when the file was deleted. A note carries its keys in a frontmatter property, readable by any tool, so nothing about the key is hidden in the plugin.
Ids that survive a move are a long-standing request: people in the Obsidian community have asked for them since at least 2021.
Demo vault
The documentation is an interactive demo vault. Every feature has a note that explains what it does and why you would want it, with a button that copies, opens, moves or deletes a supplied file so you can watch the link keep working.
Start reading here — it is plain markdown, so it works on GitHub with nothing installed.
A copy of the vault ships with every release. You can access it via any of the following:
- Running the
Permanent Links: Open demo vault command. - Downloading
permanent-links-demo-vault.zipfrom the Releases. It unzips into a singlepermanent-links-demo-vault-<version>folder. - Browsing its source in
demo-vault/in this repository.
What it does
- Copy permanent link gives the active file a generated key if it has none (12 letters and digits, or a GUID without hyphens if you prefer that shape) and copies
obsidian://permanent-links?vault=<vault>&key=<key>. The link opens the file wherever it is, at a heading or a block if you add one: see Permanent links. - Copy permanent link on several files selected in the File explorer keys each file that has none and copies one Markdown list, a
- [name](link)line per file in selection order: see Permanent links. - Copy permanent link to heading or block, in the Command Palette and the editor menu, copies a link that opens at the heading or block under the cursor, giving the block an id when it has none: see Permanent links.
- Key every file in folder, in a folder's File explorer menu and the Command Palette, gives a generated key to every file without one in that folder and the folders inside it, after asking: see Permanent links.
- Every file keyed automatically, opt-in: turn on Key every file automatically and every file without a key gets one, when you turn it on, each time the vault loads, and as each new file is created: see Settings.
- Set key adds a readable key in any script, such as
plan-2026, as an alias that keeps older links working; Remove key asks before removing one: see Permanent links. - Attachments get keys too, kept in the plugin's readable
keys.jsonbecause an attachment has no frontmatter: see Permanent links. - Moves, renames and deletions are followed: a moved file's link opens it at its new path, a deleted file's link says when it was deleted and where it last was, and a restored file gets its keys back: see Moved and deleted files.
- Conflicts are repaired safely: a copied note loses the duplicate key, a key edited by hand opens a dialog whose default keeps old links working, and a core
Note Composermerge offers to move the merged note's keys: see Key conflicts and manual edits. - Keys as Obsidian aliases, opt-in: turn on Mirror keys into aliases and every note key is also listed in
aliases, so the Quick Switcher and link suggestions find a note by its key, without touching the aliases you wrote: see Settings. - Moving to another vault: tell the old vault where a file went, and its old links forward there: see Moving between vaults.
- Clickable https links, opt-in: set Redirector base URL to a redirector you host, and Copy permanent link copies
<base>?vault=<vault>&key=<key>, which chat apps and email clients keep clickable where they stripobsidian://links: see Redirector.
Every setting is listed by its data.json key in Settings.
Redirector
Redirector base URL is empty by default, and the plugin never sends links through anyone else's domain: a permanent link that depends on a service you do not control is only as permanent as that service. To use it, host a redirector that answers every request with a redirect to obsidian://permanent-links, carrying the whole query string it received, so vault, key, heading, block and openmode all survive. For example, a Cloudflare Workers script:
export default {
fetch(request) {
const { search } = new URL(request.url);
return new Response(null, { headers: { Location: `obsidian://permanent-links${search}` }, status: 302 });
}
};
Then set Redirector base URL to its address, such as https://links.example.com/open. The base must be an http or https address without a #; when it is not, Copy permanent link copies the obsidian:// link and says why. A base that already has a query gets the link's parameters appended with &. Keep the redirector at the same address for as long as the links you shared should work.
The idea and the shape of the setting come from Vault Permalink Kit (MIT, Copyright (c) 2024 Convex Works).
See also
| Plugin | Features | How Permanent Links differs |
|---|---|---|
Abbrlink | writes a short hash into an abbrlink frontmatter field for static-site permalinks; for every file in a batch or for each new file; configurable hash length | Covers part of it: writes ids, but opens nothing by them; keys a file only when asked; keys attachments too |
Add an ID to the front matter | adds a globally unique id to the frontmatter of every note | Covers part of it: writes ids, but opens nothing by them; keys a file only when asked; keys attachments too |
Advanced URI | obsidian://adv-uri links for many actions; opens a note by a frontmatter id field; can generate the id | Same goal for links to notes: adds attachments; an index instead of a scan; duplicate repair; a record of deleted files; a warning when a key is edited by hand; forwarding to another vault |
Copy Link | commands to copy wikilinks, embeds and footnotes to a file, heading or block; copies an obsidian://open URL to a block | Covers part of it: its block URL names the file by its path, so it breaks when the file moves; this plugin's link names a key |
Microsoft-Compatible Link | copies or opens an https://obsid.net link that redirects to obsidian://open, so it stays clickable where custom URI schemes are stripped | Different approach: its link names the file by its path, so it breaks when the file moves; this plugin's link names a key; no https wrapper |
Note UID Generator | generates UUID, NanoID, ULID or Snowflake ids into frontmatter, automatically or by command; duplicate detection; copies a note's id, or titles and ids of several notes | Covers part of it: writes and copies ids, but opens nothing by them; keys attachments too |
Notes UID | obsidian://open-by-uid opens a note by an id frontmatter field; unlisted, last changed in 2021 | Same goal for links to notes: adds key generation; attachments; an index instead of a scan; deleted-file records; duplicate repair |
Vault Permalink Kit | copies an obsidian://open-document link with a UUID stored in a permalink frontmatter field; opens it by scanning the vault; optional https redirector base URL; unlisted | Same goal for links to notes: adds attachments; an index instead of a scan; several keys per file; deleted-file records; duplicate repair; no https redirector |
Last searched for similar plugins on 2026-11-21.
For plugin developers
This plugin publishes an API, declared in api.d.ts, for plugins that want to read a file's keys, resolve a key to a file, assign or add a key, or move keys from one file to another when they merge notes.
import { watchPluginApi } from '@mnaoumov/obsidian-lib/plugin/plugin-api';
import type { PermanentLinksApi } from './api.d.ts';
const apiRef = watchPluginApi<PermanentLinksApi>({
apiVersionRange: '^1.1.0',
app: this.app,
component: this,
pluginId: 'permanent-links'
});
// `value` is always current: `null` while this plugin is not loaded, and non-`null` on its own once it is.
const api = apiRef.value;
if (api) {
console.log(api.getKeys(file)); // ['project-plan', 'plan-2026']
}
The handle comes from the @mnaoumov/obsidian-lib plugin registry; Cross-plugin APIs covers watchPluginApi and the registry from the library's side. The contract version is 1.1.0, and it moves independently of the plugin's own version, so ask for a range.
If you would rather not depend on @mnaoumov/obsidian-lib for the handle, the registry is a documented wire protocol you can read directly — see Plugin API protocol.
Installation
The plugin is available in the official Community Plugins repository.
Beta versions
To install the latest beta release of this plugin (regardless if it is available in the official Community Plugins repository or not), follow these steps:
- Ensure you have the BRAT plugin installed and enabled.
- Click Install via BRAT.
- An Obsidian pop-up window should appear. In the window, click the
Add pluginbutton once and wait a few seconds for the plugin to install.
Debugging
By default, debug messages for this plugin (id: permanent-links) are hidden.
If you need to enable them refer to the documentation.
Changelog
All notable changes to this project will be documented in the CHANGELOG.
Contributing
Contributions are welcome — see CONTRIBUTING to get set up.
Support
Filing an issue (for AI agents and humans)
Open issues through the issue forms, not as blank issues.
To report a bug from inside Obsidian, run the Permanent Links: Report a bug command. It opens the bug form with the plugin version, the Obsidian version and your operating system already filled in.
Filing from the CLI or the API (gh issue create --body, or an AI agent filing for you) skips the form, and gh issue create --template cannot load an issue form. In that case, open the matching form in .github/ISSUE_TEMPLATE/, copy every field as a ### <label> heading in the form's order, and fill in each one. Always state the plugin version, the Obsidian version and your operating system.
License
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.










