Skip to main content
Permify is distributed as a Docker image (ghcr.io/permify/permify) and a pre-built binary. Choose the method that matches your environment.
By default Permify listens on port 3476 for HTTP/REST and port 3478 for gRPC. In-memory storage is used unless you configure a database.

Verify your installation

After starting Permify with any method below, confirm it is running:
curl http://localhost:3476/healthz
A healthy instance returns SERVING.

Installation methods

1

Pull and run the container

docker run -p 3476:3476 -p 3478:3478 ghcr.io/permify/permify
This starts Permify with in-memory storage. Data is lost when the container stops.
2

Mount a config file

Create a config.yaml based on the configuration reference, then mount it:
docker run \
  -p 3476:3476 \
  -p 3478:3478 \
  -v /path/to/config:/config \
  ghcr.io/permify/permify
The directory mounted at /config must contain your config.yaml.
3

Configure with flags instead (optional)

You can pass any configuration option as a CLI flag:
docker run \
  -p 3476:3476 \
  -p 3478:3478 \
  ghcr.io/permify/permify \
  serve \
  --database-engine=postgres \
  --database-uri="postgres://user:password@host:5432/permify"
To see all flags:
docker run ghcr.io/permify/permify --help
4

Verify

curl http://localhost:3476/healthz

Database setup

For any production deployment you should use PostgreSQL instead of in-memory storage.
PostgreSQL 13.8 or later is required. Permify validates the version at startup and exits on older versions.

Minimal configuration

database:
  engine: postgres
  uri: postgres://user:password@host:5432/permify?sslmode=require
  auto_migrate: true
  max_connections: 20
  min_connections: 2
  max_connection_lifetime: 30m
  max_connection_idle_time: 5m

For the Watch API

If you use the Watch API, you must also enable commit timestamp tracking on your PostgreSQL instance:
ALTER SYSTEM SET track_commit_timestamp = on;
Then restart PostgreSQL for the change to take effect.

Multi-replica deployments with pgcat

When running multiple Permify replicas, use pgcat as a connection pooler in front of PostgreSQL to prevent connection exhaustion:
database:
  engine: postgres
  writer:
    uri: postgresql://postgres:DB_PASSWORD@pgcat:6432/permify?plan_cache_mode=force_custom_plan&default_query_exec_mode=cache_describe
  reader:
    uri: postgresql://postgres:DB_PASSWORD@pgcat:6432/permify?plan_cache_mode=force_custom_plan&default_query_exec_mode=cache_describe
  max_connections: 1
  min_connections: 0
See the full setup guide in the Configuration reference.

Build docs developers (and LLMs) love