Install Releem for PostgreSQL on Linux
Run the applicable installation command as root. Replace bracketed placeholders with the values for this server.
Use this guide for a self-managed PostgreSQL server on Linux.
Supported versions are PostgreSQL 15–18. Install the Agent on the database host when possible. For a remote database, restrict the database listener and firewall to the exact Agent source address.
Prerequisites
Use these task links for the complete flow: requirements, permissions, automatic installation, manual installation, parameters, expected result, verification, troubleshooting, update, and uninstall.
Make sure the postgresql-contrib package for your PostgreSQL version is installed before running either command. It supplies pg_stat_statements, which the standard installation uses for query data. The automatic installer can create the monitoring user and attempt to create the extension, but it cannot install a missing PostgreSQL package. See PostgreSQL Required Permissions for the extension and restart requirements.
Automatic installation
Use this path when the installer may create the releem monitoring user. The installer asks for the PostgreSQL administrative password if it needs one.
RELEEM_PG_TYPE=1 RELEEM_DB_MEMORY_LIMIT=0 RELEEM_API_KEY='[RELEEM_API_KEY]' RELEEM_CRON_ENABLE=1 RELEEM_QUERY_OPTIMIZATION=true bash -c "$(curl -L https://releem.s3.amazonaws.com/v2/install.sh)"
RELEEM_PG_TYPE=1 selects PostgreSQL. Do not add an administrative password to the command. Continue with the expected result.
Manual installation
Use this path after a DBA has created the monitoring user and reviewed pg_hba.conf according to the PostgreSQL permissions guide.
RELEEM_PG_TYPE=1 RELEEM_PG_PASSWORD='[MONITORING_PASSWORD]' RELEEM_PG_LOGIN='releem' RELEEM_DB_MEMORY_LIMIT=0 RELEEM_API_KEY='[RELEEM_API_KEY]' RELEEM_CRON_ENABLE=1 RELEEM_QUERY_OPTIMIZATION=true bash -c "$(curl -L https://releem.s3.amazonaws.com/v2/install.sh)"
Add RELEEM_PG_HOST, RELEEM_PG_PORT, or RELEEM_PG_SSL_MODE=true before bash -c only when the database does not use the local defaults. The SSL switch maps to sslmode=require; it does not provide certificate and hostname verification equivalent to verify-full.
The installer writes the Agent configuration to /opt/releem/releem.conf. Keep this file readable only by authorized administrators.
Installer parameters
RELEEM_API_KEYidentifies the server in Releem.RELEEM_HOSTNAMEoverrides the name displayed in the Dashboard.RELEEM_CRON_ENABLE=1enables the automatic daily update. Set it to0to disable scheduled updates. See Update the Agent.RELEEM_DB_MEMORY_LIMITsets the database memory limit in MB;0uses all available memory. Set a limit when other software shares the server.RELEEM_PG_TYPE=1selects PostgreSQL. SettingRELEEM_PG_HOST,RELEEM_PG_LOGIN,RELEEM_PG_PASSWORD,RELEEM_PG_ROOT_LOGIN, orRELEEM_PG_ROOT_PASSWORDalso selects the PostgreSQL installer path.RELEEM_PG_HOSTdefaults to127.0.0.1; set it when PostgreSQL listens on a different interface or only on a socket.RELEEM_PG_PORTdefaults to5432, andRELEEM_PG_LOGINandRELEEM_PG_PASSWORDconfigure the PostgreSQL monitoring connection. When you omit them in the automatic path, the installer createsreleemand generates its password.RELEEM_PG_DATABASEsets the database used by the installer for account and extension setup and defaults topostgres. It does not change the Agent's statistics connection; keeppg_stat_statementsavailable inpostgres.RELEEM_PG_CONF_DIRselects the existing directory where the Agent writes recommended PostgreSQL configuration when it cannot detectpostgresql.conf. Create the directory first and confirm the intended instance includes it; otherwise Agent configuration application is disabled.RELEEM_PG_ROOT_LOGINsets the PostgreSQL administrative login and defaults topostgres. Do not put a root-password variable in a reusable example; use the installer's masked prompt.RELEEM_PG_ROOT_PASSWORDsupplies the administrative password. When omitted, the installer first tries peer/passwordless access and then prompts for it. Use the prompt instead of storing the password in a command.RELEEM_PG_SSL_MODE=truemaps tosslmode=require;falseor omission maps tosslmode=disable. It is not averify-fullsetting.RELEEM_QUERY_OPTIMIZATION=trueenables PostgreSQL query data collection after you set uppg_stat_statementsand grant the required access. Remove the flag only when you intend to disable that collection.
For the installed Agent's settings, see Configure the Releem Agent.
Expected result
The installer completes without an error, the Agent service starts, and the new server appears in the Releem Dashboard.
Verify the installation
Open the Dashboard and confirm both that Agent Status: Connected is shown and that the Dashboard has a current data timestamp or updated metrics. If the service is connected but current data is absent, review the Agent logs and continue to troubleshooting.
Troubleshooting
If the server does not connect, use Troubleshoot the Releem Agent. Recheck this installation guide, PostgreSQL permissions, network source restrictions, and installed configuration. For lifecycle tasks, use the dedicated update and uninstall guides.