# Hasura

Serves a GraphQL API over PostgreSQL and other data sources.

- Replaces: [AWS AppSync](https://openlogs.fyi/alternatives/aws-appsync)
- Summary: Paid managed GraphQL API services, such as AWS AppSync.
- Stack: TypeScript (language), PostgreSQL (database)
- Deployment: docker_compose
- License: Apache-2.0 (osi) [source](https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/LICENSE)
- Business model: unknown. The README at the pinned commit does not state a business model, so it stays unknown. ([source](https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/README.md), read 2026-10-22)
- Difficulty: easy. 3 services (1 database or broker: postgres), 1 volume mount, no env values to set, no elevated host access. Heuristic score 2 of 11: easy.
- Requirements: not stated
- Repository: [hasura/graphql-engine](https://github.com/hasura/graphql-engine)

## Install

1. Docker with the Compose plugin ([source](https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/install-manifests/docker-compose/docker-compose.yaml))

   ```text
   A host with Docker and the Docker Compose plugin. This entry runs from a compose file.
   ```

2. Save the compose file as docker-compose.yaml ([source](https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/install-manifests/docker-compose/docker-compose.yaml))

   ```yaml
   services:
     postgres:
       image: postgres:15
       restart: always
       volumes:
         - db_data:/var/lib/postgresql/data
       environment:
         POSTGRES_PASSWORD: postgrespassword
     graphql-engine:
       image: hasura/graphql-engine:v2.51.1
       ports:
         - "8080:8080"
       restart: always
       environment:
         ## postgres database to store Hasura metadata
         HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
         ## this env var can be used to add the above postgres database to Hasura as a data source. this can be removed/updated based on your needs
         PG_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
         ## enable the console served by server
         HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
         ## enable debugging mode. It is recommended to disable this in production
         HASURA_GRAPHQL_DEV_MODE: "true"
         HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
         ## uncomment next line to run console offline (i.e load console assets from server instead of CDN)
         # HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets
         ## uncomment next line to set an admin secret
         # HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
         HASURA_GRAPHQL_METADATA_DEFAULTS: '{"backend_configs":{"dataconnector":{"athena":{"uri":"http://data-connector-agent:8081/api/v1/athena"},"mariadb":{"uri":"http://data-connector-agent:8081/api/v1/mariadb"},"mysql":{"uri":"http://data-connector-agent:8081/api/v1/mysql"},"oracle":{"uri":"http://data-connector-agent:8081/api/v1/oracle"},"snowflake":{"uri":"http://data-connector-agent:8081/api/v1/snowflake"}}}}'
       depends_on:
         data-connector-agent:
           condition: service_healthy
     data-connector-agent:
       image: hasura/graphql-data-connector:v2.51.1
       restart: always
       ports:
         - 8081:8081
       environment:
         QUARKUS_LOG_LEVEL: ERROR # FATAL, ERROR, WARN, INFO, DEBUG, TRACE
         ## https://quarkus.io/guides/opentelemetry#configuration-reference
         QUARKUS_OPENTELEMETRY_ENABLED: "false"
         ## QUARKUS_OPENTELEMETRY_TRACER_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317
       healthcheck:
         test: ["CMD", "curl", "-f", "http://localhost:8081/api/v1/athena/health"]
         interval: 5s
         timeout: 10s
         retries: 5
         start_period: 5s
   volumes:
     db_data:
   ```

3. Start it ([source](https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/install-manifests/docker-compose/docker-compose.yaml))

   ```bash
   docker compose up -d
   ```

4. Open the app ([source](https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/install-manifests/docker-compose/docker-compose.yaml))

   ```text
   Open http://localhost:8080. The compose file publishes host port 8080 for the graphql-engine service.
   ```

Compose file check: config_ok on 2026-10-22.

## Gotchas and maintenance

### Gotchas

- The compose file publishes host ports: Host ports: 8080 (graphql-engine), 8081 (data-connector-agent). A port without a host address listens on all host network interfaces. ([source](https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/install-manifests/docker-compose/docker-compose.yaml), checked 2026-10-22)

### Signals

Computed from a GitHub snapshot taken 2026-10-22.

- Open issues and pull requests: 2365
- Stars: 32123, forks: 2967
- Last push: 2026-10-22 (0 days ago)
- Latest release: v2.51.1 on 2026-10-20 (1 days ago)

## Sources

- [Repository: https://github.com/hasura/graphql-engine](https://github.com/hasura/graphql-engine)
- [License: https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/LICENSE](https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/LICENSE)
- [Business model: https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/README.md](https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/README.md)
- [Compose file: https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/install-manifests/docker-compose/docker-compose.yaml](https://github.com/hasura/graphql-engine/blob/21c41c8890535df5be9ac86e47561471717a805f/install-manifests/docker-compose/docker-compose.yaml)

---
Canonical: https://openlogs.fyi/tools/hasura  
Last updated: 2026-10-22
