Choose a language and storage backend, then apply the matching migrations.
Headgate separates its runtime from database drivers. Install only the adapter your service
uses. PostgreSQL is the reference backend; MySQL, Redis, and SQLite share the core admission
contract.
[dependencies]headgate = "0.1.10"headgate-postgres = "0.1.10" # or headgate-mysql / headgate-redis / headgate-sqlite# Optional: headgate-workflow, headgate-crypto, headgate-otel,# headgate-prometheus, headgate-uiserde = { version = "1", features = ["derive"] }tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
Use Go 1.27 or newer for Headgate v0.1.10. The updated PostgreSQL driver and Unicode
dependencies require this minimum version; use a current Go patch release in production.
go get github.com/mujhtech/headgate/gogo get github.com/mujhtech/headgate/go/driver/headgatepgx# or driver/headgatemysql / driver/headgateredis / driver/headgatesqlite# Optional standalone modules:# go get github.com/mujhtech/headgate/go/headgateworkflow# go get github.com/mujhtech/headgate/go/headgatecrypto# go get github.com/mujhtech/headgate/go/headgateprometheus
Reference deployment and transactional application work
Transactions, inspection, notifications
MySQL
Existing MySQL infrastructure
Transactions and inspection; polling only
Redis
Low-latency Redis-native fleets
Atomic Lua admission; no SQL transactions
SQLite
Embedded applications, local development, and small fleets
Transactions and inspection; polling only
Run migrations before workers or the control API on PostgreSQL and MySQL. SQLite installs
its verified embedded schema when the adapter opens. Do not copy SQL between languages;
the repository gate checks matching schema assets byte-for-byte.