gem version

Deployment: installations

Relevant selections for this article:

Ruby Nginx

Before deploying your app you have to make sure that Ruby and Passenger Enterprise are installed.

Did you already install Ruby?

Installing Ruby with RVM

Before you can deploy your app on the production server, you need to install Ruby. In this tutorial we recommend that you use Ruby Version Manager (RVM) for this purpose. RVM is a tool for installing and managing multiple Ruby versions.

There are other ways to install Ruby, e.g. through yum, apt-get, source tarball, rbenv and chruby. You can use one of those other installation methods if you so wish, and this tutorial will work fine even if you installed Ruby using one of those other installation methods. But the one that we recommend in this tutorial is RVM, because in our opinion it is the easiest option.

Prepare the system

Ensure that curl and gpg are installed, as well as a compiler toolchain. Curl and gpg are needed for further installation steps, while the compiler toolchain is needed for installing common Ruby gems.

Debian, Ubuntu
$ sudo apt-get update
$ sudo apt-get install -y curl gnupg build-essential
Red Hat, CentOS, Rocky, Alma, Fedora, Amazon Linux, Scientific Linux
$ sudo yum install -y curl gpg gcc gcc-c++ make which tar
macOS You don't have to do anything. They are already installed.

Install RVM

Run the following commands on your production server to install RVM:

$ sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
$ curl -sSL https://get.rvm.io | sudo bash -s stable
$ sudo usermod -a -G rvm `whoami`

You may need to use gpg2 instead of gpg on some systems.

On systems where sudo is configured with secure_path, the shell environment needs to be modified to set rvmsudo_secure_path=1. secure_path is set on most Linux systems, but not on macOS. The following command tries to autodetect whether it is necessary to install rvmsudo_secure_path=1, and only installs the environment variable if it is the code.

$ if sudo grep -q secure_path /etc/sudoers; then sudo sh -c "echo export rvmsudo_secure_path=1 >> /etc/profile.d/rvm_secure_path.sh" && echo Environment variable installed; fi

When you are done with all this, relogin to your server to activate RVM. This is important: if you don't relogin, RVM doesn't work. Also if you use gnu screen or another terminal multiplexer, RVM also won't work; you must use a plain ssh session.

Install the Ruby version you want

Usually, installing the latest Ruby version will suffice. If you are deploying the example app from the quickstart, then that example application works with all Ruby versions.

However, if you are deploying your own app, then your app may have a specific Ruby version requirement.

To install the latest version of Ruby, run:

$ rvm install ruby
$ rvm --default use ruby

To install a specific version of Ruby, run:

$ rvm install ruby-X.X.X
$ rvm --default use ruby-X.X.X

Replace X.X.X with the Ruby version you want.

Install Bundler

Bundler is a popular tool for managing application gem dependencies. We will use Bundler in this tutorial, so let us install it:

$ gem install bundler --no-rdoc --no-ri

Optional: install Node.js if you're using Rails

If you are using Rails, then you must install Node.js. This is because Rails's asset pipeline compiler requires a Javascript runtime. The Node.js version does not matter.

If you do not use Rails then you can skip to the next step.

To install Node.js:

Ubuntu
$ sudo apt-get install -y nodejs &&
$ sudo ln -sf /usr/bin/nodejs /usr/local/bin/node
Debian ≥ 7 (Wheezy or later)

Run the following commands to install Node.js from the NodeSource APT repository.

$ sudo apt-get update &&
$ sudo apt-get install -y apt-transport-https ca-certificates &&
$ curl --fail -ssL -o setup-nodejs https://deb.nodesource.com/setup_8.x &&
$ sudo bash setup-nodejs &&
$ sudo apt-get install -y nodejs build-essential
Red Hat, CentOS, Rocky, Alma, Fedora, Amazon Linux, Scientific Linux
$ sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(< /etc/redhat-release tr -dc '0-9.'|cut -d \. -f1).noarch.rpm
$ sudo yum install -y --enablerepo=epel nodejs npm
Other operating systems Please install Node.js from www.nodejs.org.

Heads-up: sudo vs rvmsudo

One thing you should be aware of when using RVM, is that you should use rvmsudo instead of sudo when executing Ruby-related commands. This is because RVM works by manipulating environment variables. However, sudo nukes all environment variables for security reasons, which intereferes with RVM.

Visit the RVM website to learn more about rvmsudo.

All done!

Congratulations, you have now installed Ruby!

Installing Passenger Enterprise + on a production server

Now it is time to install Passenger Enterprise. Please start by selecting the operating system that your server is running on, or an installation method that you prefer.

Loading...

Step 1: download and install your license key

Before you can install Passenger Enterprise, you need to download and install your license key. This is a regular file that you need to copy to your production server.

Please login to the Passenger Enterprise Customer Area.

Customer Area login screen

Click on the Install button in the Customer Area.

Customer Area install button

Click on the button to download the license key.

License key download button in the Customer Area

The license key will be downloaded to your local computer. Copy this license key file to your production server, for example using scp:

local-computer$ cd /path-to-your-local-computer-download-folder
local-computer$ scp passenger-enterprise-license adminuser@yourserver.com:

Replace adminuser with the name of an account with administrator privileges or sudo privileges.

Finally, login to your production server and save the file as /etc/passenger-enterprise-license:

local-computer$ ssh adminuser@yourserver.com
production-server$ sudo mv passenger-enterprise-license /etc/passenger-enterprise-license
production-server$ chmod 644 /etc/passenger-enterprise-license

Step 2: obtain your download token

Your download token is needed in order to install Passenger Enterprise. In the Customer Area, find your download token and copy it to your clipboard.

Exhibit of the download token in the Customer Area

Step 3: install Passenger package

You can install Passenger through Homebrew:

$ brew tap phusion/passenger
$ brew install passenger-enterprise

You will be prompted to provide your download token when you install Passenger Enterprise through Homebrew, to avoid this prompt create a file at `~/.passenger-enterprise-download-token` containing only your token.

Step 4: check installation

After installation, please validate the install by running sudo /usr/local/bin/passenger-config validate-install. For example:

$ sudo /usr/local/bin/passenger-config validate-install
 * Checking whether this Phusion Passenger install is in PATH... ✓
 * Checking whether there are no other Phusion Passenger installations... ✓

All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.

Step 1: download and install your license key

Before you can install Passenger Enterprise, you need to download and install your license key. This is a regular file that you need to copy to your production server.

Please login to the Passenger Enterprise Customer Area.

Customer Area login screen

Click on the Install button in the Customer Area.

Customer Area install button

Click on the button to download the license key.

License key download button in the Customer Area

The license key will be downloaded to your local computer. Copy this license key file to your production server, for example using scp:

local-computer$ cd /path-to-your-local-computer-download-folder
local-computer$ scp passenger-enterprise-license adminuser@yourserver.com:

Replace adminuser with the name of an account with administrator privileges or sudo privileges.

Finally, login to your production server and save the file as /etc/passenger-enterprise-license:

local-computer$ ssh adminuser@yourserver.com
production-server$ sudo mv passenger-enterprise-license /etc/passenger-enterprise-license
production-server$ chmod 644 /etc/passenger-enterprise-license

Step 2: obtain your download token

Your download token is needed in order to install Passenger Enterprise. In the Customer Area, find your download token and copy it to your clipboard.

Exhibit of the download token in the Customer Area

Step 3: install Passenger packages

These commands will install Passenger Enterprise through Phusion's APT repository. Replace YOUR_DOWNLOAD_TOKEN with the download token you obtained in the last step.

# Install our PGP key and add HTTPS support for APT
sudo apt-get install -y dirmngr gnupg apt-transport-https ca-certificates curl

curl https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/phusion.gpg >/dev/null

# Add our APT repository
unset HISTFILE
sudo sh -c 'echo machine www.phusionpassenger.com/enterprise_apt login download password YOUR_DOWNLOAD_TOKEN >> /etc/apt/auth.conf'
sudo sh -c 'echo deb https://www.phusionpassenger.com/enterprise_apt bookworm main > /etc/apt/sources.list.d/passenger.list'
sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 644 /etc/apt/sources.list.d/passenger.list
sudo chown root: /etc/apt/auth.conf
sudo chmod 600 /etc/apt/auth.conf
sudo apt-get update

# Install Passenger Enterprise
sudo apt-get install -y passenger-enterprise

Step 4: check installation

After installation, please validate the install by running sudo /usr/bin/passenger-config validate-install. For example:

$ sudo /usr/bin/passenger-config validate-install
 * Checking whether this Phusion Passenger install is in PATH... ✓
 * Checking whether there are no other Phusion Passenger installations... ✓

All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.

Step 5: update regularly

Passenger updates and system updates are delivered through the APT package manager regularly. You should run the following command regularly to keep them up to date:

$ sudo apt-get update
$ sudo apt-get upgrade

After an update, you should restart all your Passenger instances so that the updates take effect.

Step 1: download and install your license key

Before you can install Passenger Enterprise, you need to download and install your license key. This is a regular file that you need to copy to your production server.

Please login to the Passenger Enterprise Customer Area.

Customer Area login screen

Click on the Install button in the Customer Area.

Customer Area install button

Click on the button to download the license key.

License key download button in the Customer Area

The license key will be downloaded to your local computer. Copy this license key file to your production server, for example using scp:

local-computer$ cd /path-to-your-local-computer-download-folder
local-computer$ scp passenger-enterprise-license adminuser@yourserver.com:

Replace adminuser with the name of an account with administrator privileges or sudo privileges.

Finally, login to your production server and save the file as /etc/passenger-enterprise-license:

local-computer$ ssh adminuser@yourserver.com
production-server$ sudo mv passenger-enterprise-license /etc/passenger-enterprise-license
production-server$ chmod 644 /etc/passenger-enterprise-license

Step 2: obtain your download token

Your download token is needed in order to install Passenger Enterprise. In the Customer Area, find your download token and copy it to your clipboard.

Exhibit of the download token in the Customer Area

Step 3: install Passenger packages

These commands will install Passenger Enterprise through Phusion's APT repository. Replace YOUR_DOWNLOAD_TOKEN with the download token you obtained in the last step.

# Install our PGP key and add HTTPS support for APT
sudo apt-get install -y dirmngr gnupg apt-transport-https ca-certificates curl

curl https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/phusion.gpg >/dev/null

# Add our APT repository
unset HISTFILE
sudo sh -c 'echo machine www.phusionpassenger.com/enterprise_apt login download password YOUR_DOWNLOAD_TOKEN >> /etc/apt/auth.conf'
sudo sh -c 'echo deb https://www.phusionpassenger.com/enterprise_apt bullseye main > /etc/apt/sources.list.d/passenger.list'
sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 644 /etc/apt/sources.list.d/passenger.list
sudo chown root: /etc/apt/auth.conf
sudo chmod 600 /etc/apt/auth.conf
sudo apt-get update

# Install Passenger Enterprise
sudo apt-get install -y passenger-enterprise

Step 4: check installation

After installation, please validate the install by running sudo /usr/bin/passenger-config validate-install. For example:

$ sudo /usr/bin/passenger-config validate-install
 * Checking whether this Phusion Passenger install is in PATH... ✓
 * Checking whether there are no other Phusion Passenger installations... ✓

All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.

Step 5: update regularly

Passenger updates and system updates are delivered through the APT package manager regularly. You should run the following command regularly to keep them up to date:

$ sudo apt-get update
$ sudo apt-get upgrade

After an update, you should restart all your Passenger instances so that the updates take effect.

Step 1: download and install your license key

Before you can install Passenger Enterprise, you need to download and install your license key. This is a regular file that you need to copy to your production server.

Please login to the Passenger Enterprise Customer Area.

Customer Area login screen

Click on the Install button in the Customer Area.

Customer Area install button

Click on the button to download the license key.

License key download button in the Customer Area

The license key will be downloaded to your local computer. Copy this license key file to your production server, for example using scp:

local-computer$ cd /path-to-your-local-computer-download-folder
local-computer$ scp passenger-enterprise-license adminuser@yourserver.com:

Replace adminuser with the name of an account with administrator privileges or sudo privileges.

Finally, login to your production server and save the file as /etc/passenger-enterprise-license:

local-computer$ ssh adminuser@yourserver.com
production-server$ sudo mv passenger-enterprise-license /etc/passenger-enterprise-license
production-server$ chmod 644 /etc/passenger-enterprise-license

Step 2: obtain your download token

Your download token is needed in order to install Passenger Enterprise. In the Customer Area, find your download token and copy it to your clipboard.

Exhibit of the download token in the Customer Area

Step 3: install Passenger packages

These commands will install Passenger Enterprise through Phusion's APT repository. Replace YOUR_DOWNLOAD_TOKEN with the download token you obtained in the last step.

# Install our PGP key and add HTTPS support for APT
sudo apt-get install -y dirmngr gnupg apt-transport-https ca-certificates curl

curl https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/phusion.gpg >/dev/null

# Add our APT repository
unset HISTFILE
sudo sh -c 'echo machine www.phusionpassenger.com/enterprise_apt login download password YOUR_DOWNLOAD_TOKEN >> /etc/apt/auth.conf'
sudo sh -c 'echo deb https://www.phusionpassenger.com/enterprise_apt noble main > /etc/apt/sources.list.d/passenger.list'
sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 644 /etc/apt/sources.list.d/passenger.list
sudo chown root: /etc/apt/auth.conf
sudo chmod 600 /etc/apt/auth.conf
sudo apt-get update

# Install Passenger Enterprise
sudo apt-get install -y passenger-enterprise

Step 4: check installation

After installation, please validate the install by running sudo /usr/bin/passenger-config validate-install. For example:

$ sudo /usr/bin/passenger-config validate-install
 * Checking whether this Phusion Passenger install is in PATH... ✓
 * Checking whether there are no other Phusion Passenger installations... ✓

All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.

Step 5: update regularly

Passenger updates and system updates are delivered through the APT package manager regularly. You should run the following command regularly to keep them up to date:

$ sudo apt-get update
$ sudo apt-get upgrade

After an update, you should restart all your Passenger instances so that the updates take effect.

Step 1: download and install your license key

Before you can install Passenger Enterprise, you need to download and install your license key. This is a regular file that you need to copy to your production server.

Please login to the Passenger Enterprise Customer Area.

Customer Area login screen

Click on the Install button in the Customer Area.

Customer Area install button

Click on the button to download the license key.

License key download button in the Customer Area

The license key will be downloaded to your local computer. Copy this license key file to your production server, for example using scp:

local-computer$ cd /path-to-your-local-computer-download-folder
local-computer$ scp passenger-enterprise-license adminuser@yourserver.com:

Replace adminuser with the name of an account with administrator privileges or sudo privileges.

Finally, login to your production server and save the file as /etc/passenger-enterprise-license:

local-computer$ ssh adminuser@yourserver.com
production-server$ sudo mv passenger-enterprise-license /etc/passenger-enterprise-license
production-server$ chmod 644 /etc/passenger-enterprise-license

Step 2: obtain your download token

Your download token is needed in order to install Passenger Enterprise. In the Customer Area, find your download token and copy it to your clipboard.

Exhibit of the download token in the Customer Area

Step 3: install Passenger packages

These commands will install Passenger Enterprise through Phusion's APT repository. Replace YOUR_DOWNLOAD_TOKEN with the download token you obtained in the last step.

# Install our PGP key and add HTTPS support for APT
sudo apt-get install -y dirmngr gnupg apt-transport-https ca-certificates curl

curl https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/phusion.gpg >/dev/null

# Add our APT repository
unset HISTFILE
sudo sh -c 'echo machine www.phusionpassenger.com/enterprise_apt login download password YOUR_DOWNLOAD_TOKEN >> /etc/apt/auth.conf'
sudo sh -c 'echo deb https://www.phusionpassenger.com/enterprise_apt jammy main > /etc/apt/sources.list.d/passenger.list'
sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 644 /etc/apt/sources.list.d/passenger.list
sudo chown root: /etc/apt/auth.conf
sudo chmod 600 /etc/apt/auth.conf
sudo apt-get update

# Install Passenger Enterprise
sudo apt-get install -y passenger-enterprise

Step 4: check installation

After installation, please validate the install by running sudo /usr/bin/passenger-config validate-install. For example:

$ sudo /usr/bin/passenger-config validate-install
 * Checking whether this Phusion Passenger install is in PATH... ✓
 * Checking whether there are no other Phusion Passenger installations... ✓

All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.

Step 5: update regularly

Passenger updates and system updates are delivered through the APT package manager regularly. You should run the following command regularly to keep them up to date:

$ sudo apt-get update
$ sudo apt-get upgrade

After an update, you should restart all your Passenger instances so that the updates take effect.

Step 1: download and install your license key

Before you can install Passenger Enterprise, you need to download and install your license key. This is a regular file that you need to copy to your production server.

Please login to the Passenger Enterprise Customer Area.

Customer Area login screen

Click on the Install button in the Customer Area.

Customer Area install button

Click on the button to download the license key.

License key download button in the Customer Area

The license key will be downloaded to your local computer. Copy this license key file to your production server, for example using scp:

local-computer$ cd /path-to-your-local-computer-download-folder
local-computer$ scp passenger-enterprise-license adminuser@yourserver.com:

Replace adminuser with the name of an account with administrator privileges or sudo privileges.

Finally, login to your production server and save the file as /etc/passenger-enterprise-license:

local-computer$ ssh adminuser@yourserver.com
production-server$ sudo mv passenger-enterprise-license /etc/passenger-enterprise-license
production-server$ chmod 644 /etc/passenger-enterprise-license

Step 2: obtain your download token

Your download token is needed in order to install Passenger Enterprise. In the Customer Area, find your download token and copy it to your clipboard.

Exhibit of the download token in the Customer Area

Step 3: install Passenger packages

These commands will install Passenger Enterprise through Phusion's APT repository. Replace YOUR_DOWNLOAD_TOKEN with the download token you obtained in the last step.

# Install our PGP key and add HTTPS support for APT
sudo apt-get install -y dirmngr gnupg apt-transport-https ca-certificates 

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7

# Add our APT repository
unset HISTFILE
sudo sh -c 'echo machine www.phusionpassenger.com/enterprise_apt login download password YOUR_DOWNLOAD_TOKEN >> /etc/apt/auth.conf'
sudo sh -c 'echo deb https://www.phusionpassenger.com/enterprise_apt focal main > /etc/apt/sources.list.d/passenger.list'
sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 644 /etc/apt/sources.list.d/passenger.list
sudo chown root: /etc/apt/auth.conf
sudo chmod 600 /etc/apt/auth.conf
sudo apt-get update

# Install Passenger Enterprise
sudo apt-get install -y passenger-enterprise

Step 4: check installation

After installation, please validate the install by running sudo /usr/bin/passenger-config validate-install. For example:

$ sudo /usr/bin/passenger-config validate-install
 * Checking whether this Phusion Passenger install is in PATH... ✓
 * Checking whether there are no other Phusion Passenger installations... ✓

All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.

Step 5: update regularly

Passenger updates and system updates are delivered through the APT package manager regularly. You should run the following command regularly to keep them up to date:

$ sudo apt-get update
$ sudo apt-get upgrade

After an update, you should restart all your Passenger instances so that the updates take effect.

Step 1: download and install your license key

Before you can install Passenger Enterprise, you need to download and install your license key. This is a regular file that you need to copy to your production server.

Please login to the Passenger Enterprise Customer Area.

Customer Area login screen

Click on the Install button in the Customer Area.

Customer Area install button

Click on the button to download the license key.

License key download button in the Customer Area

The license key will be downloaded to your local computer. Copy this license key file to your production server, for example using scp:

local-computer$ cd /path-to-your-local-computer-download-folder
local-computer$ scp passenger-enterprise-license adminuser@yourserver.com:

Replace adminuser with the name of an account with administrator privileges or sudo privileges.

Finally, login to your production server and save the file as /etc/passenger-enterprise-license:

local-computer$ ssh adminuser@yourserver.com
production-server$ sudo mv passenger-enterprise-license /etc/passenger-enterprise-license
production-server$ chmod 644 /etc/passenger-enterprise-license

Step 2: obtain your download token

Your download token is needed in order to install Passenger Enterprise. In the Customer Area, find your download token and copy it to your clipboard.

Exhibit of the download token in the Customer Area

Step 3: enable EPEL

The instructions differ depending on whether you are on Red Hat or another Enterprise Linux. The second step is only necessary on Red Hat.

Step 1:
install EPEL package
Passenger requires EPEL.
$ sudo dnf install -y dnf-utils
$ sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(< /etc/redhat-release tr -dc '0-9.'|cut -d \. -f1).noarch.rpm
$ sudo dnf config-manager --enable epel
$ sudo dnf clean all && sudo dnf update -y
Step 2 (RHEL only):
enable the 'optional' repository
Enable the optional repository (rhel-9-server-optional-rpms). This can be done by enabling the RHEL optional subchannel for RHN-Classic. For certificate-based subscriptions see Red Hat Subscription Management Guide. The following commands may be helpful, but are not thoroughly tested.
$ sudo subscription-manager register --username $RHN_USERNAME --password $RHN_PASSWORD --auto-attach
$ sudo subscription-manager repos --enable rhel-9-server-optional-rpms

Step 4: repair potential system issues

These commands will fix common issues that prevent dnf from installing Passenger

# Ensure curl and nss/openssl are sufficiently up-to-date to talk to the repo
sudo dnf update -y

date
# if the output of date is wrong, please follow these instructions to install ntp
sudo dnf -y install chrony
sudo systemctl enable chronyd
sudo firewall-cmd --permanent --add-service=ntp
sudo firewall-cmd --reload
sudo systemctl restart chronyd

Step 5: install Passenger packages

These commands will install Passenger Enterprise through Phusion's RPM repository. Replace YOUR_DOWNLOAD_TOKEN with the download token you obtained earlier.

If you want to use our packaged Nginx module, you must use your distro's provided Nginx package. If for example you have the repo provided by NGINX setup, you will instead need to compile a dynamic module compatible with that Nginx.

# Install various prerequisites
sudo dnf install -y  curl

# Add our el9 RPM repository
unset HISTFILE
sudo curl --fail -sSL -u download:YOUR_DOWNLOAD_TOKEN -o /etc/yum.repos.d/passenger.repo https://www.phusionpassenger.com/enterprise_yum/el-passenger-enterprise.repo
sudo chown root: /etc/yum.repos.d/passenger.repo
sudo chmod 600 /etc/yum.repos.d/passenger.repo

# Install Passenger Enterprise
sudo dnf install -y passenger-enterprise || { sudo dnf config-manager --enable cr && sudo dnf install -y passenger-enterprise ; }

Step 6: check installation

After installation, please validate the install by running sudo /usr/bin/passenger-config validate-install. For example:

$ sudo /usr/bin/passenger-config validate-install
 * Checking whether this Phusion Passenger install is in PATH... ✓
 * Checking whether there are no other Phusion Passenger installations... ✓

All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.

Step 7: update regularly

Passenger updates and system updates are delivered through the dnf/yum package manager regularly. You should run the following command regularly to keep them up to date:

$ sudo dnf update

After an update, you should restart all your Passenger instances so that the updates take effect.

Step 1: download and install your license key

Before you can install Passenger Enterprise, you need to download and install your license key. This is a regular file that you need to copy to your production server.

Please login to the Passenger Enterprise Customer Area.

Customer Area login screen

Click on the Install button in the Customer Area.

Customer Area install button

Click on the button to download the license key.

License key download button in the Customer Area

The license key will be downloaded to your local computer. Copy this license key file to your production server, for example using scp:

local-computer$ cd /path-to-your-local-computer-download-folder
local-computer$ scp passenger-enterprise-license adminuser@yourserver.com:

Replace adminuser with the name of an account with administrator privileges or sudo privileges.

Finally, login to your production server and save the file as /etc/passenger-enterprise-license:

local-computer$ ssh adminuser@yourserver.com
production-server$ sudo mv passenger-enterprise-license /etc/passenger-enterprise-license
production-server$ chmod 644 /etc/passenger-enterprise-license

Step 2: obtain your download token

Your download token is needed in order to install Passenger Enterprise. In the Customer Area, find your download token and copy it to your clipboard.

Exhibit of the download token in the Customer Area

Step 3: enable EPEL

The instructions differ depending on whether you are on Red Hat or another Enterprise Linux. The second step is only necessary on Red Hat.

Step 1:
install EPEL package
Passenger requires EPEL.
$ sudo dnf install -y dnf-utils
$ sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(< /etc/redhat-release tr -dc '0-9.'|cut -d \. -f1).noarch.rpm
$ sudo dnf config-manager --enable epel
$ sudo dnf clean all && sudo dnf update -y
Step 2 (RHEL only):
enable the 'optional' repository
Enable the optional repository (rhel-8-server-optional-rpms). This can be done by enabling the RHEL optional subchannel for RHN-Classic. For certificate-based subscriptions see Red Hat Subscription Management Guide. The following commands may be helpful, but are not thoroughly tested.
$ sudo subscription-manager register --username $RHN_USERNAME --password $RHN_PASSWORD --auto-attach
$ sudo subscription-manager repos --enable rhel-8-server-optional-rpms

Step 4: repair potential system issues

These commands will fix common issues that prevent dnf from installing Passenger

# Ensure curl and nss/openssl are sufficiently up-to-date to talk to the repo
sudo dnf update -y

date
# if the output of date is wrong, please follow these instructions to install ntp
sudo dnf -y install chrony
sudo systemctl enable chronyd
sudo firewall-cmd --permanent --add-service=ntp
sudo firewall-cmd --reload
sudo systemctl restart chronyd

Step 5: install Passenger packages

These commands will install Passenger Enterprise through Phusion's RPM repository. Replace YOUR_DOWNLOAD_TOKEN with the download token you obtained earlier.

If you want to use our packaged Nginx module, you must use your distro's provided Nginx package. If for example you have the repo provided by NGINX setup, you will instead need to compile a dynamic module compatible with that Nginx.

# Install various prerequisites
sudo dnf install -y  curl

# Add our el8 RPM repository
unset HISTFILE
sudo curl --fail -sSL -u download:YOUR_DOWNLOAD_TOKEN -o /etc/yum.repos.d/passenger.repo https://www.phusionpassenger.com/enterprise_yum/el-passenger-enterprise.repo
sudo chown root: /etc/yum.repos.d/passenger.repo
sudo chmod 600 /etc/yum.repos.d/passenger.repo

# Install Passenger Enterprise
sudo dnf install -y passenger-enterprise || { sudo dnf config-manager --enable cr && sudo dnf install -y passenger-enterprise ; }

Step 6: check installation

After installation, please validate the install by running sudo /usr/bin/passenger-config validate-install. For example:

$ sudo /usr/bin/passenger-config validate-install
 * Checking whether this Phusion Passenger install is in PATH... ✓
 * Checking whether there are no other Phusion Passenger installations... ✓

All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.

Step 7: update regularly

Passenger updates and system updates are delivered through the dnf/yum package manager regularly. You should run the following command regularly to keep them up to date:

$ sudo dnf update

After an update, you should restart all your Passenger instances so that the updates take effect.

Installation

Step 1: download and install your license key

Before you can install Passenger Enterprise, you need to download and install your license key. This is a regular file that you need to copy to your production server.

Please login to the Passenger Enterprise Customer Area.

Customer Area login screen

Click on the Install button in the Customer Area.

Customer Area install button

Click on the button to download the license key.

License key download button in the Customer Area

The license key will be downloaded to your local computer. Copy this license key file to your production server, for example using scp:

local-computer$ cd /path-to-your-local-computer-download-folder
local-computer$ scp passenger-enterprise-license adminuser@yourserver.com:

Replace adminuser with the name of an account with administrator privileges or sudo privileges.

Finally, login to your production server and save the file as /etc/passenger-enterprise-license:

local-computer$ ssh adminuser@yourserver.com
production-server$ sudo mv passenger-enterprise-license /etc/passenger-enterprise-license
production-server$ chmod 644 /etc/passenger-enterprise-license

Step 2: obtain your download token

Your download token is needed in order to install Passenger Enterprise. In the Customer Area, find your download token and copy it to your clipboard.

Exhibit of the download token in the Customer Area

Step 3: install gem

Add the Passenger Enterprise gem server to your RubyGems source list:

$ unset HISTFILE
$ gem source --add https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_gems/

Substitute YOUR_DOWNLOAD_TOKEN with the one you found in the Customer Area. And notice the trailing slash in the URL! It is very important.

Finally, install Passenger Enterprise gem with:

$ gem install passenger-enterprise-server --no-rdoc --no-ri

The --no-rdoc --no-ri argument isn't really necessary, but it makes installation faster by skipping generation of API documentation.

Did any of the previous commands abort with a "permission denied" error? Then re-run that command with rvmsudo.

Since you are using RVM, don't use sudo! Always use rvmsudo instead when executing Ruby-related commands! Learn more about rvmsudo at the RVM website.

Step 4: validate installation

After installation, please validate the install by running rvmsudo passenger-config validate-install. For example:

$ rvmsudo passenger-config validate-install
 * Checking whether this Phusion Passenger install is in PATH... ✓
 * Checking whether there are no other Phusion Passenger installations... ✓

All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.

FAQ

I have multiple Ruby versions or gemsets. Does it matter which one I use to install Passenger with?

Not really. Passenger doesn't care which Ruby you used to install it; it can still serve Ruby apps with any Ruby version, as long as you tell Passenger which Ruby interpreter you want to use.

You tell Passenger which Ruby interpreter to use by using the --ruby command line option.

Please also read How having multiple Ruby interpreters affects Passenger. In particular, read the RVM-related caveats.

Some of the dependent libraries are installed in non-standard locations. How do I allow the compiler to find them?

Please refer to Customizing the compilation process.

How do I pass additional flags to the compiler?

Please refer to Customizing the compilation process.

Installation

Step 1: download and install your license key

Before you can install Passenger Enterprise, you need to download and install your license key. This is a regular file that you need to copy to your production server.

Please login to the Passenger Enterprise Customer Area.

Customer Area login screen

Click on the Install button in the Customer Area.

Customer Area install button

Click on the button to download the license key.

License key download button in the Customer Area

The license key will be downloaded to your local computer. Copy this license key file to your production server, for example using scp:

local-computer$ cd /path-to-your-local-computer-download-folder
local-computer$ scp passenger-enterprise-license adminuser@yourserver.com:

Replace adminuser with the name of an account with administrator privileges or sudo privileges.

Finally, login to your production server and save the file as /etc/passenger-enterprise-license:

local-computer$ ssh adminuser@yourserver.com
production-server$ sudo mv passenger-enterprise-license /etc/passenger-enterprise-license
production-server$ chmod 644 /etc/passenger-enterprise-license

Step 2: obtain your download token

Your download token is needed in order to install Passenger Enterprise. In the Customer Area, find your download token and copy it to your clipboard.

Exhibit of the download token in the Customer Area

Step 3: install gem

Add the Passenger Enterprise gem server to your RubyGems source list:

$ unset HISTFILE
$ gem source --add https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_gems/

Substitute YOUR_DOWNLOAD_TOKEN with the one you found in the Customer Area. And notice the trailing slash in the URL! It is very important.

Finally, install Passenger Enterprise gem with:

$ gem install passenger-enterprise-server --no-rdoc --no-ri

The --no-rdoc --no-ri argument isn't really necessary, but it makes installation faster by skipping generation of API documentation.

Did any of the previous commands abort with a "permission denied" error? Then re-run that command with sudo.

Step 4: validate installation

After installation, please validate the install by running sudo passenger-config validate-install. For example:

$ sudo passenger-config validate-install
 * Checking whether this Phusion Passenger install is in PATH... ✓
 * Checking whether there are no other Phusion Passenger installations... ✓

All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.

FAQ

Some of the dependent libraries are installed in non-standard locations. How do I allow the compiler to find them?

Please refer to Customizing the compilation process.

How do I pass additional flags to the compiler?

Please refer to Customizing the compilation process.

Installation

Step 1: download and install your license key

Before you can install Passenger Enterprise, you need to download and install your license key. This is a regular file that you need to copy to your production server.

Please login to the Passenger Enterprise Customer Area.

Customer Area login screen

Click on the Install button in the Customer Area.

Customer Area install button

Click on the button to download the license key.

License key download button in the Customer Area

The license key will be downloaded to your local computer. Copy this license key file to your production server, for example using scp:

local-computer$ cd /path-to-your-local-computer-download-folder
local-computer$ scp passenger-enterprise-license adminuser@yourserver.com:

Replace adminuser with the name of an account with administrator privileges or sudo privileges.

Finally, login to your production server and save the file as /etc/passenger-enterprise-license:

local-computer$ ssh adminuser@yourserver.com
production-server$ sudo mv passenger-enterprise-license /etc/passenger-enterprise-license
production-server$ chmod 644 /etc/passenger-enterprise-license

Step 2: download tarball, upload to server and extract

Go to the "Files" section in the Customer Area and download the tar.gz file of the Passenger Enterprise version you want. Copy that file to your production server, for example using scp:

local-computer$ cd /path-to-your-local-computer-download-folder
local-computer$ scp passenger-enterprise-server-X.X.X.tar.gz admin@yourserver.com:

(Replace X.X.X with the Passenger Enterprise version)

On your production server, extract the tarball to some place permanent. Replace /somewhere-permanent with the actual directory path that you want to extract to. /opt is usually a good directory.

production-server$ tar -xzvf passenger-enterprise-server-X.X.X.tar.gz -C /somewhere-permanent

Step 3: install Ruby

Is Ruby already installed? Then skip to the next step.

Passenger supports multiple languages and its core is written in C++, but its installer and administration tools are written in Ruby, so you must install Ruby.

Even though Ruby is required, Ruby will normally not be loaded during normal operation unless you deploy a Ruby web application on Passenger. Passenger's dependency on Ruby is very minimal. See Lightweight Ruby dependency for details.

Debian, Ubuntu
sudo apt-get update
sudo apt-get install -y ruby rake
Red Hat, CentOS, Rocky, Alma, Fedora, Scientific Linux, Amazon Linux Enable EPEL, then run as root:
yum install -y ruby rubygem-rake
Arch Linux
sudo pacman -S ruby
macOS No action needed. Ruby is installed by default.
Other operating systems Install Ruby from the Ruby website.

Step 4: add Passenger to PATH

Add the Passenger bin directory to your PATH, so that your shell can locate the Passenger commands.

Open your shell's system-wide startup file. If you're using bash, this is usually /etc/bashrc or /etc/bash.bashrc. Inside that file, add this to the end:

PATH=/somewhere-permanent/passenger-enterprise-server-X.X.X/bin:$PATH
export PATH

Again, replace X.X.X with the Passenger version, and /somewhere-permanent with the actual directory path.

When you're done, restart all your shells so that your new PATH takes effect.

Make sure your bashrc is actually included by your bash profile, which might not be the case if you created the user with useradd instead of adduser for example.

Step 5: validate installation

After installation, please validate the install by running sudo passenger-config validate-install. For example:

$ sudo passenger-config validate-install
 * Checking whether this Phusion Passenger install is in PATH... ✓
 * Checking whether there are no other Phusion Passenger installations... ✓

All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.

FAQ

How do I automate the downloading of the tarball?

You can use HTTP basic authentication.

In the Customer Area, right-click on the download button for the tarball and click "Copy link URL". That is the URL for the tarball. You can automate the download of that tarball by using download as the HTTP username and your download key as the HTTP password.

Here is an example using curl:

$ unset HISTFILE
$ VERSION=5.0.30 && curl --fail -L -o passenger-enterprise-server-${VERSION}.tar.gz -u download:YOUR_DOWNLOAD_KEY "https://www.phusionpassenger.com/orders/download?dir=${VERSION}&file=passenger-enterprise-server-${VERSION}.tar.gz"

Some of the dependent libraries are installed in non-standard locations. How do I allow the compiler to find them?

Please refer to Customizing the compilation process.

How do I pass additional flags to the compiler?

Please refer to Customizing the compilation process.

Next step: Deploying your app

Continue
light mode dark mode
Passenger 6 Passenger 6