Steps to configure Azure PostgreSQL Database as Applications Manager's back-end

Steps to configure Azure PostgreSQL Database as Applications Manager's back-end

Applications Manager comes bundled with PostgreSQL. If you want to use your own PostgreSQL instead, follow the steps mentioned below:


Prerequisites:

  1. Version compatibility: To know the supported versions and database user permissions, click here.

  2. Network access: PostgreSQL database should be accessible from Applications Manager installation. 

    1. Firewall rule must be configured to allow the connection from Applications Manager server.

  3. User privilege: A PostgreSQL User with privileges to login, create database, and has full control over the tables in that database.

  4. Allow extensions: The below extensions must be enabled to configure Azure PostgreSQL flexible server as Applications Manager's backend.

    1. PGCRYPTO

    2. CITEXT

    3. AMCHECK

    4. PG_STAT_STATEMENTS

Steps:

1. Install Applications Manager with bundled PGSQL backend. It is recommended that you do not launch the application during the installation set up after choosing bundled Postgres as the backend. This avoids creating APM related tables in the bundled PGSQL database.

2. Create an Azure PostgreSQL database in the Azure portal.
Ensure that DB port 5432 is open to ensure that proper connection to the database can be made from Applications Manager server.

3. Get the following information from the database to connect to it:

  •      Azure PostgreSQL Database Server name [Hostname]

  •      Database port number

  •      Database admin username

  •      Database password

4. Connect to the server in which Applications Manager is installed and modify the below files to change the database configuration settings from bundled PgSQL to Azure PostgreSQL database.

  1. Edit AppManager\conf\AMServer.properties file using a text editor (like wordpad or vi or sublime) and make the following changes:

    Replace am.dbport.check=true with am.dbport.check=false.
    Replace am.db.port=15432 with am.db.port=<PostgreSQL port> (ex:  am.db.port=5432)

  2. Modify AppManager/working/conf/PGSQL/database_params.conf file:

  • Change the host and port details:
    Replace localhost:15432 with AzurePGSQLServer:<port number> 
    From this,

    It should now look like this

  • Change the database username:
    Replace the default <username> with the username of AzurePGSQL flexible server.
    Change from this,

    Notes
    username postgres AppModules ...
    It should now look like this:
    Notes
    username <Azure_PGSQL_UserName> AppModules ...

            Note: For Azure PostgreSQL single server (retired on March 28, 2025), username must be accompanied with '@server_name'. i.e, username@server_name

  • Change the database password
    Replace the keyword encryptedpassword with password (if applicable) and type the AzurePGSQL flexible server password next to it.
    Change from this,
    Notes
    encryptedpassword <PASSWORD_HASH> AppModules ...
    OR
    Notes
    password apmdbuser AppModules ...
    It should now look like this:
    Notes
    password <Azure_PGSQL_Password> AppModules ...

  • Once you implement the above changes, save the file. Then, copy and replace the file in the following directory: AppManager/working/conf/database_params.conf.

5. Ensure that the below extensions are enabled in the Azure PostgreSQL flexible server.

    1. PGCRYPTO

    2. CITEXT

    3. AMCHECK

    4. PG_STAT_STATEMENTS

6. Start Applications Manager.