Running Redmine with Puma behind Nginx

A non-container Redmine deployment uses Puma as the application server, systemd to keep it running and Nginx for TLS, static files and upload limits. This page covers the decisions, build sequence and checks.

On this page

Running Redmine with Puma behind Nginx on a Linux host

A team that already runs Linux servers may prefer to host Redmine directly on them rather than in containers, so the application fits the patching, backup and monitoring routines it already has. In that setup, Puma serves the Rails application, systemd keeps it running, and Nginx accepts browser traffic, terminates TLS and passes requests on. The rest of this page works through each of those pieces. Redmine is a project management web application written with the Ruby on Rails framework and released under the GNU General Public License v2. Its core features include multiple projects, flexible role-based access control, issue tracking, Gantt charts, wikis, time tracking and custom fields, so the server you build will carry project data that many people depend on.

A host install suits teams that already have Linux administrators, configuration management and a standard way to handle service accounts, certificates and log rotation. It also suits organizations that want every component visible to their own staff. The trade-off is that the team owns every layer: the Ruby version, the Gemfile customizations, the database, the reverse proxy and the upgrade sequence. Confirm before you start which Ruby versions your chosen Redmine release supports, because the installation guide lists them per release, and confirm which database you will run, since that choice shapes the Puma and systemd configuration as much as anything else.

Plan around one fact from the start: Redmine 7.0.x is the only fully supported line. Redmine 6.1.x receives only bug fixes and security updates, 6.0.x receives only important security updates, and 5.1.x and older are unsupported. A new host deployment should therefore target 7.0.x unless a specific constraint prevents it. Check the Redmine download page for the current stable release on the day you build, because point releases in each line change over time.

What each component does in this deployment

A non-container Redmine install is a chain of separate pieces: the application code, the Ruby server that runs it, the supervisor that keeps that server alive, the proxy that faces users, and the database behind it. A background job queue sits alongside them for work that should not hold up a web request. Knowing which file or unit controls each piece tells you where to look first when something breaks.

Redmine application and Gemfile.local

This is the Rails application itself, unpacked from the release archive into a directory such as /var/www/redmine. Production-only gems, including Puma, are not in the core Gemfile, so they are added through Gemfile.local in the same directory. Keep that file under version control or in your configuration backup, because an upgrade replaces the core Gemfile and your additions must survive it. Check that bundle install completes with Gemfile.local present before you rely on it.

Installation guide

Puma as the application server

Puma is the Ruby process that loads Redmine and answers HTTP requests forwarded from Nginx. It listens on a local socket or port rather than the public network, and its worker and thread settings control how many requests it handles at once. Confirm the Puma version against your Ruby and Rails versions, and size the settings by testing under realistic load, since the right values depend on your hardware and user count. Puma also reads the Redmine config/database.yml and config/configuration.yml files at start.

systemd as the process supervisor

A systemd unit file, typically under /etc/systemd/system/, starts Puma at boot, restarts it after a crash and sets the working directory, user and environment variables such as RAILS_ENV=production. Running Puma as a dedicated, non-root account keeps the blast radius small if the application is compromised. Check the unit's Restart= behavior and confirm that logs reach the journal or a file you monitor, since a service that restarts silently can hide a failing deployment.

Nginx as TLS terminator and static server

Nginx accepts public HTTPS connections, presents the certificate, and forwards application requests to Puma over the local socket or port. It can also serve the precompiled assets under public/ directly, which keeps static file traffic away from Ruby. Two settings need attention: client_max_body_size, which caps uploads and will reject attachments larger than the limit before Redmine sees them, and the proxy headers that Rails uses to build correct links and detect HTTPS. Test an upload near your limit after every change.

Production database

Redmine stores issues, users, projects and settings in a relational database, configured in config/database.yml. The supported engines are PostgreSQL, MySQL and SQL Server, with SQLite documented as unsuitable for multi-user production. The database is the component you must back up most carefully, since application files can be redeployed but lost issue history cannot. Confirm the engine and version against the installation guide before you install, and check the MySQL transaction isolation setting if you choose MySQL.

Supported databases

Sidekiq or the background job queue

Some Redmine work, such as sending email and other slow tasks, can run outside the web request so that users do not wait on it. The installation guide lists Sidekiq as the production option for background job queues, and it needs its own process and a Redis service. Ask whether your version and plugins require the queue before going live, because a stopped worker can leave email quietly undelivered. Give this worker its own systemd unit so you can monitor it separately from Puma.

Installation guide

Which options to decide before installing

This table compares the choices that change the build: the application server, how Nginx reaches Puma, the service account, the URL layout and the database. Read each row against your hosting plan, and treat the right-hand column as the point where the choice is settled before any files are written.

DecisionOptionTrade-offChoose it when
Application serverPumaShips with Rails and runs Redmine's standard production setup; you add it through Gemfile.local rather than replacing the stack.You want the server path most documented for Redmine on a Linux host.
Application serverOther Ruby serversEach adds its own configuration, service file and upgrade checks that you must test and own.Your organization already standardizes on another Ruby server and has staff to maintain it.
Nginx to Puma linkUnix socketAvoids a open network port and keeps traffic local, but the socket path and file permissions must match Nginx and the service user.Nginx and Puma run on the same host and you want the tighter default.
Nginx to Puma linkTCP port on localhostEasier to debug with curl and simpler to move between hosts, but any local process can reach the port unless the firewall or bind address restricts it.Your tooling or container layout expects a port, and the bind address is limited to loopback.
Service accountDedicated system user under systemdLimits what the Redmine process can write, and the files directory and log paths need explicit ownership set during the build.You need a clear boundary between the application and other services on the host, which most regulated setups do.
URL layoutNginx at the root of a hostnameKeeps asset paths, email links and plugin URLs at their defaults, so there are fewer settings to check later.Redmine gets its own hostname, such as tracker.example.com.
URL layoutSub-URI such as /redmineRequires the relative URL root to be set before asset precompilation, plus matching proxy rules and email link settings. Confirm the details in the sibling topic on serving Redmine under a sub-URI.The hostname is shared with other applications and a path prefix is an existing rule.
DatabasePostgreSQLThe most common production choice among the supported databases, with its own backup tooling and server to operate.You have or want a managed or well-run PostgreSQL service and standard backup practice.
DatabaseMySQL 8.0 to 8.4Requires transaction isolation set to READ COMMITTED, and the adapter and settings need checking at each upgrade.Your database team already runs MySQL in this version range and can enforce the isolation setting.
DatabaseSQL Server 2012 or higher, or SQLiteSQL Server must be a supported release, and the operating and tooling work is specific to it. The installation guide says SQLite is not suited to multi-user production use.SQL Server is a fixed organizational standard. Use SQLite only for a test or a single-user trial.

How to build the Puma and Nginx stack, step by step

This sequence takes a Linux host from a supported Ruby and database base to a Redmine instance served by Puma under systemd and fronted by Nginx with TLS, with each step closed by a check you can run.

  1. Confirm the Ruby and Rails base

    Before installing anything, confirm which Redmine line you are deploying. Redmine 7.0 runs on Rails 8.1 and supports Ruby 3.2, 3.3, 3.4 and 4.0, and it does not support JRuby. Check the installed Ruby with ruby -v and record the version in your build notes. Redmine 7.0 is the only fully supported line, so pin it deliberately rather than taking whatever the distribution packages. The step is done when the Ruby version is on the supported list and the target Redmine version is written down with its release date from the download page.

  2. Install system packages and the production database

    Install the build tools, the Ruby toolchain, Nginx, and your chosen production database. Redmine supports PostgreSQL, MySQL 8.0 to 8.4 with transaction isolation set to READ COMMITTED, SQL Server 2012 or higher, and SQLite, which the installation guide says is not suited to multi-user production use. Create a dedicated database and a database user with rights limited to that database. Optional tools such as ImageMagick, Ghostscript and Pandoc can be added now or later for previews. The step is done when the database server accepts a login with the new user and nginx -v returns a version.

  3. Deploy the Redmine files and a service account

    Create a non-login system account, for example redmine, and unpack the official Redmine release into a versioned directory such as /opt/redmine, with a symbolic link pointing to the active version. Copy config/database.yml.example to config/database.yml and set the production connection details. Create the files, log and tmp directories and give the service account write access only to those paths. The step is done when ls -l /opt/redmine shows the active link and the service account can write to files but cannot write to the application code.

  4. Add Puma through Gemfile.local

    Create Gemfile.local in the Redmine root and declare the puma gem in the production group, so Redmine's own Gemfile stays unchanged and upgrades remain simple. Run bundle config set --local without 'development test' and then bundle install. Confirm the gem resolved with bundle list | grep puma. The step is done when Bundler reports no missing gems and Puma appears in the list of installed gems for the production group.

  5. Generate the secret, migrate and precompile assets

    Run bundle exec rake generate_secret_token to create the secret used for session signing, and store it outside the code tree with restricted permissions. Then run RAILS_ENV=production bundle exec rake db:migrate and RAILS_ENV=production bundle exec rake redmine:plugins:migrate if plugins are installed, followed by RAILS_ENV=production bundle exec rake assets:precompile. If Redmine will be served under a sub-path, set the relative URL root before precompiling. The step is done when migrations finish without errors and the public/assets directory is populated.

  6. Create the Puma systemd unit

    Write a unit file, for example /etc/systemd/system/redmine.service, that runs Puma from the Redmine directory as the service account with RAILS_ENV=production. Bind Puma to a Unix socket inside the Redmine directory or a runtime path, so Nginx can reach it without opening a TCP port. Set Restart=on-failure, then run systemctl daemon-reload and systemctl enable --now redmine. Confirm the service with systemctl status redmine and check that the socket file exists. The step is done when the unit shows active (running) and the socket is present with the expected owner.

  7. Configure the Nginx server block with TLS and static paths

    Create a server block that terminates TLS with a certificate issued for your hostname and proxies requests to the Puma socket with proxy_pass. Serve public/ directly from Nginx so that static assets bypass Puma, and set forwarded headers so Redmine sees the original scheme and host. Test the file with nginx -t, reload Nginx, and then request the site locally with `curl -I adding a resolve option if DNS is not yet pointed at the host. The step is done when the configuration test passes and the response is an HTTP 200 or a redirect to the login page over HTTPS.

  8. Set the upload limit and confirm file and log locations

    Set client_max_body_size in the Nginx server block to the largest attachment you intend to accept, and confirm that the value matches the Redmine attachment policy so users do not receive opaque errors. Confirm that the attachments storage path in the Redmine configuration points to the files directory and that the service account can write to it. Confirm the production log location under the Redmine log directory and the Nginx error log path. Finish with a test upload of a small file through the web interface, then check that the file appears under the files directory and that the log shows the request. The step is done when the test file is stored, the log records the upload, and no 413 error is returned.

How static assets, upload limits and logs fit together

Nginx should answer requests for precompiled assets directly from Redmine's public directory and pass everything else to Puma over a local socket or port. Redmine serves its stylesheets, JavaScript and images from public/assets after RAILS_ENV=production rake assets:precompile has run, so the Nginx server block needs a location that serves that path with long cache headers and falls back to the proxy for dynamic routes. Confirm the precompile step ran after each upgrade, because stale assets are a common cause of broken pages that look like application faults. The Redmine installation guide describes the production setup these steps assume.

The proxy's client body limit must match what Redmine accepts for attachments, or users see generic upload failures that never reach the application log. Set client_max_body_size in Nginx to a value at least as large as the largest attachment your policy allows, and check the file size limit in Redmine's own settings so the two agree. Also plan the attachment path now: the upgrade guide expects the uploaded files to be backed up and copied to the new installation alongside the database, so the directory configured as the attachments storage path needs its own backup job, ownership by the Puma user and enough disk for growth. Changing it later means another migration.

Logs live in three places, and each answers a different question. Redmine writes its production log to log/production.log inside the application directory, which records requests and errors from the Rails application. Puma's output goes to the journal when the service runs under systemd, so journalctl -u with the unit name shows startup failures and worker crashes. Nginx writes access and error logs to its default log directory, usually /var/log/nginx/, and the error log is where a 413 response for an oversized upload appears. Confirm the paths on your distribution and set log rotation for all three before go-live.

How a user request travels from the browser to Redmine

A request starts in the browser and crosses the public network over HTTPS to Nginx, which terminates TLS and serves static assets from disk directly. Dynamic requests are passed over a Unix socket to Puma, which runs the Redmine Rails application. Redmine reads and writes the production database, hands background work such as email to Sidekiq through Redis when that is configured, and stores uploads in a separate files directory. Check that the boundary between the public network and the host is where you expect it, and that the log locations sit on storage you monitor.

Request path from the browser through Nginx and Puma to Redmine and its stores.

Security settings to plan for a host-based Redmine

A host-based Redmine puts the application, the app server and the reverse proxy on machines your team administers, so each layer needs its own settings. The items below are checks to confirm before go-live, not guarantees, and they connect because a gap in one layer, such as an exposed socket or a readable secret, undoes protection built in another.

TLS certificates and protocol settings

Nginx terminates TLS for Redmine, so the certificate chain, private key location and accepted protocol versions all sit in the proxy configuration. Confirm that the key file is readable only by root and the proxy's worker account, that the certificate renews on a schedule someone owns, and that TLS versions and cipher suites follow your organization's baseline. Test the result with an external scanner rather than trusting the config file alone.

Redmine install guide

Puma socket and file permissions

Puma usually listens on a Unix socket or a loopback port that only Nginx should reach, and the Redmine files should belong to a dedicated service user rather than a shared administrator account. Check the socket's owner and mode, confirm the systemd unit runs as that user, and make sure the application directory is not writable by the web process beyond the paths Redmine needs, such as files and log.

Secret key base and database credentials

The secret key base signs session cookies, and the database password grants full access to project data. Keep both in a file outside the Git-tracked application tree, such as an environment file owned by root with restricted read permissions, and confirm that config/database.yml reads values from that source instead of containing literal passwords. Plan how the secret is rotated, since rotating it signs out every active user.

Access to log files

Redmine's production log records request paths, user activity and error details that can include personal data, and Nginx access logs add client addresses. Confirm which logs exist, who may read them, how long they are kept and whether they are rotated and deleted on a documented schedule. Keep log directories off public paths and check that the proxy does not serve them as static files.

Applying security releases

Redmine 7.0.x is the fully supported line and receives security updates, while 6.1.x and 6.0.x receive only some fixes and 5.1.x and older receive none. Confirm which line you run, subscribe to the download page for new releases, and agree who applies a security update and how fast. Include Puma, Nginx and the operating system packages in the same patch routine.

Redmine download page

Network reachability of the server

A host-based Redmine should accept connections only from the networks your team uses, such as the corporate range or a VPN, and only on ports 80 and 443 for the proxy. Confirm that Puma's port is closed to other hosts, that SSH is limited to administrators, and that the firewall rules are recorded in your change process. Verify the policy from outside the allowed network.

Questions teams ask before running Redmine on Puma and Nginx

What does it cost to run Redmine on Puma and Nginx?

Redmine itself has no license fee, since it is free under GPL v2, so the cost comes from the work around it. The main components are the Linux host or cloud instance, the database, mail relay, TLS certificates, the implementation work to install and configure the stack, any paid plugins, and the people who patch and upgrade it over time. Hosting and certificates recur every year, while implementation is usually one-time. The biggest cost drivers are the number of users, the number of plugins and whether plugins must be rebuilt for each upgrade. Ask any quote to itemize these components and state which items are one-time and which recur.

How long does a Puma and Nginx build take?

Duration depends on the scope agreed in writing before work starts, and no fixed timeline applies to every environment. A basic single-host install with a supported database is shorter than a build that adds TLS with internal certificate authorities, sub-URI hosting, Sidekiq background jobs, upload limits tuned for large attachments, and plugin installation. Delays usually come from waiting on DNS records, certificate issuance, firewall changes and mail relay access, not from the Redmine configuration itself. Ask the provider to list the dependencies on your side and the tasks that depend on them, so the schedule reflects your change process.

What must our team provide before the deployment starts?

Plan to supply a Linux host with root or sudo access, a DNS name for the Redmine site, a TLS certificate or access to your internal certificate authority, a database server or permission to create one, and an SMTP relay that accepts mail from the Redmine host. You also need a place for uploaded files with enough disk space and a backup target. Confirm firewall rules for ports 80 and 443 and for database and relay traffic. Missing any of these items is the most common reason a fixed schedule slips, so resolve them in the scope document.

Can our internal team deploy Redmine on Puma and Nginx without a partner?

Yes, an experienced Linux and Ruby on Rails operations team can do the work, and the Redmine installation guide describes the steps. The team needs working knowledge of Linux services and systemd, Nginx configuration, TLS, database administration, Ruby gem management with Bundler, and basic Rails operations such as running migrations and clearing the cache. Plugin compatibility and the upgrade procedure add further skill requirements. Assess these skills honestly, then decide whether the team will own the setup after launch, because that ongoing ownership is usually the larger effort.

How do upgrades to Redmine 7.0 affect the Puma and Nginx setup?

The upgrade changes the application, so the Puma and Nginx layer must be checked after each step. Redmine 7.0 runs on Rails 8.1 and supports Ruby 3.2, 3.3, 3.4 and 4.0, so the Ruby version and the Gemfile.local Puma entry must be validated against the new release. The upgrade guide calls for backing up the database and uploaded files, copying configuration, uploads and third-party plugins to the new installation, running db:migrate and redmine:plugins:migrate, clearing the cache, and then restarting the service. Nginx settings such as upload size limits and static asset paths usually carry over, but test them during the upgrade window.

Should we buy a fixed-scope engagement or a retainer for ongoing support?

A fixed-scope engagement suits the initial build, because scope, deliverables and timelines are agreed in writing before work starts. A retainer suits continuing needs such as upgrades, plugin maintenance, security patching, monitoring of the Puma service and recovery testing. Choose a fixed scope when the boundaries are clear, and a retainer when you expect regular changes to plugins or versions. Either way, ask for a written statement of what is covered, how security releases are handled, and how the work is billed, so the arrangement matches your internal change control.

What to confirm in your environment before going live

Start by confirming the Ruby and Rails versions your chosen Redmine release requires, because the answer depends on the exact release you install. Redmine 7.0 runs on Rails 8.1 and supports Ruby 3.2, 3.3, 3.4 and 4.0, but your operating system package for Ruby may not match any of those. Check the Redmine installation guide against the release you have chosen, then confirm which Puma and Nginx versions your distribution ships and whether their repositories provide versions you can pin and patch. Record these in your build notes so a future upgrade does not depend on memory.

Next, confirm the limits that sit in front of Redmine. Nginx has its own request body size setting, and a load balancer, cloud ingress or web application firewall in front of it may add a second limit that rejects large attachments before Nginx sees them. Test an upload close to your intended maximum through the full path, not only against localhost. On the database side, confirm the exact PostgreSQL or MySQL version you run. For MySQL, the transaction isolation level must be READ COMMITTED, so check the server setting rather than the value in a config file. Also confirm how your certificate authority issues and renews certificates, who owns renewal, and whether an expired certificate would trigger an alert.

Finally, decide how users will sign in. Redmine authenticates against LDAP natively, but single sign-on through SAML or OpenID Connect is not part of core Redmine. You must choose between a plugin that supports your protocol, an authenticating reverse proxy that passes identity headers, or keeping local accounts with LDAP. Each option changes the Nginx configuration, the trust boundary and the upgrade effort, so settle it before go-live. Confirm with your identity team who will own that integration after launch.

How DeployOpen scopes and delivers a Puma and Nginx Redmine

DeployOpen plans, builds, documents and supports self-hosted Redmine inside your own servers or data center, including the Puma application service, systemd unit, Nginx reverse proxy and TLS termination. The work is agreed in a written, fixed scope before the build starts, so the server layout, upload limits and log locations are settled with your team first.

How we scope

  • Confirm the Redmine version, Ruby version and production database before choosing the Puma and Gemfile.local approach.
  • Record the hostname, TLS certificate source, upload size limit and whether Redmine runs at the root or under a sub-path.
  • Agree in writing which Nginx, systemd and logging items are in scope, and which Sidekiq or attachment work is handled separately.

How we build

  • Add Puma through Gemfile.local, install gems and precompile assets on the target host, and verify the Rails boot.
  • Write the systemd service unit with restart policy, environment file for secrets, and the Puma socket or port binding.
  • Configure Nginx with TLS, static asset serving from the public directory, client body size matching the Redmine upload limit, and proxy headers.

How we hand over

  • Test uploads at the configured size limit, login over HTTPS, asset loading, and service restart after a host reboot.
  • Document file paths for the Redmine application, Nginx site configuration, systemd unit, and the Puma, Nginx and Redmine log locations.
  • Deliver a runbook covering how to restart Puma, reload Nginx, rotate logs and apply future Redmine upgrades to this layout.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer, so the layout keeps pace with Redmine releases.
  • Ask for the retainer scope in writing, including who patches Nginx, Puma and Ruby, and how security releases are applied.
  • Confirm with your team how certificate renewal and log retention are owned after handover, since these recur for the life of the system.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.