View Categories

Knowledge Base Plugin

Introduction #

Redmineflux Knowledge Base is a project-level documentation Plugin for Redmine that allows teams to create, organize, and share structured documentation within their projects. It supports hierarchical content organization through Spaces, Folders, and Pages, a draft and publish workflow, version history, a built-in rich text editor, user mentions, content templates, and public URL sharing.

The plugin connects project teams with their documentation in one central place, making it easy to write, review, publish, and maintain project knowledge without leaving Redmine.

Main capabilities include:

  • Project-scoped knowledge base with independent content per project
  • Spaces as top-level containers to organize documentation by topic or team
  • Hierarchical folder and page structure with nested folders
  • Draft and publish workflow with clear visibility rules
  • Version history with point-in-time restore
  • Rich text WYSIWYG editor with auto-save
  • User @mention notifications on publish
  • Admin-managed content templates for quick page creation
  • Public URL sharing via secure cryptographic token
  • Rate limiting on public URLs via Rack::Attack
  • Parent project space inheritance for sub-projects
  • Sidebar search and filter for quick navigation
  • Issue-to-KB page linking through Redmine issue details
  • REST API for external integrations (MCP-compatible, JSON)

Version Compatibility #

Supported Redmine versions:

  • 5.1.x
  • 6.0.x
Dependency Version
Redmine 5.1+
Ruby 3.0+
rack-attack gem ~> 6.7

Installation #

To install the Redmineflux Knowledge Base plugin:

  1. Make sure Redmine is already installed and working.
  2. Copy or clone the plugin into your Redmine plugins directory.
    cd {REDMINE_ROOT}/plugins
    git clone <repository_url> redmineflux_knowledgebase
  3. Install gem dependencies from the Redmine root.
    bundle install
  4. Run the database migrations.
    For production:RAILS_ENV=production bundle exec rake redmine:plugins:migrate

    For development:

    RAILS_ENV=development bundle exec rake redmine:plugins:migrate

  5. Restart your Redmine instance.

After installation, navigate to Administration > Plugins. The Redmineflux Knowledgebase Plugin should appear in the list.

Configuration #

The plugin settings are accessible from Administration > Plugins > Redmineflux Knowledgebase Plugin > Configure.

Settings are organized into tabs:

Tab Purpose
General Toggle email notifications for @mention support and issue mention linking
Public Access Enable public URL sharing, configure rate limiting, IP allowlist and blocklist
Templates Create, edit, and delete content templates (admin only)

General Settings #

Configure notification behavior for the plugin:

  • Mention users — enable or disable @username mention support in the editor
  • Mention issues — enable or disable #issue linking in the editor

Public Access Settings #

Control how the public URL feature works:

  • Enable public access — master toggle for the public URL feature
  • Requests per minute — throttle limit per IP address (default: 30)
  • Aggressive limit per hour — upper hourly limit per IP (default: 100)
  • Block bots — block common scraper user agents (curl, wget, python-requests, scrapy)
  • IP allowlist — trusted IPs that bypass rate limiting
  • IP blocklist — IPs that are always rejected

Knowledge Base Overview #

The plugin provides three main working areas:

  1. Project Knowledge Base Use this to create and manage documentation scoped to a single project.
  2. Public Knowledge Base Pages Use this to share individual published pages with external users who do not have a Redmine account.
  3. Knowledge Base REST API Use this for external system integrations and MCP-compatible programmatic access.

How to Enable the Knowledge Base Module in a Project #

  1. Open the project.
  2. Go to Settings.
  3. Open the Modules tab.
  4. Check Knowledge Base.
  5. Save the changes.

After enabling the module:

  • A Knowledge Base item appears in the project navigation menu.
  • Users with the appropriate role can access spaces, folders, and pages.

How to Use the Knowledge Base #

Spaces #

A Space is the top-level container within a project knowledge base. Think of it as a section, for example Engineering Docs, Onboarding, or Product Specs.

To create a space:

  1. Open the project.
  2. Click Knowledge Base from the project menu.
  3. Click New Space in the sidebar.
  4. Enter the space name and an optional description.
  5. Save.

To edit a space:

  1. Locate the space in the sidebar.
  2. Click the dropdown menu next to the space name.
  3. Click Edit.
  4. Update the name or description.
  5. Save.

To delete a space:

  1. Locate the space in the sidebar.
  2. Click the dropdown menu next to the space name.
  3. Click Delete.
  4. Confirm the action.

Note: Deleting a space permanently deletes all folders, pages, and version history within it. This action cannot be undone.

Folders #

Folders are organizational containers within a space. They can be nested inside other folders to create a hierarchy.

To create a folder:

  1. Open the project Knowledge Base.
  2. Select the target space from the sidebar.
  3. Click the dropdown next to the space name.
  4. Click New Folder.
  5. Enter the folder name.
  6. Save.

To create a nested folder inside another folder:

  1. Locate the parent folder in the sidebar.
  2. Click the dropdown menu on the folder.
  3. Click New Folder.
  4. Enter the folder name.
  5. Save.

To edit or delete a folder:

  1. Locate the folder in the sidebar.
  2. Click the dropdown menu on the folder.
  3. Select Edit or Delete.
  4. Confirm changes.

Note: Folders cannot have page-type nodes as parents. Pages cannot contain children.

Pages #

Pages are documents with rich text content. They live inside a space or inside a folder within a space.

To create a page:

  1. Open the project Knowledge Base.
  2. Select the target space from the sidebar.
  3. Click the dropdown next to the space or a folder.
  4. Click New Page.
  5. Enter the page title.
  6. Optionally select a content template from the template list.
  7. Save.

The page opens in the editor in draft status and is ready to be written.

To edit a page:

  1. Open the page.
  2. Click Edit in the page toolbar.
  3. Update the content in the editor.
  4. Content is auto-saved as you type.

To delete a page:

  1. Open the page.
  2. Click Delete in the page toolbar.
  3. Confirm the action.

How to Write Content in the Rich Text Editor #

The built-in WYSIWYG editor supports the following formatting options:

  • Headings (H2, H3, H4)
  • Bold, italic, underline
  • Ordered and unordered lists
  • Tables
  • Code blocks (inline and multi-line)
  • Blockquotes
  • Links and images
  • Emoji picker

Content is auto-saved automatically as you type. The auto-save status indicator appears in the page toolbar and shows Saving or Saved.

Auto-save saves content as a draft only. It does not create a new version.

User Mentions #

In the editor, type @ followed by a username to mention a project member.

A dropdown appears showing matching active members of the project. Select the user to insert the mention.

On publish, the plugin sends an email notification to each mentioned user. The email includes:

  • A direct link to the page
  • The name of the author who published the page

Mention notifications can be enabled or disabled in Plugin Settings > General.

Issue Mentions #

In the editor, type # followed by an issue number to reference an open Redmine issue.

A dropdown appears showing matching issues in the project. Linked issues are tracked and shown in the issue detail view.

How to Use the Draft and Publish Workflow #

Every page has a status: either draft or published.

Draft pages

  • Visible only to the page author and users with manage_knowledgebase_pages
  • Content auto-saves as you type (no version is created during auto-save)
  • Shown with a Draft badge in the sidebar and on the page header

Publishing a page

  1. Open the page in the editor (draft status).
  2. Click Publish in the page toolbar.
  3. A confirmation prompt appears.
  4. Confirm to publish.

After publishing:

  • The page becomes visible to all users with view_knowledgebase
  • A new version snapshot is created in version history
  • Mentioned users receive email notifications

Editing a published page

  1. Open the published page.
  2. Click Edit in the page toolbar.
  3. The page re-opens in the editor.
  4. Changes auto-save as a draft immediately.
  5. The page stays published until you click Update.
  6. Click Update to publish the new draft as a new version.

Unpublishing a page

  1. Open the published page.
  2. Click Unpublish in the page toolbar.
  3. Confirm the action.

After unpublishing:

  • The page status changes to draft with an Unpublished badge
  • The page is no longer visible to regular users or via public URLs
  • Only the author and users with manage_knowledgebase_pages can view it
  • Re-publishing creates a new version and restores visibility

How to Use Version History #

Versions are created only on publish. Draft auto-saves do not generate version history entries.

Each version records:

  • Sequential version number
  • Complete title and content snapshot at publish time
  • Publishing author
  • Timestamp
  • Optional publish comment

To view version history:

  1. Open any page.
  2. Click Versions in the page toolbar.
  3. The version history table shows all published versions.

The current active version is highlighted with a Current Version badge.

To restore a previous version:

  1. Open the Version History for a page.
  2. Find the version to restore.
  3. Click Restore this version.
  4. Confirm the action.

After restoring:

  • The page content is immediately updated to the restored version.
  • The page is published immediately — it does not require a separate publish step.
  • A new version entry is created with the comment Restored from version N.
  • The restore is recorded in the version history for audit purposes.

How to Use Content Templates #

Templates provide pre-structured content for common page types. Admins manage templates from Plugin Settings > Templates.

The plugin ships with six pre-built templates:

  • Meeting Notes
  • Architecture Review
  • Product Requirements Document (PRD)
  • Annual Plan
  • API Documentation
  • Budget Proposal

To use a template when creating a page:

  1. Click New Page from the sidebar.
  2. In the new page form, select a template from the template dropdown.
  3. The editor pre-fills with the template content.
  4. Edit the content and save.

Managing Templates (Admin Only) #

To create a new template:

  1. Go to Administration > Plugins > Redmineflux Knowledgebase Plugin > Configure.
  2. Open the Templates tab.
  3. Click New Template.
  4. Enter the template name and write the HTML content.
  5. Save.

To edit a template:

  1. Open the Templates list.
  2. Click Edit next to the template.
  3. Update the content.
  4. Save.

To copy a template:

  1. Open the template detail.
  2. Click Copy.
  3. A new template opens with Copy of prefixed to the name.
  4. Edit and save.

To delete a template:

  1. Open the Templates list.
  2. Click Delete next to the template.
  3. Confirm.

How to Use Public URL Sharing #

Individual published pages can be shared with people who do not have a Redmine account.

To enable a public URL for a page:

  1. Open a published page.
  2. Click Public URL in the page toolbar.
  3. A modal opens.
  4. Click Enable Public Access.
  5. A secure URL is generated containing a 64-character cryptographic token.
  6. Copy the URL and share it.

To disable public access:

  1. Open the page.
  2. Click Public URL in the page toolbar.
  3. Click Disable Public Access.
  4. The token is invalidated immediately.

Public URL characteristics:

  • Read-only — no editing or commenting
  • Shows the published version of the page only
  • Browser caching for 10 minutes via Cache-Control headers
  • View count tracked per page
  • Protected by rate limiting (see Security section)
  • Can only be enabled on pages with at least one published version
  • Explicitly unpublished pages cannot have public access enabled

How to Use Parent Project Space Inheritance #

Sub-projects can inherit and display the Knowledge Base spaces of their parent project in the sidebar.

When enabled:

  • The parent project’s spaces appear in the sub-project’s sidebar under an Inherited from [Project Name] section.
  • Pages in inherited spaces are read-only from the sub-project view.
  • Action menus are suppressed for inherited spaces.
  • Users must have view_knowledgebase permission on the parent project to see inherited content.

Inheritance is enabled by default and can be toggled in Plugin Settings > General.

How to Use Sidebar Search and Filter #

The sidebar includes a live search field that filters spaces, folders, and pages as you type.

To search:

  1. Open the project Knowledge Base.
  2. Click inside the Search field at the top of the sidebar.
  3. Type any part of a space name, folder name, or page title.
  4. Matching items appear immediately.
  5. Clear the field to show all items again.

The search is client-side and does not require a page reload.

How to View Linked Knowledge Base Pages on Issues #

Knowledge Base pages that mention a Redmine issue using the #issue syntax are automatically linked to that issue.

To view linked pages on an issue:

  1. Open any Redmine issue.
  2. Scroll to the bottom of the issue details section.
  3. A Related Knowledge Base Pages section appears showing all linked pages.
  4. Click a page title to open it.

The link is created and removed automatically as pages are updated. No manual action is required.

Permissions and Access Control #

Permissions are configured per role under Administration > Roles and Permissions.

The Knowledge Base module exposes three permissions:

Permission What it covers Default
view_knowledgebase View spaces, folders, and published pages Public — all project members
manage_knowledgebase_spaces Create, edit, and delete spaces Managers
manage_knowledgebase_pages Create, edit, publish, and delete pages and folders Members with write access

Page Visibility Rules #

Page State Who Can View
Published All project members with view_knowledgebase
Draft (no published version) Author and users with manage_knowledgebase_pages
Draft (has published versions) All members see the last published version
Explicitly unpublished Author and users with manage_knowledgebase_pages only
Folders Always visible to all members

Admin-Only Areas #

  • Templates management (create, edit, delete, copy) requires Redmine administrator access.
  • Plugin settings configuration requires Redmine administrator access.

REST API #

The plugin exposes a JSON REST API for external integrations. All API endpoints require authentication and return JSON.

API base path: /api/knowledgebase/

Spaces API #

Method Path Description
GET /api/knowledgebase/spaces?project_id=X List all spaces in a project
GET /api/knowledgebase/spaces/:id?project_id=X Get a single space
POST /api/knowledgebase/spaces?project_id=X Create a space
PATCH /api/knowledgebase/spaces/:id?project_id=X Update a space
DELETE /api/knowledgebase/spaces/:id?project_id=X Delete a space

Nodes API #

Method Path Description
GET /api/knowledgebase/nodes?project_id=X List all nodes in a project
GET /api/knowledgebase/nodes/:id?project_id=X Get a single node
POST /api/knowledgebase/nodes?project_id=X Create a node
PATCH /api/knowledgebase/nodes/:id?project_id=X Update a node
DELETE /api/knowledgebase/nodes/:id?project_id=X Delete a node
POST /api/knowledgebase/nodes/:id/publish?project_id=X Publish a page
POST /api/knowledgebase/nodes/:id/unpublish?project_id=X Unpublish a page
GET /api/knowledgebase/nodes/:id/versions?project_id=X List version history
POST /api/knowledgebase/nodes/:id/restore_version?project_id=X Restore a version

All API responses follow the format:

{
"success": true,
"data": { ... },
"meta": {
"total_count": 10,
"page": 1,
"per_page": 25,
"total_pages": 1
}
}

Pagination parameters: page (default: 1) and per_page (default: 25, max: 100).

Security #

Rate Limiting (Rack::Attack) #

The plugin uses Rack::Attack to throttle requests to public KB URLs (/kb/public/*).

Rate limiting is active in production and test environments only. It is disabled in development.

Default behavior:

  • Throttle: 30 requests per minute per IP address
  • Aggressive throttle: 100 requests per hour per IP address
  • Non-GET requests to public URLs are blocked automatically
  • Known bot user agents are blocked (curl, wget, python-requests, scrapy)
  • Requests over the limit receive a 429 Too Many Requests response with a Retry-After header

Configuration is read dynamically from plugin settings. Changes in the admin UI take effect within 60 seconds without a server restart.

Token Security #

Public URLs use a 64-character cryptographically secure random hex token generated by SecureRandom.hex(32). The token format is validated before any database lookup to prevent enumeration attacks.

Disabling public access immediately clears the token from the database. The old URL becomes invalid at once.

Troubleshooting #

If you face issues with the plugin, try the following:

  1. Clear browser cache and reload the page.
  2. Restart the Redmine application.
  3. Make sure the plugin is installed in plugins/redmineflux_knowledgebase.
  4. Re-run plugin migrations:
    bundle exec rake redmine:plugins:migrate RAILS_ENV=production
  5. Confirm the Knowledge Base module is enabled in the project settings.
  6. Verify user role permissions include view_knowledgebase or manage_knowledgebase_pages as needed.
  7. Check that the rack-attack gem is installed if public URL rate limiting is required.
  8. For rate limiting not working, confirm Redmine is running in production environment and that Rails.cache is configured to a shared cache store (not MemoryStore).
  9. Review Redmine logs for plugin load errors:
    tail -f {REDMINE_ROOT}/log/production.log

Frequently Asked Questions #

Q1. What is the difference between a Space, a Folder, and a Page?

A Space is the top-level container for a section of the knowledge base (for example Engineering Docs). A Folder is an organizational container inside a space used to group related pages. A Page is the actual document containing written content. Spaces and Folders are structural containers; only Pages hold content.

Q2. Can I have multiple knowledge bases in one project?

No. Each project has one knowledge base. Within it you can create as many Spaces as needed to organize your content into separate sections.

Q3. Who can see a draft page?

Draft pages are visible only to the page author and users with manage_knowledgebase_pages permission. Regular members with only view_knowledgebase cannot see draft pages unless a published version already exists, in which case they see the last published version.

Q4. Does auto-save create a new version?

No. Auto-save updates the draft content only. A new version is created only when the user explicitly clicks Publish or Update. This keeps version history clean and meaningful.

Q5. Can I restore an old version of a page?

Yes. Open the page, click Versions, find the version to restore, and click Restore. The page is published immediately with the restored content. A new version entry is created recording the restore action.

Q6. Can external users without a Redmine account view a page?

Yes, but only for pages where Public Access has been enabled by a user with manage_knowledgebase_pages. The public URL contains a secure token. Anyone with the link can view the page. Disabling public access immediately revokes the URL.

Q7. Can a sub-project see the knowledge base of its parent project?

Yes. When the parent project has the Knowledge Base module enabled and the user has view_knowledgebase permission on the parent, the parent project’s spaces appear in the sub-project sidebar as inherited (read-only) content.

Q8. Can I link a Knowledge Base page to a Redmine issue?

Yes. In the page editor, type # followed by the issue number to mention the issue. The link is tracked automatically and appears in the Related Knowledge Base Pages section at the bottom of the issue detail view.

Q9. Are there limits on the number of spaces, folders, or pages?

There are no plugin-imposed limits. The only constraints are your database capacity and Redmine’s general performance characteristics.

Uninstallation #

To uninstall the plugin:

  1. Go to the Redmine installation directory.
  2. Roll back the database migrations.
    bundle exec rake redmine:plugins:migrate NAME=redmineflux_knowledgebase VERSION=0 RAILS_ENV=production
  3. Remove the plugin folder.
    rm -rf plugins/redmineflux_knowledgebase
  4. Restart Redmine.
    touch tmp/restart.txt

Take a database backup before rollback or uninstallation. The rollback removes all knowledge base tables and data permanently.

Support #

Channel Link
Knowledge Base redmineflux.com/knowledge-base
Website redmineflux.com

Conclusion #

Redmineflux Knowledge Base is a complete documentation management Plugin for Redmine that brings structured knowledge creation, version-controlled publishing, team collaboration, and external sharing into one integrated experience. It supports the full content lifecycle from draft through publish, hierarchical organization with spaces and folders, flexible access control, and secure public URL sharing. The plugin is designed to give project teams a clean and reliable way to maintain documentation without leaving their existing Redmine workflow.