Self-hosted
pgDash is available as a self-hosted package that can be installed within your datacenter or cloud instances. The self-hosted version of pgDash is entirely self-contained and does not require internet access for its operation. It requires a PostgreSQL database, which has to be provisioned and managed by you. Self-hosted pgDash has all the same features as the SaaS version of pgDash hosted at https://app.pgdash.io.
Availability
The pgDash server binary package is available in .deb and .rpm installer packages and .tar.gz tarball format. These packages can be downloaded from the RapidLoop download server at https://packages.rapidloop.com/downloads as well as the RapidLoop APT/YUM repo. Instructions below.
Currently we support running pgDash on Debian 11, Debian 12, Ubuntu Server 20.04 LTS, 22.04 LTS, 24.04 LTS and RHEL/CentOS/RockyLinux 8 and 9 distros. It is possible to run pgDash as a Docker container, see instructions below.
pgDash needs PostgreSQL 13 or above. We recommend a dedicated database and a dedicated PostgreSQL user for pgDash.
You will be able to setup the pgDash server by following the instructions on this page. However, a license file is needed for the server to start. Please contact us at [email protected] and we'd be happy to provide you with a license file for a Free Trial to take pgDash on a test run!
The current version of pgDash self-hosted is 3.5.19.
Setup
You can install the pgDash server from the RapidLoop APT/YUM repo (recommended), or by downloading and installing the .deb/.rpm installer, or directly using the tarball.
Using the RapidLoop APT repository
1. Import the RapidLoop signing key:
curl -fsSL https://packages.rapidloop.com/gpg-pubkey-rapidloop.asc |
sudo tee /etc/apt/keyrings/gpg-pubkey-rapidloop.asc > /dev/null
2. Add the RapidLoop repo:
echo "deb [signed-by=/etc/apt/keyrings/gpg-pubkey-rapidloop.asc] https://packages.rapidloop.com/debian stable main" |
sudo tee /etc/apt/sources.list.d/rapidloop.list
3. Fetch the RapidLoop package information:
sudo apt-get update
4. Install the pgDash server package:
sudo apt-get install pgdash-server
Using the .deb installer
1. Download the .deb file:
wget https://packages.rapidloop.com/downloads/pgdash-server_3.5.19_amd64.deb
2. Install the package using the dpkg
command:
sudo dpkg -i pgdash-server_3.5.19_amd64.deb
Using the RapidLoop YUM repository
1. Add the RapidLoop YUM repo:
sudo dnf config-manager --add-repo https://packages.rapidloop.com/rapidloop.repo
2. Install the pgDash server package:
sudo dnf install -y pgdash-server
Using the .rpm installer
1. Download the .rpm file:
wget http://packages.rapidloop.com/downloads/pgdash-server-3.5.19-1.x86_64.rpm
2. Install using the rpm command
sudo dnf install -y pgdash-server-3.5.19-1.x86_64.rpm
Using the .tar.gz tarball
Download the .tar.gz tarball:
wget https://packages.rapidloop.com/downloads/pgdash-server-3.5.19.amd64.tar.gz
2. Unpack the tarball
tar xvf pgdash-server-3.5.19.amd64.tar.gz
3. The pgDash server can be started with the current working directory as the root of the unpacked tarball. The server will look for all files (like /etc/pgdash/pgdash.cfg, /var/log/pgdash/pgdash.log) relative to this directory.
cd pgdash-server-3.5.19-amd64
usr/sbin/pgdashd
The pgDash server will run in the foreground until interrupted by ^C.
Running as a Docker Container
The pgDash server itself is not available as a Docker container, because you'll typically need to edit the configuration file and supply a license file before it can start. We recommend building your own container using this Dockerfile as a starting point:
FROM debian:12
ENV PGDASH_VERSION 3.5.19
RUN apt-get update
RUN apt-get -yq install wget
RUN wget https://packages.rapidloop.com/downloads/pgdash-server_${PGDASH_VERSION}_amd64.deb
RUN dpkg -i pgdash-server_${PGDASH_VERSION}_amd64.deb
COPY pgdash.cfg /etc/pgdash
COPY ABCDE-FGHIJ-KLMNO-PQRST.lic /etc/pgdash
VOLUME /var/lib/pgdash
ENTRYPOINT ["/usr/sbin/pgdashd"]
Place your custom pgdash.cfg and the license file in the same directory as this Dockerfile and use the docker build
command to build your container.
The timeseries and other metrics data is stored under /var/lib/pgdash
, which should be persisted into a Docker volume. Log files created under /var/log/pgdash
, as well as configuration files in /etc/pgdash
can also be stored on volumes if desired.
System Requirements
The main pgDash application is a single, native binary that runs as a daemon. As such, it has low memory and CPU requirements. It does not store any state on-disk, and relies on the PostgreSQL database for storage of all persistent data, including timeseries data.
System Clock
The system on which pgDash is running must have it's clock synchronized via NTP or similar. An incorrect clock may result in unexpected behavior.
System Time Zone
We highly recommend that the time zone of the system on which pgDash is running is set to UTC. Note that the timestamps shown in the browser when you access pgDash will still appear in the time zone of the browser's machine.
File System
pgDash stores timeseries data (metrics, and parts of pgmetrics reports) in a compressed format under /var/lib/pgdash
. There should be sufficient storage and IOPS for the filesystem where this directory will be located.
Reverse Proxy
It is possible to run pgDash behind a reverse proxy. To host pgDash at a location like https://internal.company.com/pgdash
, and assuming the fronting server is nginx, you can configure nginx like:
location /pgdash/ {
proxy_http_version 1.1;
proxy_pass http://internal.pgdash.server:8080/;
}
and also add the following in the pgDash configuration file (/etc/pgdash/pgdash.cfg
):
exturl = 'https://internal.company.com/pgdash'
Configuration
The pgDash daemon (/usr/sbin/pgdashd
) is installed as a systemd service (pgdashd.service). On startup, it reads the configuration file /etc/pgdash/pgdash.cfg
. Please refer the comments in that file to edit it to suit your needs.
You'll need to provision a PostgreSQL database for pgDash's use. We recommend a dedicated database, and a dedicated PostgreSQL user pgdash
. You'll need to specify the connection parameters to this database in /etc/pgdash/pgdash.cfg
, like so:
dsn = 'host=my.db.host user=pgdash dbname=pgdash'
pgDash will create and manage the schema in the database without any extra steps.
Email Settings
For the pgDash server to send emails (team invite, alerts etc), you'll need to configure an SMTP server in the configuration file. The following entries need to be set:
[smtp]
server = "smtp.example.com:587"
from = "[email protected]"
username = "user"
password = "pass"
After changing the configuration file, use sudo systemctl restart pgdashd
for changes to take effect.
Note that your SMTP provider might require a pre-validated from address, and that there might be default firewall rules on outbound connections to ports 25, 465 or 587.
Once configured, you can use the following command to send a test mail to check if the settings are good:
/usr/sbin/pgdash-admin email test [email protected]
External URL
For pgDash to include the proper URL in emails, alert texts etc., set the external URL by which users will access the pgDash UI in the configuration file:
exturl = 'http://10.1.2.3:8080'
If you are hosting pgDash behind a reverse proxy (see above) to let your users access pgDash with a URL like https://pgdash.example.com
, then set that instead:
exturl = 'https://pgdash.example.com'
After changing the configuration file, use sudo systemctl restart pgdashd
for changes to take effect.
License File
The license file that you receive should be placed in /etc/pgdash
, and must be readable at least by the system user "pgdash" or the system group "pgdash". Do not rename the license file that you receive. The pgDash service must be restarted for changes to take effect. The following steps are recommended:
1. Ensure that the license file is present in the /etc/pgdash directory
2. sudo chmod 0400 /etc/pgdash/*.lic
3. sudo chown pgdash:pgdash /etc/pgdash/*.lic
4. sudo systemctl restart pgdashd
The files in /etc/pgdash
should look like:
$ ls -l /etc/pgdash
total 12
-r-------- 1 pgdash pgdash 120 Mar 15 10:30 J9NYY-KMSR6-IXJ3M-OQHZR-RDKTK.lic
-rw-r----- 1 pgdash root 3886 Mar 27 08:23 pgdash.cfg
Getting Started
Once you have pgDash up and running, you'll be able to browse to http://pgdash:8080/ (or whichever URL you configured) and see the login page. New users can signup to your instance of pgDash.
You can use the same steps as the SaaS version for Getting Started, with one change -- the pgdash command-line tool must be instructed to send the data to your instance rather than the SaaS instance. This is done by using the "--base-url" argument for pgdash:
pgmetrics --no-password -f json -h server.name mydb1 |
pgdash --base-url=http://pgdash:8080/api/v1 -a MYAPIKEY report server.name
All other aspects of using pgDash remain the same, and further documentation can be found in other sections of this manual.
Administration
pgDash comes with a command line tool pgdash-admin to perform administrative tasks. Use the --help option to see what commands are available:
pgdash-admin --help
Log files will be present in /var/log/pgdash.
Support
Please contact us at [email protected] for any help with your self-hosted pgDash instance.
Free Trial
If you'd like to take pgDash for a test-drive, email us at [email protected] and we'll get you setup with a self-hosted Free Trial.
Last updated