To setup the database, the docker container first must be stopped. The Database can be edited for example with [DBeaver](https://dbeaver.io/). Make sure to add the terminal certificate, private-key, sector-id and certificate-chain with the corresponding _REFID_ used in the config file (_CVCRefID_).
To make changes in the database, the docker container first must be stopped.
The Database can be edited for example with [DBeaver](https://dbeaver.io/).
Add these to the following tables:
If the preconfigured database is used please look up the credentials for openingn in the file `/poseidas/config/application.properties`. If the database is configured by yourself, you have set the credentials via the [configuration-wizard](#use-the-configuration-wizard).
You need to add the following data into the database:
* terminal certificate
* private-key
* sector-id (only relevant if the client is using PersoSim)
* certificate-chain
This data must be inserted using the key _REFID_. The value of _REFID_ must match the value in the poseidas config file under the key _CVCRefID_.
Use the following tables for adding the data:
* TERMINALPERMISSION
*Terminal certificate
* private-key
* sector-id
* terminal description
*_CVC_: terminal certificate
*_CVCPRIVATEKEY_: private-key
*_SECTORID_: sector-id
*_CVCDESCRIPTION_: terminal description
* CERTINCHAIN
* every certificate of the certificate-chain
* starting with the root certitifcate use the value '0' for _POSINCHAIN_ and put the certificate in _DATA_
* if intermediate certificates exist, increase the value for _POSINCHAIN_ and put the certificate in _DATA_