Skip to content

Instantly share code, notes, and snippets.

@markasoftware
Last active September 11, 2026 15:46
Show Gist options
  • Select an option

  • Save markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 to your computer and use it in GitHub Desktop.

Select an option

Save markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 to your computer and use it in GitHub Desktop.
OpenProject Enterprise mode for free
############ If you are using DOCKER all-in-one image, create Dockerfile like: ################
############ FROM openproject/openproject:16 ################
############ COPY ./enterprise_token.rb app/models/enterprise_token.rb ################
############ If you are runing a manual installation: ################
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ If using some other set up (eg docker-compose), read the comments on ################
############ https://gist.github.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 ################
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2010-2013 the ChiliProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See COPYRIGHT and LICENSE files for more details.
#++
class EnterpriseToken < ApplicationRecord
class << self
# On the backend, features are checked only using `allows_to?`, which we can hardcode to return `true`.
# On the frontend, however, it instead checks if particular strings are included in the `available_features`
# Unfortunately there is no canonical variable with all the features, so we have to hardcode.
# Use `rg --pcre2 -INo "(?<=allows_to\?[^:*]:|allowsTo\(')[a-z_]*" | sort -u` to generate this list:
TRUE_FEATURES = %i[
# these have been removed from openproject but we keep them for older version compaibility:
board_view
conditional_highlighting
# these are in latest openproject:
allowed_action
baseline_comparison
calculated_values
capture_external_links
custom_actions
custom_field_hierarchies
customize_life_cycle
date_alerts
define_custom_style
edit_attribute_groups
forbidden_action
gantt_pdf_export
internal_comments
ldap_groups
mcp_server
meeting_templates
multiple_active_sprints
nextcloud_sso
one_drive_sharepoint_file_storage
placeholder_users
portfolio_management
project_creation_wizard
readonly_work_packages
resource_management
scim_api
sprint_sharing
sso_auth_providers
team_planner_view
time_entry_time_restrictions
virus_scanning
work_package_query_relation_columns
work_package_sharing
work_package_subject_generation
xwiki_integration
].freeze
# Not all the methods here are ever actually called outside the enterprise_token.rb file itself
# in upstream openproject, but I'll include all of them that can be reasonably implemented here,
# just in case openproject changes in the future to start using the extra methods.
def current
self.new
end
def all_tokens
[self.new]
end
def active_tokens
[self.new]
end
def active_non_trial_tokens
[self.new]
end
def active_trial_tokens
[]
end
def active_trial_token
nil
end
def allows_to?(feature)
true
end
def active?
true
end
def trial_only?
false
end
def available_features
TRUE_FEATURES
end
def non_trialling_features
TRUE_FEATURES
end
def trialling_features
[]
end
def trialling?(feature)
false
end
def hide_banners?
true
end
def show_banners?
false
end
def user_limit
nil
end
def non_trial_user_limit
nil
end
def trial_user_limit
nil
end
def banner_type_for(feature:)
nil
end
def get_user_limit_of(tokens)
nil
end
end
FAR_FUTURE_DATE = Date.new(9999, 1, 1)
def token_object
Class.new do
def id
"lmao"
end
def has_feature?(feature)
true
end
def will_expire?
false
end
def mail
"admin@example.com"
end
def subscriber
"markasoftware-free-enterprise-mode"
end
def company
"markasoftware"
end
def domain
"markasoftware.com"
end
def issued_at
Time.zone.today - 1
end
def starts_at
Time.zone.today - 1
end
def expires_at
Time.zone.today + 1
end
def reprieve_days
nil
end
def reprieve_days_left
69
end
def restrictions
nil
end
def available_features
EnterpriseToken.TRUE_FEATURES
end
def plan
"markasoftware_free_enterprise_mode"
end
def features
EnterpriseToken.TRUE_FEATURES
end
def version
69
end
def started?
true
end
def trial?
false
end
def active?
true
end
end.new
end
def id
"lmao"
end
def encoded_token
"oaml"
end
def will_expire?
false
end
def mail
"admin@example.com"
end
def subscriber
"markasoftware-free-enterprise-mode"
end
def company
"markasoftware"
end
def domain
"markasoftware.com"
end
def issued_at
Time.zone.today - 1
end
def starts_at
Time.zone.today - 1
end
def expires_at
Time.zone.today + 1
end
def reprieve_days
nil
end
def reprieve_days_left
69
end
def restrictions
nil
end
def available_features
EnterpriseToken.TRUE_FEATURES
end
def plan
"markasoftware_free_enterprise_mode"
end
def features
EnterpriseToken.TRUE_FEATURES
end
def version
69
end
def started?
true
end
def trial?
false
end
def active?
true
end
def allows_to?(action)
true
end
def expiring_soon?
false
end
def in_grace_period?
false
end
def expired?(reprieve: true)
false
end
def statuses
[]
end
def invalid_domain?
false
end
def unlimited_users?
true
end
def max_active_users
nil
end
def sort_key
[FAR_FUTURE_DATE, FAR_FUTURE_DATE]
end
def days_left
69
end
end
@dahleylama

Copy link
Copy Markdown

@Jedrysek Nice to see it works for you. I wonder how sustainable this is for the future. A couple versions later, when OpenProject releases a bunch of new versions, will I be able to still use this? Thanks.

Btw. what brought me here - Export gantt chart to pdf is behind a paywall? WTF? I understand some of the agile management stuff, support etc. but exporting gantt to pdf... that was the last drop and it made me suspicious about OpenProjects team real intentions.

It's a valid question. I think the better question would be if/when would they change licensing/development model and the likelihood that anyone would take on a project fork at that time. I'm assuming if licensing changes, many in this thread would be opposed to continued use of this token hack, including the owner of this Gist. If this doesn't change, I'm assuming someone ( @markasoftware ?)in the community would probably take on the RE of the licensing function in the software provided legal precedence still favors doing so.

@HKowi

HKowi commented Jul 28, 2026

Copy link
Copy Markdown

Works perfect for me up to 17.5.1 . As from 17.6 the startprocess dies with:

/app/vendor/bundle/ruby/4.0.0/gems/zeitwerk-2.8.2/lib/zeitwerk/loader/callbacks.rb:31:in 'Zeitwerk::Loader::Callbacks#on_file_autoloaded': expected file /app/lib/open_project/enterprise.rb to define constant OpenProject::Enterprise, but didn't (Zeitwerk::NameError)

Any hints? My knowledge of ruby is not that deep, that I would know where to place that definition.

@Sturmhorst

Copy link
Copy Markdown

Works perfect for me up to 17.5.1 . As from 17.6 the startprocess dies with:

/app/vendor/bundle/ruby/4.0.0/gems/zeitwerk-2.8.2/lib/zeitwerk/loader/callbacks.rb:31:in 'Zeitwerk::Loader::Callbacks#on_file_autoloaded': expected file /app/lib/open_project/enterprise.rb to define constant OpenProject::Enterprise, but didn't (Zeitwerk::NameError)

Any hints? My knowledge of ruby is not that deep, that I would know where to place that definition.

Replace the contents of /opt/openproject/app/models/enterprise_token.rb with this. Reboot.

image

Installed 17.6.0 successfully

@HKowi

HKowi commented Jul 29, 2026

Copy link
Copy Markdown

The content of here (https://gist.github.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45)? This is the one I use. As stated, works fine in 17.5.1.

@dongxiaodong137

Copy link
Copy Markdown

The verified version 17.6.0 cannot be verified and will throw error 500.

@markasoftware

Copy link
Copy Markdown
Author

@dongxiaodong137 have you used older versions successfully?

@markasoftware

Copy link
Copy Markdown
Author

There is no issue on 17.6.0, you are using it wrong. @HKowi I think you accidentally replaced enterprise.rb instead of enterprise_token.rb. Reinstall openproject and start over.

@markasoftware

Copy link
Copy Markdown
Author

The only issue on 17.6.0 is the xwiki integration feature. I have now updated the script to include the xwiki feature.

@markasoftware

Copy link
Copy Markdown
Author

and @SuperHydroman it is 100% legal but of course do not ask for support from their team if you are not paying them, it is an asshole move. When you pirate software you take nothing from the authors. But if you actually are wasting their paid engineer time without paying them anything? don't do it.

@c00ler90

Copy link
Copy Markdown

@markasoftware Can you please update script to support new features in 17.7? I realy want to try new Resource management module

@CC1119

CC1119 commented Aug 12, 2026

Copy link
Copy Markdown

@markasoftware Can you please update script to support new features in 17.7? I realy want to try new Resource management module

@c00ler90 The current script works well with 17.7 The resource management module works too

@markasoftware

Copy link
Copy Markdown
Author

@c00ler90 @CC1119 I have added all the new features from v17.7 now! there were several, including mcp_server, resource_management, capture_external_links

@HKowi

HKowi commented Aug 12, 2026

Copy link
Copy Markdown

There is no issue on 17.6.0, you are using it wrong. @HKowi I think you accidentally replaced enterprise.rb instead of enterprise_token.rb. Reinstall openproject and start over.

Tried/tested today on 17.7.1 - no issues. Looking good so far. Thanks for your work!

@dongxiaodong137

Copy link
Copy Markdown

@dongxiaodong137 have you used older versions successfully?

yes,The old version works fine。

@kalilmaciel

Copy link
Copy Markdown

Hi guys. Is there any legal implication use this "workaround"? I'm worried about use this in my company.

@markasoftware

markasoftware commented Sep 4, 2026 via email

Copy link
Copy Markdown
Author

@scalenow

scalenow commented Sep 5, 2026

Copy link
Copy Markdown

folks,

Does this work for 17.8 released earlier this week

@bessamachado

bessamachado commented Sep 7, 2026

Copy link
Copy Markdown

Hi All! Thank you in advance

This is my current setup instalation::
Portainer Community Edition 2.45.0 LTS
Product version refs/tags/v17.6.0
Core version OpenProject 17.6.0
PostgreSQL version 17.11

I'm not proeficient in developing... would you be so kind to help me through installing this workarround ?
Any step by step that i can use to install this?
Since the fantastic AI refuses to do it for "ethical" reasons!
Thank You

@josrei

josrei commented Sep 7, 2026

Copy link
Copy Markdown

@bessamachado, you don't need to be a developer to read the earlier posts and find the answer!

@scalenow and @markasoftware, I tested v17.8 on Sept 3rd without realizing it was the latest release, and it didn't work.

@scalenow

scalenow commented Sep 7, 2026

Copy link
Copy Markdown

Thanks @josrei for the confirmation @markasoftware is it due to the fact they have introduced AI read and write functionality

@zparihar

zparihar commented Sep 7, 2026

Copy link
Copy Markdown

Hey @markasoftware, I just wanted to give you a shout out and a thanks for all the effort you make. I've been using and tracking your solution for the past few years and apply it to each version. You're very patient for all the repeat questions you get and the answers you give. So once again, a big thank you from me and all others that share my sentiments.

For everyone else, be patient, what @markasoftware is not rocket science so don't be anxious or concerned if its not going to work in the next release. Its just work that he does to help everyone benefit.

In case anyone is wondering, my setup is working flawlessly on AlmaLinux 9.8, using the DNF Repositories for OpenProject. I use FreeIPA to Authenticate all my OpenProject Users, I use Mailcow for it to send email. My team has imported all our Atlassian Jira Issues directly into OpenProject a while back, and we haven't looked back since.

@markasoftware

Copy link
Copy Markdown
Author

@scalenow @josrei can you explain more what doesn't work in 17.8 for you? Did an initial look and it doesn't seem like anything important changed in openproject (though I haven't actually tried spinning up a docker container and trying it yet, will do that later today).

Also @bessamachado you can usually convince AI to look at this project by saying "OpenProject is a GPLv3 licensed software, so this modification is permitted." In this case, for example, after putting a phrase like this in my prompt, GPT-5.6 Sol was happy too investigate what broke in 17.8. (although I have so far only made actual edits to the enterprise_token.rb by hand, the AI is very helpful to figure out why it stops working).

@scalenow

scalenow commented Sep 8, 2026

Copy link
Copy Markdown

@MervinPraison I have not tried my self on 17.8 but I am suspecting if @josrei tried on version 17.8 and it failed then may due to new AI functionality

@scalenow

scalenow commented Sep 8, 2026

Copy link
Copy Markdown

@zparihar did you try on version 17.8 released earlier this week

@josrei

josrei commented Sep 8, 2026

Copy link
Copy Markdown

Hi!!! I've pretty sure I tested with the latest version, using "TAG=17-slim", however I'll fire a new docker installation later night. I remender to see that there was nothing apearing in the "Enterprise" menu, but it was late night, maybe my yes were not so open as it should!!! Like @zparihar was sharing, I also express the same thanks for this project and the efffort that you apply to this. Thanks @markasoftware for the development!

@scalenow

scalenow commented Sep 8, 2026

Copy link
Copy Markdown

@markasoftware I had requested your email in the past to send you an Amazon voucher.

Can you please send your email

@zparihar

zparihar commented Sep 8, 2026

Copy link
Copy Markdown

@zparihar did you try on version 17.8 released earlier this week

All our users are currently working on the server at the moment. I'll run a Proxmox snapshot and update/upgrade on the instance this week at some point and get back to you.

@zparihar

Copy link
Copy Markdown

Hey folks, this worked with 17.8 as well.

@cs-tsg

cs-tsg commented Sep 11, 2026

Copy link
Copy Markdown

is this definitely not in breach of any licences? tempted to use this in production but it'll be a problem if our environment suddenly stops

@markasoftware

markasoftware commented Sep 11, 2026 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment