> For the complete documentation index, see [llms.txt](https://jembi.gitbook.io/openhim-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jembi.gitbook.io/openhim-platform/packages/fhir-datastore-hapi-fhir/environment-variables.md).

# Environment Variables

<table><thead><tr><th>Variable Name</th><th>Type</th><th width="221">Revelance</th><th width="112">Required</th><th>Default</th></tr></thead><tbody><tr><td>REPMGR_PRIMARY_HOST</td><td>String</td><td>Service name of the primary replication manager host (PostgreSQL)</td><td>No</td><td>postgres-1</td></tr><tr><td>REPMGR_PARTNER_NODES</td><td>String</td><td>Service names of the replicas of PostgreSQL</td><td>Yes</td><td>postgres-1</td></tr><tr><td>POSTGRES_REPLICA_SET</td><td>String</td><td>PostgreSQL replica set (host and port of the replicas)</td><td>Yes</td><td>postgres-1:5432</td></tr><tr><td>HAPI_FHIR_CPU_LIMIT</td><td>Number</td><td>CPU limit usage for hapi-fhir service</td><td>No</td><td>0 (unlimited)</td></tr><tr><td>HAPI_FHIR_CPU_RESERVE</td><td>Number</td><td>Reserved CPU usage for hapi-fhir service</td><td>No</td><td>0.05</td></tr><tr><td>HAPI_FHIR_MEMORY_LIMIT</td><td>String</td><td>RAM limit usage for hapi-fhir service</td><td>No</td><td>3G</td></tr><tr><td>HAPI_FHIR_MEMORY_RESERVE</td><td>String</td><td>Reserved RAM usage for hapi-fhir service</td><td>No</td><td>500M</td></tr><tr><td>HF_POSTGRES_CPU_LIMIT</td><td>Number</td><td>CPU limit usage for postgreSQL service</td><td>No</td><td>0 (unlimited)</td></tr><tr><td>HF_POSTGRES_CPU_RESERVE</td><td>Number</td><td>Reserved CPU usage for postgreSQL service</td><td>No</td><td>0.05</td></tr><tr><td>HF_POSTGRES_MEMORY_LIMIT</td><td>String</td><td>RAM limit usage for postgreSQL service</td><td>No</td><td>3G</td></tr><tr><td>HF_POSTGRES_MEMORY_RESERVE</td><td>String</td><td>Reserved RAM usage for hapi-fhir service</td><td>No</td><td>500M</td></tr><tr><td>HAPI_FHIR_INSTANCES</td><td>Number</td><td>Number of hapi-fhir service replicas </td><td>No</td><td>1</td></tr><tr><td>HF_POSTGRESQL_USERNAME</td><td>String</td><td>Hapi-fhir PostgreSQL username</td><td>Yes</td><td>admin</td></tr><tr><td>HF_POSTGRESQL_PASSWORD</td><td>String</td><td>Hapi-fhir PostgreSQL password</td><td>Yes</td><td>instant101</td></tr><tr><td>HF_POSTGRESQL_DATABASE</td><td>String</td><td>Hapi-fhir PostgreSQL database</td><td>No</td><td>hapi</td></tr><tr><td>REPMGR_PASSWORD</td><td>Strign</td><td>hapi-fhir PostgreSQL Replication Manager username </td><td>Yes</td><td></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://jembi.gitbook.io/openhim-platform/packages/fhir-datastore-hapi-fhir/environment-variables.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
