On Linux
If you wish to install locally or already have a configured server, see the basic Installation Guide
The following is a recommended way to configure Linux and install Harper. These instructions should work reasonably well for any public cloud or on-premises Linux instance.
These instructions assume that the following has already been completed:
Linux is installed
Basic networking is configured
A non-root user account dedicated to Harper with sudo privileges exists
An additional volume for storing Harper files is attached to the Linux instance
Traffic to ports 9925 (Harper Operations API) 9926 (Harper Application Interface) and 9932 (Harper Clustering) is permitted
While you will need to access Harper through port 9925 for the administration through the operations API, and port 9932 for clustering, for higher level of security, you may want to consider keeping both of these ports restricted to a VPN or VPC, and only have the application interface (9926 by default) exposed to the public Internet.
For this example, we will use an AWS Ubuntu Server 22.04 LTS m5.large EC2 Instance with an additional General Purpose SSD EBS volume and the default “ubuntu” user account.
(Optional) LVM Configuration
Logical Volume Manager (LVM) can be used to stripe multiple disks together to form a single logical volume. If striping disks together is not a requirement, skip these steps.
Find disk that already has a partition
Create array of free disks
Get quantity of free disks
Construct pvcreate command
Initialize disks for use by LVM
Create volume group
Create logical volume
Configure Data Volume
Run lsblk
and note the device name of the additional volume
Create an ext4 filesystem on the volume (The below commands assume the device name is nvme1n1. If you used LVM to create logical volume, replace /dev/nvme1n1 with /dev/hdb_vg/hdb_lv)
Mount the file system and set the correct permissions for the directory
Create a fstab entry to mount the filesystem on boot
Configure Linux and Install Prerequisites
If a swap file or partition does not already exist, create and enable a 2GB swap file
Increase the open file limits for the ubuntu user
Install Node Version Manager (nvm)
Load nvm (or logout and then login)
Install Node.js using nvm (read more about specific Node version requirements)
Install and Start Harper
Here is an example of installing Harper with minimal configuration.
Here is an example of installing Harper with commonly used additional configuration.
You can also use a custom configuration file to set values on install, use the CLI/ENV variable HDB_CONFIG
and set it to the path of your custom configuration file:
Start Harper on Boot
Harper will automatically start after installation. If you wish Harper to start when the OS boots, you have two options:
You can set up a crontab:
Or you can create a systemd script at /etc/systemd/system/harperdb.service
Pasting the following contents into the file:
And then running the following:
For more information visit the Harper Command Line Interface guide and the Harper Configuration File guide.
Last updated