# admin api set up **Category:** [Platform](https://discourse.openehr.org/c/platform-implem/7) **Created:** 2024-08-31 08:06 UTC **Views:** 115 **Replies:** 2 **URL:** https://discourse.openehr.org/t/admin-api-set-up/5640 --- ## Post #1 by @anandaashish74711 Hi everyone, I'm new to EHRbase and have been working on setting up version `0.16.5` on my local environment using Docker. I've successfully set up the EHRbase and PostgreSQL services using `docker-compose`, with the necessary environment variables for database connection and Admin API configuration. However, I'm encountering issues with the Admin API, error when trying to connect. Despite ensuring that the credentials match in both services and that the database is functioning correctly, I can't get the Admin API to work as expected. I've followed the documentation closely but haven't had any success. Could anyone guide me on the correct setup process or suggest what I might be missing? Your help would be greatly appreciated. Thanks in advance!services: ehrbase: image: ehrbase/ehrbase:0.16.5 environment: SPRING_DATASOURCE_URL: "jdbc:postgresql://db:5432/ehrbase" SPRING_DATASOURCE_USERNAME: ehrbase SPRING_DATASOURCE_PASSWORD: ehrbase SERVER_AQLCONFIG_USEJSQUERY: "false" EHRBASE_WEBSERVICES_ADMIN_ENABLED: "true" depends_on: - db ports: - "8080:8080" db: image: postgres volumes: - db-data:/var/lib/postgresql/data environment: POSTGRES_USER: ehrbase POSTGRES_PASSWORD: ehrbase POSTGRES_DB: ehrbase volumes: db-data: --- ## Post #2 by @birger.haarbrandt Hi Aashish, can you clarify where you got the EHRBASE_WEBSERVICES_ADMIN_ENABLED and SERVER_AQLCONFIG_USEJSQUERY environment variables from? Please see https://github.com/ehrbase/ehrbase/blob/develop/configuration/src/main/resources/application.yml for reference. I would start with the very basic configuration described here and adjust iteratively to your liking: https://docs.ehrbase.org/docs/EHRbase/installation. This means you could add the Admin API by adjusting the startup of EHRbase like this: ``` docker run --network ehrbase-net --name ehrbase \ -e DB_URL=jdbc:postgresql://ehrbase-postgres:5432/ehrbase \ -e DB_USER=ehrbase_restricted \ -e DB_PASS=ehrbase_restricted \ -e DB_USER_ADMIN=ehrbase \ -e DB_PASS_ADMIN=ehrbase \ -e SERVER_NODENAME=local.ehrbase.org \ -e ADMIN_API_ACTIVE=true \ -e SPRING_PROFILES_ACTIVE=local \ -d -p 8080:8080 \ ehrbase/ehrbase ``` (I did not have to time to verify it locally, but should be closer to what you need in any case) --- ## Post #3 by @anandaashish74711 thanks birger ! it worked for me --- **Canonical:** https://discourse.openehr.org/t/admin-api-set-up/5640 **Original content:** https://discourse.openehr.org/t/admin-api-set-up/5640