
Deploy Hasura on Your Own Server
Instant realtime GraphQL APIs on any Postgres application, existing or new
Want to deploy Hasura on your server faster? Try Senate with one-command setup, automatic HTTPS and monitoring.
What is Hasura?
Instant Realtime GraphQL on Postgres with web admin console. This Docker Compose setup runs Hasura GraphQL Engine along with a Postgres database with the PostGIS extension.
Self-Host Hasura
Follow these steps to deploy on your own server.
Install Docker
Skip this step if Docker is already installed on your server.
curl -fsSL https://get.docker.com | sh
Configure
Customize the settings below. Defaults work for most cases.
General
Deploy
Copy the configuration and run it on your server.
services:
hasura:
image: hasura/graphql-engine:v1.2.2
environment:
HASURA_GRAPHQL_ADMIN_SECRET: ""
HASURA_GRAPHQL_DATABASE_URL: postgres://:@hasura-db:5432/
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
depends_on:
- hasura-db
hasura-db:
image: postgres:12
environment:
POSTGRES_DB: ""
POSTGRES_INITDB_ARGS: ""
POSTGRES_PASSWORD: ""
POSTGRES_USER: ""
volumes:
- hasura-db-data:/var/lib/postgresql/data
volumes:
hasura-db-data: {}
Then run:
docker compose up -d
Access
Once started, access your app at http://localhost:8080
Why Self-Host Hasura?
Full Data Ownership
Your data stays on your servers. No third-party access.
No Monthly Fees
Pay only for your server. No per-seat or usage charges.
Complete Control
Customize, backup, and scale on your own terms.
Privacy & Compliance
Meet GDPR, HIPAA, or internal security requirements.
Technical Details
Docker Image
hasura/graphql-engine:${hasura_version}Want to go faster?
Try Senate! Senate handles Docker, HTTPS, updates, and monitoring for you. Deploy any of our 300+ apps with a single command.
Install on any Linux server:
sh -c "$(curl -sSL https://get.senate.sh)"