Skip to content

IvanShishkin/obsidian-pub-plugin

Repository files navigation

Obsidian Pub Logo

Obsidian Web Publishing Plugin

Publish your markdown files to the web with a single click. This plugin allows you to share your Obsidian notes via public URLs with optional password protection. Host notes on your own server and access them through your custom domain — complete control over your data with no third-party dependencies.

Host on your own server, share from your own domain — keep full control over your published content without relying on third-party services.

Live Demo

See how your published notes look in action:

👉 Example Publication: The Law of Large Numbers

Key Benefits

  • Full control over your data - Host and store your notes on your own server
  • Custom domain support - Share notes from your personal domain (e.g., notes.yourdomain.com)
  • Privacy-first - No third-party services, your content stays on your infrastructure
  • Self-hosted solution - Deploy your own publishing server in minutes

Features

  • One-click publishing - Publish any markdown file instantly
  • Password protection - Optionally protect publications with a password
  • Publication history - Track all your published files
  • Auto-copy links - Automatically copy URLs to clipboard
  • Multiple access points - Publish from ribbon, file menu, editor menu, or command palette
  • Update existing - Update previously published files while keeping the same URL

Server Setup

To use this plugin, you need to deploy your own publishing server. This gives you complete control over where your notes are stored and how they're accessed.

Deploy Your Own Server

👉 obsidian-pub-server - Self-hosted server for publishing Obsidian notes

The server project provides:

  • Ready-to-deploy server application
  • Docker support for easy deployment
  • Custom domain configuration
  • Full API documentation
  • Security best practices

Follow the instructions in the server repository to:

  1. Deploy the server on your infrastructure (VPS, home server, cloud)
  2. Configure your custom domain
  3. Set up SSL/HTTPS for secure connections
  4. Get your API URL and secret key for plugin configuration

Installation

Quick Install (Recommended)

  1. ⬇️ Download Latest Release
  2. Extract the archive
  3. Copy the obsidian-pub-plugin folder to <your-vault>/.obsidian/plugins/
  4. Reload Obsidian
  5. Enable the plugin in Settings → Community plugins

Building from Source

# Clone or download this repository
cd obsidian-pub-plugin

# Install dependencies
npm install

# Build the plugin
npm run build

This will create main.js in the root directory. Copy main.js, manifest.json, and styles.css to your vault's plugin folder.

Configuration

  1. Go to Settings → Web Publish
  2. Enter your API URL (your publishing server endpoint, e.g., https://notes.yourdomain.com/api)
  3. Enter your Secret Key (authentication token from your server)
  4. Optionally set a default password
  5. Configure behavior preferences

Settings

  • API URL - The URL of your publishing server API
  • Secret Key - Authentication key for your server
  • Default Password - Pre-fill password field with this value
  • Auto-copy link - Automatically copy published URL to clipboard
  • Show in file menu - Add publish option to file context menu
  • Show in ribbon - Show publish button in left sidebar

Usage

Publishing a File

  1. Open any markdown file

  2. Use one of these methods:

    • Click the share icon in the ribbon
    • Right-click the file → "Publish to web"
    • Use the command palette: "Publish current file to web"
    • Right-click in editor → "Publish to web"
  3. Optionally set a password

  4. Click "Publish"

  5. Copy or open the generated link (will use your custom domain)

Updating a Publication

When publishing a file that's already been published:

  • Update - Replace content while keeping the same URL
  • Create New - Generate a new publication with a new URL

Viewing History

  • Go to Settings → Web Publish → "Open History"
  • Or use command: "View publication history"

From history, you can:

  • Copy links
  • Open in browser
  • Navigate to source file
  • Remove entries
  • Search publications

Commands

  • Publish current file to web - Publish the active markdown file
  • View publication history - Open the history modal
  • Copy last published link - Copy the most recent publication URL

API Requirements

Your server needs to implement these endpoints (see obsidian-pub-server for reference implementation):

GET /health

Health check endpoint

GET /check/:filename

Check if file exists

POST /publish

Create new publication

PUT /update/:hash

Update existing publication

DELETE /delete/:hash

Delete publication (optional)

Security

  • Secret keys are stored locally in your vault
  • Passwords are not logged
  • HTTPS is recommended for production use
  • All requests include authorization headers
  • Your data never leaves your server

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

Support

For issues and feature requests:

License

MIT License


Enjoy publishing your notes with full control over your data! ❤️

About

Self-hosted alternative to Obsidian Publish. Share your notes via public URLs with password protection. Host on your own server, use your custom domain

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors