Dasemu 49d9f7da84 Fase 1: require session auth on the db-worker-node HTTP/SSE server
Prepares the daemon to be reachable off loopback as part of the
server-client migration (see the approved implementation plan). Today it
trusts any caller that can reach the port; this makes every route except
health checks and login require a bearer session token.

- New frontend.worker.db-worker-node-auth: scrypt-hashed username/password
  credential persisted at <root-dir>/db-worker-auth.json (mode 0600),
  bootstrapped from LOGSEQ_DAEMON_USERNAME/PASSWORD on first launch since
  there's no interactive setup yet. In-memory bearer sessions with
  constant-time comparison, a failed-login lockout, and list/revoke by
  device. The daemon now refuses to start with no credential configured at
  all -- not just when binding beyond loopback -- since without one no
  token could ever be issued.
- db_worker_node.cljs: POST /v1/auth/login and GET/DELETE
  /v1/auth/sessions; every other route requires Authorization: Bearer
  except /healthz, which stays open (readiness polling happens before any
  session exists) but now omits :pid/:root-dir from its payload. Adds a
  Host-header allowlist ahead of auth to guard against DNS rebinding, and
  configurable --host/--port/--allowed-origin/--allowed-host in place of
  the hardcoded 127.0.0.1 bind and single CORS origin.
- EventSource can't send custom headers, so /v1/events accepts the bearer
  token as a query param instead; persist_db/remote.cljs's events-url
  carries it there now (interim until the Fase 4 WebSocket migration).
- Electron always sent :auth-token nil (verified by reading db_worker.cljs
  -- one of the plan's open questions). daemon/spawn-server! now seeds a
  per-root-dir local device credential
  (<root-dir>/db-worker-local-credential.json, reused across restarts) via
  LOGSEQ_DAEMON_USERNAME/PASSWORD, and cli/server.cljs logs in once the
  spawned or reused daemon is ready, threading the resulting token through
  ensure-server! to Electron's runtime config.

Not done: the OCaml CLI (cli/lib/transport.ml) also calls /v1/invoke
directly and will start receiving 401s once this ships -- confirmed with
the user to leave that gap for now rather than touch the OCaml toolchain
in this pass.

Verified with clojure -M:cljs compile app db-worker-node electron (0
warnings) and the full logseq.db-worker.daemon-test,
logseq.cli.server-test, frontend.worker.db-worker-node-test,
electron.db-worker-manager-test suites (113 tests, 480 assertions, 0
failures) plus frontend.state-test and frontend.persist-db.remote-test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 18:59:08 +02:00
2026-08-25 15:32:15 +02:00

Logseq

A privacy-first, open-source platform for knowledge management and collaboration



Download Logseq

forum chat on Discord follow on Twitter

latest release version

Table of Contents

🚀 Database Version

The Database version (DB version) of Logseq introduces DB graphs. See this page to get an overview of the main features for DB graphs. If you are an existing user, see changes with the DB version. The DB version has its own new mobile app (on iOS, with Android coming soon)! To participate in the mobile app alpha, please complete this brief form. The DB version also has a new sync approach, RTC (Real Time Collaboration)! You can use it to sync graphs between multiple devices or collaborate with others. To participate in the RTC alpha, please fill out this form.

The DB version is in beta status while the new mobile app and RTC is in alpha. This means that data loss is possible so we recommend automated backups or regular SQLite DB backups. We recommend you create a dedicated test graph and choose one project that’s not crucial for you.

To get started with the DB version:

  • To try the latest web version, go to https://app.logseq.com/.
  • To try the latest desktop version, go to https://github.com/logseq/logseq/releases/tag/nightly and download the artifact for your operating system.
  • To try the latest by building from the source code
    • Use test/db for stable releases. Fewer bugs and slower updates. Update frequency: days or weeks.
    • Use master for the latest updates as they are developed. Expect more bugs and faster changes. Update frequency: hours or days.
  • To report bugs, please file them at https://github.com/logseq/db-test/issues.
  • For feature or enhancement requests, please file them on Discord on the #db-feedback channel.
  • For discussions:
    • General ==> see the #db-chat channel in Discord.
    • Sync and RTC ==> see the #sync-test channel in Discord.
    • Mobile ==> see the #mobile-test channel in Discord.

🤔 Why Logseq?

Logseq is a knowledge management and collaboration platform. It focuses on privacy, longevity, and user control. Logseq offers a range of powerful tools for knowledge management, collaboration, PDF annotation, and task management with support for multiple file formats, including Markdown and Org-mode, and various features for organizing and structuring your notes.

In addition to its core features, Logseq has a growing ecosystem of plugins and themes that enable a wide range of workflows and customization options. Mobile apps are also available, providing access to most of the features of the desktop application. Whether you're a student, a professional, or anyone who values a clear and organized approach to managing your ideas and notes, Logseq is an excellent choice for anyone looking to improve their productivity and streamline their workflow.

logseq-demo

Download Logseq

👀 How can I use it?

To start using Logseq, follow these simple steps:

  1. Download the latest version of Logseq
  2. Install Logseq on your device and launch the application
  3. Start writing ✍️

That's it! You can now enjoy the benefits of using Logseq to streamline your workflow, manage your projects, and stay on top of your goals. Have fun! 🎉

Linux users: Use the automated installer script for the best experience:

# Download and run the installer
curl -fsSL https://raw.githubusercontent.com/logseq/logseq/master/scripts/install-linux.sh | bash

# Or install a specific version
curl -fsSL https://raw.githubusercontent.com/logseq/logseq/master/scripts/install-linux.sh | bash -s -- 0.10.14

# For user-specific installation (no root required)
curl -fsSL https://raw.githubusercontent.com/logseq/logseq/master/scripts/install-linux.sh | bash -s -- --user

📚 Learn more

🫶 Support Logseq Development

If you find Logseq useful and want to help us keep the project growing, please consider supporting our contributors on Open Collective. Your support shows our contributors that their efforts are appreciated and motivates them to continue their excellent work. Every contribution, no matter how small, helps us keep improving Logseq.

💡 Feature requests

We value your input on improving Logseq and making it more useful for you. If you have any ideas or feature requests, please share them in the Logseq Forum: Feature Requests section.

Your feedback helps us understand our users' needs and prioritize the features that matter most to you. We appreciate your time and effort in sharing your thoughts with us.

We appreciate your support, and we look forward to hearing your ideas!

🔌 Plugin API

Logseq provides a plugin API that enables developers to create custom plugins and extend the functionality of Logseq. The plugin API documentation is available at plugins-doc.logseq.com, where you can find everything needed to get started with plugin development.

We value your feedback and suggestions on how to improve our documentation. Please do not hesitate to contact us with any comments or questions. Your input helps us to provide a better experience for our users and developers.

Thank you for using Logseq, and we look forward to seeing what you create with our plugin API!

🌟 Contributing to Logseq

To start contributing to Logseq, please read CONTRIBUTING.md. There are ways to contribute with code and without code. We welcome all contributions, big or small, and we appreciate your time and effort in helping us improve Logseq. We look forward to your contributions 🚀

🛠️ Setting Up a Development Environment

If you want to set up a development environment for the Logseq web or desktop app, please refer to the Develop Logseq guide for macOS/Linux users and the Develop Logseq on Windows guide for Windows users.

In addition to these guides, you can also find other helpful resources in the docs/ folder, such as the Guide for Contributing to Translations, the Docker Web App Guide and the mobile development guide

🧰 Logseq CLI (Node)

Logseq CLI documentation is maintained in docs/cli/logseq-cli.md.

✨ Inspiration

Logseq is inspired by several unique tools and projects, including Roam Research, Org Mode, TiddlyWiki, Workflowy, and Cuekeeper.

We owe a huge debt of gratitude to the developers and creators of these projects, and we hope that Logseq can continue to build on their innovative ideas and make them accessible to a broader audience.

Thank you to all those who inspire us, and we look forward to seeing what the Logseq community will create with this tool!

Logseq is also made possible by the following projects:

  • Clojure & ClojureScript - A dynamic, functional, general-purpose programming language
  • DataScript - An immutable database and Datalog query-engine for Clojure, ClojureScript and JS
  • OCaml & Angstrom, for the document parser mldoc
  • isomorphic-git - A pure JavaScript implementation of Git for NodeJS and web browsers
  • SCI - A Small Clojure Interpreter

🙏 Thank You

We want to express our sincere gratitude to our Open Collective sponsors, backers, and contributors. Your support and contributions allow us to continue developing and improving Logseq. Thank you for being a part of our community and helping us make Logseq the best it can be!

💎 Sponsors

[Become a sponsor]

🌟 Contributors

Logseq - Your joyful, private digital garden | Product Hunt

Description
No description provided
Readme 27 MiB
Languages
Clojure 72%
OCaml 11.4%
JavaScript 7.1%
CSS 3.9%
Swift 1.6%
Other 3.9%