How to update the database configuration file

I am running a Laravel multi tenant with multi database application on Ubuntu 22.04 (x86_64) Hestiacp v1.8.12. Every thing is working fine.

Problem is with Tenant database. Database operation with my application is absolutely fine, but not visible in Hestiacp admin panel also not included in backup.

I don’t like adding of db every time new tenant created into admin panel through appending “/usr/local/hestia/data/users/xxxxx/db.conf” manually.

Please suggest any good way to handle tenant db.

Would be indeed the solution to go.

You have 2 options

Create the database via CLI
Or back it up with your own software …

Thanks, I think there must be an api for db.conf update… that would be helpful for those applications where db is generated by default.

There is an API fro that …

But it will create it at the same time

1 Like

As @eris mentioned, I agree that using the HestiaCP API is an excellent approach. By programmatically managing users and databases through the API, we can automate the configuration updates and ensure that tenant databases are included in backups via cron jobs. it will keep everything streamlined.

I agree with @alber there must be api to automate the db configuration. As @eris suggested that is good thing in Hetiacp, but here it will re-create the db which is not required.

That does the api that we provide allready but you will need to create it with the api and not via a other system or directly in the database

Api approach for making db is very fine thing. But in my case, Tenancy package already comes with their own db creation and credential management with tenant. Any change in code may increase problem manifold. So I thought instead of tempering the said package, it will be better if I could manage the db from out side.

One more thing I want to know, In HestiaCP can I create more than one db with same username and pwd.