Skip to content

Instantly share code, notes, and snippets.

@markasoftware
Last active July 29, 2026 12:04
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[
allowed_action
baseline_comparison
board_view
calculated_values
conditional_highlighting
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
nextcloud_sso
one_drive_sharepoint_file_storage
placeholder_users
readonly_work_packages
scim_api
sso_auth_providers
team_planner_view
time_entry_time_restrictions
virus_scanning
work_package_query_relation_columns
work_package_sharing
work_package_subject_generation
].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
@idiaryprm

Copy link
Copy Markdown

Anyone knows how to make this work on a self hosted on a ubuntu machine?

Which installation Method?

Via package

see your mail ;)

I would also appreciate a message. We haven't installed it yet, but I would prefer package installation.

Can you suggest how to upgrade on ubuntu direct instaallation. I have tried in past but it never worked.

@lalitg1977

Copy link
Copy Markdown

Anyone knows how to make this work on a self hosted on a ubuntu machine?

Which installation Method?

Via package

see your mail ;)

I would also appreciate a message. We haven't installed it yet, but I would prefer package installation.

Can you suggest how to upgrade on ubuntu direct instaallation. I have tried in past but it never worked.

Hi, I am on self hosted Ubuntu with the below details
Core version: OpenProject 17.2.3
PostgreSQL version 16.13
Can you send across the same to me ?

@lalitg1977

Copy link
Copy Markdown

I have a package based installation
Core version: OpenProject 17.2.3
PostgreSQL version: 16.13

Can you share the script / file across with me. Much appreciated.

@idiaryprm

Copy link
Copy Markdown

Anyone knows how to make this work on a self hosted on a ubuntu machine?

Which installation Method?

Via package

see your mail ;)

I would also appreciate a message. We haven't installed it yet, but I would prefer package installation.

Can you suggest how to upgrade on ubuntu direct instaallation. I have tried in past but it never worked.

It worked. Thanks.

@maxfritsler

Copy link
Copy Markdown

Hello. Please send a script for package installation. Thank you.

@idiaryprm

idiaryprm commented Apr 15, 2026 via email

Copy link
Copy Markdown

@scalenow

scalenow commented Apr 15, 2026

Copy link
Copy Markdown

folks ,17.3.0 has been released.Has any one tested the new release ?

@thomijasir

Copy link
Copy Markdown

it work fine on 17.3.0

Screenshot 2026-04-15 at 8 19 02 PM

@scalenow

Copy link
Copy Markdown

@thomijasir thanks for the confirmation.

@Dhruv-tapfin

Copy link
Copy Markdown

hi i am using 17.3.1 version does it work with that ?

@cp61

cp61 commented Apr 29, 2026

Copy link
Copy Markdown

Ok in Docker-compose v17.3.1

@Batko91

Batko91 commented May 11, 2026

Copy link
Copy Markdown

working on OpenProject 17.3.1
PROXMOX LXC
Edit Enterprise file and its all
THANKS

@Dhruv-tapfin

Copy link
Copy Markdown

i am not able to to use it with my docker compose setup it get stuck at db connection .

Ok in Docker-compose v17.3.1

@DaanSelen

Copy link
Copy Markdown

Any step-by-step instructions on how to do this with Docker Compose from 0?

@CC1119

CC1119 commented May 25, 2026

Copy link
Copy Markdown

Any step-by-step instructions on how to do this with Docker Compose from 0?

First, I started with that: https://github.com/opf/openproject-docker-compose
And I added that in the docker-compose.yml

- ./enterprise_token-17.4.0.rb:/app/app/models/enterprise_token.rb

I know there are many better ways to do it.

@Yayamiousushi

Copy link
Copy Markdown

Hi, has anyone tested version 17.5.0?

@prestsauce

Copy link
Copy Markdown

working on 17.5.0 (lxc install -- not docker)

@reinholdsanderss-hash

Copy link
Copy Markdown

Please, all mates. It is lifesaving for me. Please, who can help me install this? my email reinholdsanderss@gmail.com

This will help me get a job. please to all to help me.

@Jedrysek

Jedrysek commented Jul 3, 2026

Copy link
Copy Markdown

Thank you, works flawlessly for me using docker compose on OpenProject version 17.5.1.
Screenshot From 2026-07-03 17-08-41
Screenshot From 2026-07-03 17-08-52

@Udrakan

Udrakan commented Jul 4, 2026

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.

@markasoftware

markasoftware commented Jul 4, 2026 via email

Copy link
Copy Markdown
Author

@oehlrich9

Copy link
Copy Markdown

Works perfect with 17.6.0

Bild 08 07 26 um 21 17 Bild 08 07 26 um 21 17

@prody32

prody32 commented Jul 15, 2026

Copy link
Copy Markdown
#The working enterprise_token.rb for version 17.6.0 has been installed via DEB packages.
#----------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------v.popkov
# frozen_string_literal: true

class EnterpriseToken < ApplicationRecord
  TRUE_FEATURES = %i[
    allowed_action
    baseline_comparison
    board_view
    calculated_values
    conditional_highlighting
    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
    nextcloud_sso
    one_drive_sharepoint_file_storage
    placeholder_users
    readonly_work_packages
    scim_api
    sso_auth_providers
    team_planner_view
    time_entry_time_restrictions
    virus_scanning
    work_package_query_relation_columns
    work_package_sharing
    work_package_subject_generation
  ].freeze

  class << self
    def current
      new
    end

    def all_tokens
      [new]
    end

    def active_tokens
      [new]
    end

    def active_non_trial_tokens
      [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 id
    "enterprise-token"
  end

  def encoded_token
    "fake-token"
  end

  def will_expire?
    false
  end

  def mail
    "admin@example.com"
  end

  def subscriber
    "openproject-enterprise"
  end

  def company
    "Your Company"
  end

  def domain
    "example.com"
  end

  def issued_at
    Time.zone.today - 1
  end

  def starts_at
    Time.zone.today - 1
  end

  def expires_at
    Date.new(9999, 12, 31)
  end

  def reprieve_days
    nil
  end

  def reprieve_days_left
    365
  end

  def restrictions
    nil
  end

  def available_features
    self.class::TRUE_FEATURES
  end

  def plan
    "enterprise"
  end

  def features
    self.class::TRUE_FEATURES
  end

  def version
    1
  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
    365
  end

  def token_object
    self
  end
end

@SuperHydroman

Copy link
Copy Markdown

Is it legal to use? It seems weird to say "Free" enterprise mode? I am currently talking with Projects Support and they ask me for our enterprise token / license before they help me. Is it OK to mention that we use this?

@danilociaffi

Copy link
Copy Markdown

Is it legal to use? It seems weird to say "Free" enterprise mode? I am currently talking with Projects Support and they ask me for our enterprise token / license before they help me. Is it OK to mention that we use this?

since the app is OS you can change the code however you want, so yes it is legal I guess. However since you are not paying OP for this workaround, this will not give you access to any customer service by them

@SuperHydroman

Copy link
Copy Markdown

Is it legal to use? It seems weird to say "Free" enterprise mode? I am currently talking with Projects Support and they ask me for our enterprise token / license before they help me. Is it OK to mention that we use this?

since the app is OS you can change the code however you want, so yes it is legal I guess. However since you are not paying OP for this workaround, this will not give you access to any customer service by them

Thanks for your quick response! I've send them my current license, I'll see if they respond to my request. I have been talking for a few days with them now.. Maybe the will see it through to the 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.

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