How to Create a Redmine Plugin From Scratch

Learn how to create a Redmine plugin from scratch with models, migrations, controllers, routes, permissions, project menus, translations, and testing tips.

By Anderson Alvarez Vásquez · 2026-07-01

  • technology
  • programming
  • ruby
  • tutorials
  • Redmine

Redmine: How to Create a Plugin From Scratch Redmine can be extended with plugins. A plugin lets you add custom features without modifying Redmine core, which makes upgrades and maintenance easier. In this post, we will create a small project-level plugin called Knowledge Base . It will add articles to a Redmine project and use the standard Redmine conventions: plugin registration, migrations, routes, permissions, menus, translations, and basic views. Requirements You need: - A working Redmine installation. - Access to the Redmine root directory. - Ruby and Bundler installed. - Basic Ruby on Rails knowledge. - Permission to restart Redmine. All commands assume you are inside the Redmine root folder. bash cd /path/to/redmine 1. Generate The Plugin Run: bash bundle exec rails generate redmine plugin KnowledgeBase Redmine creates the plugin inside: text plugins/knowledge base/ The important files are: text plugins/knowledge base/ ├── app/ ├── config/ │ ├── locales/ │ └── routes.rb ├── db/ │ └── migrate/ └── init.rb The init.rb file registers the plugin in Redmine. 2. Register The Plugin Open: text plugins/knowledge base/init.rb Add: ruby Redmine::Plugin.register :knowledge base do name 'Knowledge Base' author 'Anderson Alvarez' description 'A simple knowledge base plugin for Redmine' version '0.0.1' end Restart Redmine and check: text Administration - Plugins You should see the plugin listed. 3. Generate A Model Create an Article model: bash bundle exec rails generate redmine plugin model knowledge base article title:string content:text project id:integer Then run plugin migrations: bash bundle exec rake redmine:plugins:migrate Open the generated model: text plugins/knowledge base/app/models/article.rb Use: ruby class Article < ActiveRecord::Base belongs to :project...