Skip to content

Configuration

In the Quickstart, we installed Manul in memory mode. In this mode, the manul server is not connected to storage services, meaning all data will be lost upon restart.

To make manul server persistent, we need to connect it to PostgreSQL and OpenSearch.

Manul uses PostgreSQL as the primary storage engine. If you don’t have it installed, download it from here.

Once installed, create a new database to be used in the configuration below.

Manul relies on OpenSearch for object indexing and search. You can download OpenSearch from here.

Note: Elasticsearch is also compatible if you prefer it over OpenSearch.

Make the following changes to ~/.manul/conf/manul.yml to enable persistence:

  • Change the mode to persistent.
  • Add PostgreSQL connection details.
  • Add OpenSearch connection details.

The configuration should look like this:

~/.manul/conf/manul.yml
mode: persistent
datasource:
host: <postgrssql_host>
port: <postgresql_port>
username: <postgresql_username>
password: <postgresql_password>
database: <postgresql_database>
opensearch:
host: <opensearch_host>
port: <opensearch_port>
username: <opensearch_username>
password: <opensearch_password>
server:
port: 8080

Restart manul server to apply the configuration changes:

Terminal window
manul restart

To verify that the persistent setup is working, repeat the example steps from the Quickstart.

After creating the data, reboot the server with manul restart and send the following request to check if the data survived the restart:

GET http://localhost:8080/quickstart/books

The response will contain the book we have created if the configuration is correct.