A lightweight maintenance mode plugin for Redmine without external dependencies (e.g., Deface).
- Access Control: Restrict non-admin users to a maintenance page during maintenance
- Banner Notification: Display maintenance banner on all pages including login screen
- Scheduled Maintenance: Automatically enable/disable maintenance mode at specified times
- Login Control: Only specified users can login during maintenance (configurable)
- SSO/OAuth Protection: Disable external authentication buttons (SAML, OAuth, LDAP, etc.) during maintenance
- Multi-language: Supports English, Japanese, Korean, Chinese, and German
- Redmine 6.0 or later (6.1, 7.0 compatible)
-
Copy the plugin directory to your Redmine's
pluginsdirectory:cd /path/to/redmine/plugins git clone https://github.com/seraph3000/redmine_simple_maintenance.git # or copy manually
-
Restart Redmine:
systemctl restart httpd
-
(Production) Precompile assets:
# If running Redmine in a subdirectory RAILS_RELATIVE_URL_ROOT=/redmine RAILS_ENV=production bundle exec rake assets:clobber RAILS_RELATIVE_URL_ROOT=/redmine RAILS_ENV=production bundle exec rake assets:precompile # If not using subdirectory RAILS_ENV=production bundle exec rake assets:clobber RAILS_ENV=production bundle exec rake assets:precompile # Fix ownership if ran as non-Apache user chown -R apache:apache ./public/assets
Navigate to Administration > Plugins > Simple Maintenance Plugin > Configure
| Setting | Description |
|---|---|
| Activate maintenance mode | Enable maintenance mode immediately |
| Banner Message | Short message displayed on all pages (supports Textile) |
| Maintenance Page Message | Detailed message shown to blocked users (supports Textile) |
| Setting | Description |
|---|---|
| Enable scheduled maintenance | Activate time-based maintenance |
| Start Date/Time | When maintenance begins |
| End Date/Time | When maintenance ends |
| Setting | Description |
|---|---|
| Users allowed to login | Comma-separated usernames (e.g.,admin, operator) |
Note: If this field is empty, defaults to
adminto prevent lockout.
- Non-admin users (logged in) : See full-screen maintenance page, session preserved
- Non-admin users (login attempt) : Can attempt to log in, but are securely blocked by the server (503 page) immediately after authentication if not on the allowed list. (Designed to prevent Username Enumeration vulnerabilities).
- Admin users : See banner only, full access to system
- External auth buttons : Visually disabled via CSS
- Users simply reload the page to resume normal operation
- No forced logout, sessions remain valid
Note: Only
redmine_samlhas been tested. Other plugins are based on common CSS class naming conventions and may not work as expected. Please verify in your environment and adjust selectors as needed.
The following external authentication buttons are automatically disabled during maintenance:
- redmine_saml (
#saml-login) - redmine_omniauth_google (
.google-login) - redmine_omniauth_azure (
.azure-login) - redmine_omniauth_github (
.github-login) - redmine_openid_connect (
.oidc-login) - redmine_cas (
.cas-login) - Generic selectors (
.sso-login,.oauth-login,.external-login,[class*="omniauth-"])
To add custom selectors, edit assets/stylesheets/redmine_simple_maintenance.css.
-
Remove plugin settings from database:
cd /path/to/redmine RAILS_ENV=production bundle exec rails runner "Setting.find_by(name: 'plugin_redmine_simple_maintenance')&.destroy"
-
Remove the plugin directory:
rm -rf /path/to/redmine/plugins/redmine_simple_maintenance
-
Restart Redmine:
systemctl restart httpd
All notable changes to this project will be documented in this file.
-
- Admin menu icon migrated to SVG sprite (
sprite_icon).
- Admin menu icon migrated to SVG sprite (
- Username Enumeration Prevention : Removed frontend JavaScript login button controls. Access control is now strictly and securely enforced on the backend to prevent attackers from guessing valid usernames based on UI behavior.
- Refactored login logic: The standard login button remains active for all users, but unauthorized users are securely blocked (redirected to the 503 Maintenance Page) immediately after authentication.
- Simplified codebase by removing complex DOM event listeners.
- German translation (thanks to @teatower)
- Flatpickr datetime picker locales prepared for future translations (fr, es, it, pt, ru)
- Improved locale detection logic for flatpickr
- Initial release
- Manual maintenance mode toggle
- Scheduled maintenance with start/end datetime
- Maintenance banner on all pages (Textile supported)
- Full-screen maintenance page for non-admin users
- Login control: configurable allowed usernames during maintenance
- External auth button protection (SAML, OAuth, LDAP, CAS, etc.)
- Multi-language support: English, Japanese, Korean, Chinese
- Flatpickr datetime picker with localization
MIT License - see LICENSE file.
seraph3000