Self-hosted app·Websites, APIs and internal tools
Hasura hosting on a Swiss VPS.
Hasura hosting on a Swiss VPS in ALP1: a production Docker Compose for GraphQL Engine v2 with Postgres and TLS, sizing and costs from $12.99/mo.
- Hasura
- GraphQL
- PostgreSQL
- Docker
ALP1·Swiss Alps
In stockRecommended for this use case
- 1 Gbps port15 TB of transfer a monthIncluded
- Debian 13preinstalled with the orderIncluded
- DDoS protection, 1 IPv4VNC console and full rootIncluded
Optional: daily backups +20% · extra IPv4 $2 · priority support $10
Pay yearly: $116.99 a year, about 25% less
- No KYC
- Crypto only
- Swiss jurisdiction
ALP1 · Swiss Alps · Our own hardware, under Swiss law, paid in crypto
- 4 vCPU, 4 GB RAM
- 160 GB NVMe local storage
- 15 TB transfer on a 1 Gbps port
- DDoS protection included
- Swiss jurisdiction, outside the EU
01/07
Short answer.
Yes. Hasura GraphQL Engine v2 and its Postgres database fit on one Cloud VPS Standard in ALP1, our location in the Swiss Alps: 4 vCPU, 4 GB RAM, 160 GB NVMe and 15 TB of transfer a month for $12.99. The plan is the easy part. What decides whether the deployment is safe is the admin secret, because a Hasura instance reachable without one gives anyone who finds it full read and write access to your database, raw SQL included, and the quick-start compose file Hasura publishes leaves that secret commented out. The configuration on this page sets it, keeps the admin endpoints off the public internet and switches off the usage telemetry the engine sends to Hasura by default.
02/07
What Hasura is, and who maintains it.
Hasura GraphQL Engine reads a Postgres schema and serves a GraphQL API over it: queries, mutations and live subscriptions over websockets, with role-based row and column permissions compiled into the SQL it generates. Around that core sit event triggers that call a webhook when rows change, scheduled triggers, actions that hand custom logic to your own HTTP service, and remote schemas for stitching in other GraphQL APIs. The server is written in Haskell and listens on port 8080. It keeps its own metadata in an hdb_catalog schema in Postgres and needs the pgcrypto extension there. It does not handle sign-up or login: it verifies a JWT issued by your auth service, or asks an auth webhook, and maps claims such as x-hasura-role onto permissions.
Hasura, Inc. was founded by Tanmai Gopal and Rajoshi Ghosh, and since 2025 the company's product focus has been PromptQL, an AI data agent built on its newer DDN platform. That is worth knowing before you commit a codebase to the v2 engine. v2 is still maintained: patch releases went out on 20, 23 and 27 October 2026 across the 2.45, 2.50 and 2.51 lines, and v2.51.3 is the current stable tag as we write. The v2 core is licensed under Apache-2.0.
Only one of Hasura's two engines belongs on a single VPS. You can self-host Hasura's v3 engine, the one behind DDN, under Docker Compose, but Hasura's guide for that expects a Hasura account and project metadata built with the DDN CLI, and the fully self-hosted control plane (Private DDN Self-Hosted) requires an enterprise licence and a Kubernetes cluster. If the point of self-hosting is an API that depends on your server and your database and nothing else, v2 is the engine to run, and everything below is about v2.
Our servers are in Switzerland and answer to Swiss law. We act only on orders from competent Swiss authorities, and a request from abroad has to pass through one of them first.
03/07
Requirements and sizing.
Hasura's performance-tuning guide names 4 CPUs and 8 GB of RAM as a good fit for a wide range of production workloads, and its Enterprise getting-started page recommends at least that for production. We read this as guidance for an engine with a node to itself under mixed load, not as a floor for one project whose database lives on the same VM. On Standard the engine and Postgres share 4 GB: we give Postgres 1 GB of shared_buffers as a starting point and leave the rest to the engine, the page cache and the system. Two signals in your monitoring mean it is time for Pro (6 vCPU, 8 GB, 320 GB NVMe, 20 TB, $22.99): Postgres reads going to disk because the working set no longer fits in memory, or engine memory that climbs with the number of open subscriptions, since every live subscriber holds a websocket on the engine.
| Component | Grows with | On Cloud VPS Standard |
|---|---|---|
hasura/graphql-engine:v2.51.3 | request rate (CPU); schema size and open websockets (RAM) | Not measured |
postgres:17 | shared_buffers, connection count, working set | Not measured |
| Disk | data, WAL, container images | 160 GB NVMe |
| Ports | 80 and 443 public; 8080 and 5432 never public | — |
Hasura supports every Postgres release that is still supported upstream; we use 17 here. Transfer on VPS plans is metered rather than unmetered. Standard includes 15 TB a month on a 1 Gbps port, which at an average response of 20 KB comes to roughly 750 million responses, a theoretical figure that ignores TLS overhead and websocket keepalives.
04/07
How to deploy it with us.
- 01Order Standard with Debian 13 at the deploy page and point an A record such as
api.example.comat the server's IPv4 address. - 02Install Docker Engine and the Compose plugin from Docker's own apt repository, which supports Debian 13 (trixie).
- 03Create
/opt/hasurawith the two files below, generate the secrets and start the stack. - 04Do admin work through an SSH tunnel, never over the public hostname.
# /opt/hasura/compose.yaml — Hasura Docker stack: engine v2 + Postgres 17 + Caddy
services:
postgres:
image: postgres:17
restart: unless-stopped
shm_size: 256mb # Docker's 64 MB default is too small for parallel queries
command: ["postgres", "-c", "shared_buffers=1GB", "-c", "max_connections=100"]
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 10
graphql-engine:
image: hasura/graphql-engine:v2.51.3
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
ports:
- "127.0.0.1:8080:8080" # loopback only, reached through an SSH tunnel
environment:
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
PG_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_ADMIN_SECRET}
# HASURA_GRAPHQL_JWT_SECRET: '{"type":"RS256","jwk_url":"https://auth.example.com/jwks"}'
HASURA_GRAPHQL_ENABLE_CONSOLE: "false"
HASURA_GRAPHQL_DEV_MODE: "false"
HASURA_GRAPHQL_ENABLE_TELEMETRY: "false"
HASURA_GRAPHQL_ENABLED_APIS: graphql,metadata
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup,http-log,webhook-log,websocket-log
HASURA_GRAPHQL_CORS_DOMAIN: https://app.example.com
HASURA_GRAPHQL_REDACT_EVENT_TRIGGER_LOGS: "true"
HASURA_GRAPHQL_REDACT_ACTION_HANDLER_LOGS: "true"
caddy:
image: caddy:2
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
volumes:
pg_data:
caddy_data:# /opt/hasura/Caddyfile
api.example.com {
@admin path /v1/metadata* /v2/query* /v1/query* /v1alpha1/* /console*
respond @admin 404
reverse_proxy graphql-engine:8080
}# as root on the VPS
mkdir -p /opt/hasura && cd /opt/hasura
printf 'POSTGRES_PASSWORD=%s\nHASURA_ADMIN_SECRET=%s\n' \
"$(openssl rand -hex 24)" "$(openssl rand -hex 32)" > .env
chmod 600 .env
docker compose up -d
curl -s https://api.example.com/healthz # expect: OKAlmost every line departs from Hasura's own quick-start manifest for a reason. As of 4 November 2026 the manifest on the stable branch pins v2.46.0 and Postgres 15, turns on the console and dev mode, leaves the admin secret commented out, publishes port 8080 on all interfaces, and starts a Java data-connector agent on port 8081 for Athena, MariaDB, MySQL, Oracle and Snowflake. On a Postgres-only deployment that agent is memory you pay for and never use, so it is gone. Publishing a port with Docker is also not governed by ufw: Docker writes its own packet-filter rules, and its documentation warns that published ports bypass host firewall rules, so a 8080:8080 mapping is public whatever your firewall says. Here only Caddy publishes ports, the engine is bound to loopback and Postgres is not published at all.
The engine settings follow Hasura's production checklist. Dev mode stays off because it returns internal error detail to clients. CORS is restricted to your front-end origin, where Hasura would otherwise accept every origin. query-log is left out of the log types because it writes the SQL generated for each request to stdout, which can carry values from user requests into your logs, and the redaction flags added in v2.50.1 keep request bodies, session variables and webhook responses out of the event-trigger and action delivery logs. Secrets are generated as hex because a / or + from base64 inside a Postgres password breaks the connection URL.
Caddy obtains and renews the certificate for api.example.com once DNS resolves. The @admin matcher answers 404 for the metadata, query and pg_dump APIs and the console path, so the public hostname serves /v1/graphql, any RESTified endpoints under /api/rest/ and /healthz, and nothing administrative. Schema and permission changes go through the Hasura CLI over a tunnel, which also leaves you with metadata and migrations as files in git, the way changes should reach production anyway. The first time, add the database as a source named default that reads its URL from PG_DATABASE_URL.
# on your workstation, inside a project created with `hasura init`
ssh -N -L 8080:127.0.0.1:8080 user@api.example.com &
hasura console --endpoint http://localhost:8080 --admin-secret "$HASURA_ADMIN_SECRET"
hasura metadata export # commit the resultBack the database up logically as well as at disk level. A daily VPS backup restores the whole machine to last night; a pg_dump lets you bring back the one table someone dropped at 14:00 without rolling back everything written since. Restic can stream the dump straight into an S3-compatible bucket on our object storage, where 250 GB costs $1.99 a month with no request fees:
# nightly from cron or a systemd timer; restic reads RESTIC_PASSWORD and the AWS_* keys from the environment
cd /opt/hasura && docker compose exec -T postgres pg_dump -U postgres -Fc postgres \
| restic -r s3:https://<endpoint>/<bucket> backup --stdin --stdin-filename hasura.dumpThe bucket is an S3 target with an endpoint and access keys, not a disk. Do not mount it with rclone and put Postgres's data directory on it.
05/07
Cost.
| Line | Per month |
|---|---|
| Cloud VPS Standard, ALP1 (4 vCPU, 4 GB, 160 GB NVMe, 15 TB, 1 Gbps) | $12.99 |
| Daily VPS backups (+20 %) | $2.60 |
Object storage, 250 GB, for pg_dump history | $1.99 |
| Total | $17.58 |
Yearly billing takes roughly 25 % off the VPS, which would put Standard near $9.75 a month; that is a theoretical calculation, and the exact figure is on our pricing page. Pro is $22.99 before options, and an extra IPv4 is $2 a month. Prices and balances are in US dollars and paid in crypto only: Monero, Bitcoin, Tether (USDT), Ethereum, Litecoin and other coins. Top-ups run from $25 to $5,000, with a bonus of 5 % from $50, 10 % from $100, 15 % from $250 and 20 % from $500, and the unused paid part of a top-up is refundable within 14 days. The account itself is no-KYC: an email address is enough. The v2 engine costs nothing to run; Hasura sells its Enterprise-only features, such as response caching, separately, and that arrangement is between you and Hasura.
06/07
Where the data sits.
The VPS runs in ALP1, in the Swiss Alps, operated by Hosta AG, a Swiss société anonyme (IDE CHE-107.875.655) at Käppeligasse 1, 4125 Riehen. The revised Federal Act on Data Protection has applied since 1 September 2023, and on 15 January 2024 the European Commission's review confirmed that Switzerland still ensures an adequate level of protection, so personal data of EU users can be stored here without additional transfer safeguards. As of 31 October 2026 the US Department of Justice lists CLOUD Act executive agreements with the United Kingdom and Australia only, none with Switzerland. That describes treaties rather than guaranteeing that no foreign authority can ever reach the data, and our offshore hosting page sets out where the limits lie.
For a Hasura deployment the more practical point is inside your own configuration. Unless you disable it, the engine and its console send usage telemetry to Hasura's servers at telemetry.hasura.io, and every action or event-trigger webhook you configure sends data wherever you point it. Keeping data in Switzerland depends on those settings as much as on where our racks stand.
07/07
Limits and acceptable use.
We run the hardware, the network and the hypervisor; everything inside the VM is yours to operate. That means patching Debian, Docker and the Hasura image, keeping the admin secret out of client code and repositories, writing permissions that expose only what each role should see, and testing restores rather than assuming them. Where the database holds personal data, you decide what the API exposes and to whom, and the obligations under the FADP that follow from that decision are yours.
Use of the service is governed by our acceptable use policy. Outbound port 25 is open on every VPS, so an event trigger wired to a mailer may only send mail its recipients asked for; spam is not allowed, and neither is using the API to make available content you have no right to distribute. A DMCA notice has no direct legal effect in Switzerland. We forward complete complaints to the customer, who must remove the content or justify it, and we act on a decision of a competent Swiss authority, or where the content is manifestly unlawful, in line with the Swico Code of Conduct Hosting 2025. To reach us, open a support ticket from the client panel.
Catalogue·Options
Every configuration, every option, every price.
Six cloud VPS plans on AMD EPYC with local NVMe. Transfer is included on every plan, from 10 TB to 100 TB a month.
| Plan | vCPU | Memory | NVMe | Transfer | Port | Price | Deploy |
|---|---|---|---|---|---|---|---|
| StarterStaging, dev | 2 | 2 GB | 80 GB | 10 TB / month | 1 Gbps | $6.99/mo | Deploy Starter |
| StandardRecommendedSmall apps | 4 | 4 GB | 160 GB | 15 TB / month | 1 Gbps | $12.99/mo | Deploy Standard |
| ProProduction | 6 | 8 GB | 320 GB | 20 TB / month | 1 Gbps | $22.99/mo | Deploy Pro |
| PowerHeavy workloads | 12 | 16 GB | 640 GB | 40 TB / month | 2 Gbps | $42.99/mo | Deploy Power |
| UltraDatabases | 16 | 32 GB | 1000 GB | 60 TB / month | 2 Gbps | $65.99/mo | Deploy Ultra |
| SummitDense hosts | 32 | 64 GB | 2000 GB | 100 TB / month | 5 Gbps | $119.99/mo | Deploy Summit |
Every plan runs on AMD EPYC with local NVMe. Yearly billing costs about 25% less.
Every plan
- AMD EPYCon every host
- Local NVMenot network storage
- DDoS protectionalways on
- 1 IPv4 addressmore at $2 each
- VNC consoleand full root access
FAQ
Questions people ask first.
Short answers about running this in ALP1. If yours is not here, open a ticket from your panel.
Should I run Hasura v2 or v3 on a VPS?
Run v2 unless you are already committed to DDN. v2 is one container next to Postgres and needs no external account. Self-hosting v3 under Docker expects a Hasura account and metadata built with the DDN CLI, and the self-hosted DDN control plane needs an enterprise licence and Kubernetes, which is far more machinery than a single VPS should carry.
Can Hasura use a Postgres server other than the bundled container?
Yes. Point HASURA_GRAPHQL_METADATA_DATABASE_URL and PG_DATABASE_URL at it; Hasura supports every Postgres release still supported upstream and most Postgres-compatible flavours. Keep it close, because every GraphQL request costs at least one round trip to the database. Past the pilot stage, give the metadata its own database and connect with a dedicated role instead of the postgres superuser; Hasura's Postgres requirements page lists the grants it needs.
How do I upgrade the engine safely?
Pin an exact tag, read the changelog of every release you skip, take a pg_dump, then change the tag and run docker compose pull && docker compose up -d. Patch releases can change behaviour: v2.51.1 stopped importing Postgres COMMENTs into GraphQL descriptions, and hasura metadata codemod migrate-postgres-comments moves them into metadata. With a dump taken beforehand, rolling back is a restore rather than a hope.
What happens if my API goes past 15 TB in a month?
Each VPS plan includes the transfer shown on it, and VPS traffic is not unmetered.
Will Hasura run on a dedicated server?
Yes, and Hasura's 4 CPU and 8 GB guidance fits comfortably on a Rigi (EPYC 4244P, 6 cores and 12 threads, 32 GB, $64.99 a month). On bigger machines, limit the engine's CPUs. Since v2.51.3 it warns at startup when automatic detection gives the Haskell runtime more than sixteen capabilities without a CPU limit, because memory use grows with them; a Titlis (32 threads) or a Matterhorn (48 threads) would trigger that warning, and a cpus: limit on the service, or the capability tuning described in the release notes, deals with it.
Sources
Every fact on this page, with its source
Checked 4 Nov 2026 unless noted.
Swiss law and authorities
EU and other countries
Industry, providers and software
- Hasura GraphQL Engine releases: v2.51.3 published 27 October 2026; patch releases of 20, 23 and 27 October 2026; v2.51.1 comment-import change; v2.51.3 runtime-capabilities warning; v2.50.1 log-redaction flagsgithub.com
- Hasura GraphQL Engine repository, licence section (v2 core under Apache-2.0)github.com/hasura/graphql-engine
- Hasura quick-start compose manifest on the stable branch (v2.46.0, Postgres 15, data-connector agent, published ports)raw.githubusercontent.com
- Docker, Install Docker Engine on Debian (Debian 13 support, firewall limitations of published ports)docs.docker.com/engine/install/debian
Other references
- Hasura v2 production checklist (admin secret, console, dev mode, CORS default, enabled APIs, log types)hasura.io
- Hasura telemetry guide (telemetry.hasura.io, HASURA_GRAPHQL_ENABLE_TELEMETRY)hasura.io
- Hasura performance tuning (4 CPUs with 8 GB RAM)hasura.io
- Hasura Enterprise getting started (at least 4 cores and 8 GB RAM in production)hasura.io
- Hasura Postgres requirements (supported versions, pgcrypto, grants)hasura.io
- Hasura v3 self-hosting with Docker Compose (Hasura account, DDN CLI)hasura.io
- Hasura Private DDN Self-Hosted (enterprise licence, Kubernetes)hasura.io
- Company profile of PromptQL / Hasura (founders, 2025 refocus on PromptQL)ai.engineer/orgs/promptql
ALP1·Swiss Alps
Your server in the Alps, ready when you are.
Cloud VPS start at $6.99 a month and are usually set up within minutes of your order.
