Skip to main content
Version: 8

Getting Started - Appendix

Default Service Ports​

ServiceDefault Port
Ed-Fi API8080
Configuration Service8081
Swagger UI (optional)8082
PostgreSQL (default database engine)5435
SQL Server (with -DatabaseEngine mssql)1435
Keycloak (optional)8045
Kafka broker (streaming)9092
Kafka Connect REST API (streaming)8083
Kafka UI (with -EnableKafkaUI)8088
Kafka Connect worker metrics (streaming)9404

Ports can be overridden in the .env file before starting the services.

Environment Variable Reference​

The .env file in eng/docker-compose/ controls Docker Compose service configuration. Copy .env.example to .env and edit as needed before running bootstrap-local-dms.ps1. For a Kafka evaluation, the private configuration step creates this file for you.

Ed-Fi API​

VariableDefaultDescription
DMS_DATASTOREpostgresqlDatabase engine: postgresql or mssql
DMS_MULTI_TENANCYfalseEnable multi-tenancy
ROUTE_QUALIFIER_SEGMENTS(empty)Route qualifier path segments, e.g. schoolYear or districtId,schoolYear
MAXIMUM_PAGE_SIZE500Maximum number of results per paginated request
MASK_REQUEST_BODY_IN_LOGStrueMask request body in DEBUG-level logs
LOG_LEVELInformationLog verbosity: Debug, Information, Warning, Error
DMS_HTTP_PORTS8080Port the Ed-Fi API container listens on

Optional DocumentCache​

Use the eng/docker-compose/local-dms-document-cache.yml overlay to select the registered data store whose cache the API container will update. Add these settings to the local .env file.

DMS_DOCUMENTCACHE_COMPOSE_FILE=local-dms-document-cache.yml
DMS_DOCUMENTCACHE_TARGET_TENANT_KEY=
DMS_DOCUMENTCACHE_TARGET_DATA_STORE_ID=1

Replace 1 with the Configuration Service ID of the intended data store. Use the matching tenant key for a multi-tenant deployment; an empty key selects the default tenant.

If you need seed data, run bootstrap without -LoadSeedData, activate and verify the cache, then run load-dms-seed-data.ps1 with the seed options you would have passed to bootstrap, such as -SeedTemplate.

VariableDefaultEffect
DMS_DOCUMENTCACHE_COMPOSE_FILEEmpty; no overlaystart-local-dms.ps1 adds this Compose file when starting API services. Relative paths resolve from eng/docker-compose/; the file must exist.
DMS_DOCUMENTCACHE_TARGET_TENANT_KEYEmptyMaps to DataManagement__DocumentCache__Targets__0__TenantKey.
DMS_DOCUMENTCACHE_TARGET_DATA_STORE_IDRequired when using the overlayMaps to DataManagement__DocumentCache__Targets__0__DataStoreId; must be a positive registered data store ID.

The base local-dms.compose.yml file maps the following .env variables to settings in the API container.

VariableDefaultEffect
DMS_DOCUMENTCACHE_READ_ACCELERATION_ENABLEDfalseEnables cached resource and descriptor GETs on the configured targets.
DMS_DOCUMENTCACHE_READ_ACCELERATION_DIRECT_FILL_TIMEOUT00:00:00.250Time allowed to refresh a cached copy after a read from the relational tables.
DMS_DOCUMENTCACHE_PROJECTOR_POLL_INTERVAL00:00:05Time between worker polls.
DMS_DOCUMENTCACHE_PROJECTOR_PAGE_SIZE100Number of items the worker reads per page.
DMS_DOCUMENTCACHE_PROJECTOR_MAX_CONCURRENT_TARGETS2Maximum number of data stores one API instance updates at once.
DMS_DOCUMENTCACHE_PROJECTOR_FAILURE_BACKOFF00:00:30Time the worker waits before retrying after a database failure.
DMS_DOCUMENTCACHE_PROJECTOR_BASELINE_HIGH_WATER_MARK1000Activation or rebuild pauses adding existing documents at this queue size and resumes when the queue falls below it.
DMS_DOCUMENTCACHE_ADMINISTRATION_WORKFLOW_TIMEOUT1.00:00:00Time allowed for an administration command.
DMS_DOCUMENTCACHE_STATUS_OBSERVATION_TIMEOUT00:00:05Time allowed to read one target's status from the database.
DMS_DOCUMENTCACHE_STATUS_ENDPOINT_TIMEOUT00:00:30Time allowed for the entire HTTP status request.
DMS_DOCUMENTCACHE_STATUS_REQUIRED_ROLEEmptyRole required to call GET /health/document-cache. An empty value disables the endpoint.

Set DMS_DOCUMENTCACHE_STATUS_REQUIRED_ROLE to an administrator-only role and follow the DocumentCache activation guide to activate the database and verify worker status. To enable accelerated reads after activation, set DMS_DOCUMENTCACHE_READ_ACCELERATION_ENABLED=true in .env and recreate the API container.

Optional Kafka Streaming​

The Kafka walkthrough sets up these values for a local evaluation. The four ports are accessible from the host's loopback interface.

VariableWalkthrough valuePurpose
KAFKA_PORT9092Kafka broker port on the host.
CONNECT_SOURCE_PORT8083Kafka Connect REST API.
KAFKA_UI_PORT8088Kafka UI in your browser.
CDC_METRICS_PORT9404Kafka Connect metrics used by the status check.
CDC_DATABASE_PASSWORDGenerated during setupPassword for the restricted cdc_reader database login.
CDC_WORKER_HEAP_MIB1024Memory for the Kafka Connect worker. Match Worker.HeapBytes in the CDC settings.

PostgreSQL​

VariableDefaultDescription
POSTGRES_PASSWORD(set in .env.example)PostgreSQL admin password
POSTGRES_DB_NAMEedfi_datamanagementservicePrimary database name
POSTGRES_PORT5435Host port mapped to the PostgreSQL container

Configuration Service​

VariableDefaultDescription
CONFIGURATION_SERVICE_ASPNETCORE_HTTP_PORTS8081Port the Configuration Service container listens on
CONFIGURATION_SERVICE_IDENTITY_PROVIDERself-containedIdentity provider: self-contained or keycloak
CONFIGURATION_SERVICE_MULTI_TENANCYfalseEnable multi-tenancy for the Configuration Service
CONFIGURATION_SERVICE_DEPLOY_DATABASEtrueProvision Configuration Service database on start
CONFIGURATION_SERVICE_LOG_LEVELInformationConfiguration Service log verbosity
DMS_CONFIGURATION_SERVICE_URLhttp://ed-fi-api-config:8081URL the Ed-Fi API uses to reach the Configuration Service (internal Docker network name)
info

The Docker Compose files support more settings than the ones listed here, such as rate limits, circuit breaker thresholds, and JWT clock skew. See Configuration Details for the full reference.

Identity Provider Options​

Self-Contained (Default)​

Uses OpenIddict embedded in the Configuration Service. No external dependency is required. This is the recommended option for development and most production deployments.

CONFIGURATION_SERVICE_IDENTITY_PROVIDER=self-contained

Keycloak​

Uses an external Keycloak instance. Suitable for environments that require enterprise identity management or single sign-on.

./bootstrap-local-dms.ps1 -IdentityProvider keycloak

See Identity Provider Configuration for Keycloak-specific setup steps.

Database Overview​

Ed-Fi API v8 stores its data in a relational database — PostgreSQL or SQL Server — organized into separate schemas by concern. By default, the Docker Compose stack uses PostgreSQL and creates a single database — named by POSTGRES_DB_NAME (default edfi_datamanagementservice) — that both services use, with the Configuration Service's data isolated in the dmscs schema. Alternatively, the Configuration Service can use its own database. Pass -SeparateConfigDatabase to bootstrap-local-dms.ps1 to create a separate edfi_configurationservice database, or point the Configuration Service at another database with the CONFIGURATION_SERVICE_DATABASE_CONNECTION_STRING environment variable.

The Configuration Service schema is deployed automatically on startup when CONFIGURATION_SERVICE_DEPLOY_DATABASE=true (the default). The data stores used by the Ed-Fi API are not deployed by the API container on startup; it is provisioned as a separate phase by the startup scripts (using the api-schema-tools CLI), which bootstrap-local-dms.ps1 orchestrates for you.

SchemaApplicationPurpose
dms, edfi, tracked_changes_<project> (e.g. tracked_changes_edfi, tracked_changes_tpdm)Ed-Fi APIEd-Fi resource and descriptor data
authEd-Fi APIDatabase views that platform hosts create for custom view-based authorization
dmscsConfiguration ServiceVendors, applications, claim sets, data store configuration, and OAuth client credentials (OpenIddict, used with the self-contained identity provider)

To provision the database manually, see Database Provisioning.

SQL Server​

To use SQL Server instead of PostgreSQL, pass -DatabaseEngine mssql to the startup script:

./bootstrap-local-dms.ps1 -DatabaseEngine mssql

-DatabaseEngine mssql runs against the bundled SQL Server 2025 container (dms-mssql, on host port 1435), configured by the .env.mssql overlay; the local startup scripts always register the data store against that container. Pointing the local stack at an external SQL Server is not supported by these scripts. To run against an external or production SQL Server, provision it with the api-schema-tools CLI and register a data store that targets it through the Configuration Service — see Database Provisioning and API Client and Data Store Configuration.

Common Startup Issues​

Timeout Waiting for a Service​

If bootstrap-local-dms.ps1 times out waiting for a service to become healthy:

  1. Confirm Docker is running: docker info
  2. Check for port conflicts: netstat -an | grep -E "8080|8081|5435"
  3. Review container logs: docker compose logs dms or docker compose logs config
  4. Try a clean restart, passing the same flags you used at startup (e.g. -DatabaseEngine mssql, -IdentityProvider keycloak):
./bootstrap-local-dms.ps1 -d -v # add your original flags here
./bootstrap-local-dms.ps1 # add your original flags here

Schema Fingerprint Mismatch​

The Ed-Fi API validates a schema fingerprint on first use. If the deployed database schema does not match the API schema the service loaded — for example, after upgrading to a new version — the API responds with HTTP 503 until the database is re-provisioned for the current schema. Because the result is cached for the process lifetime, resolve it locally with a full reset (which re-provisions a fresh database and restarts the services. Pass the same flags you used at startup (e.g. -DatabaseEngine mssql, -IdentityProvider keycloak):

./bootstrap-local-dms.ps1 -d -v # add your original flags here
./bootstrap-local-dms.ps1 # add your original flags here

For details, see Database Provisioning.

PowerShell Execution Policy (Windows)​

If Windows blocks the startup script, relax the execution policy for the current user:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser