Installing your own Helpy Pro Private Cloud or On-Premises instance

Overview:

Helpy Pro makes it possible to run a single instance of Helpy on your own Private Cloud or On-Premises server.  Installation is simple and quick using the apt package manager to install and update the software.

This document contains important information on how to install, administer and customize your Pro instance, as well as keep it up to date. The following topics are covered below:

  • Requirements
  • Installation
    • Installing the Package
    • Important Configurations
    • Install and configure Nginx
  • Updating Helpy

Requirements

Helpy Pro currently only runs on Ubuntu 18.04. You should use a VM or bare metal server with this OS.

Other requirements are:

  • Minimum of 2GB of RAM
  • Postgres 10x- best to use a DBAAS or a dedicated server
  • SMTP and IMAP or Sendgrid for email
  • AWS S3 or compatible for File Storage (optional)
  • For high availability, you will need a load balancer and multiple VMs (optional)


1. Installing the Package

Helpy Pro is distributed as an APT package.  Optionally it can be run in a clustered mode, with load balancer and 2 or more app servers, a database backend (one or more db servers), and optionally one or more worker servers, and an external file store.

To install the Helpy Pro package, you will first need to add the APT repository, then install the package itself. To get started, use your preferred text editor to create the following file:

/etc/apt/sources.list.d/helpy.list


Adding the following line:

deb [trusted=yes] https://s3.amazonaws.com/helpypro-releases stable main


Next, update the system and install:

sudo apt-get update
sudo apt-get install -y helpy


Start the Helpy service as a daemon using:

sudo helpy scale web=1 worker=1



Note:

When you install the Helpy service initially, it is not tuned to run on your specific VM configuration.  You should follow the suggestions here to maximize performance: https://support.helpy.io/en/docs/162-tuning-your-helpy-instance


2. Create a local database for testing

Helpy Pro uses the PostgreSQL database, and you will need either a local DB server (good for testing) or a dedicated instance, or DBAAS (best for production).  To set up a local server, follow these steps:  

First, install the required packages:

sudo apt-get -y install postgresql postgresql-contrib


Next, create a database user, and set the password for the user.  Make note of the username and password if you change them, and follow the instructions here: https://support.helpy.io/en/docs/181 to configure Helpy to connect using the custom credentials.

sudo -u postgres createuser -s helpy
sudo -u postgres psql -U postgres -d postgres -c "alter user helpy with password 'helpy';"


 Create an empty Helpy database with the following.  We will script the table set up in a later step.


sudo -u postgres createdb helpy_production


Once you have created the database, set up the database tables from scratch:

sudo helpy run rake db:setup



Caution!

The base database configuration is not very secure and is meant for testing purposes only.  When you are ready to move to production, you will want to set a more secure password and possibly do other hardening on the Postgres server.



3. Install and Configure Nginx


Helpy uses the Nginx web server and going live means that you will need to install and configure it.  Begin by making sure it is installed:

sudo apt-get install -y nginx


Then change the default host file:

sudo nano /etc/nginx/sites-available/default


Delete the existing configuration and then add something like the following.  This is a super basic configuration and you will probably want to add to this:

server {
    listen          80;
    server_name     example.com;
    location / {    
        proxy_pass      http://localhost:5900;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
  }
}

You still need to tell the Helpy service to listen on this port. To do this, add 100 to the port number expressed on the proxy_pass line.  IE here it would be 6000+100 = port 6100 that Helpy should listen on.  Use this command:


After making this change, start or restart Nginx and restart Helpy:

sudo service nginx start #or sudo service nginx restart
sudo helpy restart


Last, point your web browser to the IP address or subdomain of the server.  After a few seconds, the Helpy Pro interface onboarding should load up!


Managing and updating Helpy


Helpy Pro includes a CLI.  To see an overview of available commands, type:

sudo helpy

To review the configuration of all variables, use

sudo helpy config

You can restart the Helpy service at any time using

sudo helpy restart


Updating Helpy is easy. Simply use the apt package manager on your Ubuntu server:

sudo apt-get update
sudo apt-get -y upgrade

After updating, you should run database migrations using the following command, then restart

sudo helpy run rake db:migrate
sudo helpy restart



Did this solve your problem?