Ory’s production guidance for self-hosted Hydra highlights configuration decisions that deserve explicit review before deployment:
- Restrict administrative access. Keep the administrative API, normally port 4445, off the public internet. Its endpoints lack built-in access control. Token introspection requires authentication, but a gateway or authorization proxy must restrict which clients can use it.
- Set secrets explicitly. Use cryptographically secure random values for system, cookie and pagination secrets. Production deployments should not rely on defaults.
- Protect transport. Put public endpoints behind a gateway or load balancer with TLS. Preserve the public host and configure path forwarding correctly.
- Limit outbound reach. Set
default_http_client.private_ip_ranges.disallowtotrueto block private-IP requests. Review feature overrides and keep exceptions narrow; some HTTP clients do not support exception lists.
Plan rotation as well. Ory’s key-rotation documentation explains that new system and cookie encryption keys go first in their lists, while retained older keys decrypt existing data. Rotation does not automatically re-encrypt stored data, so removing old keys can invalidate it.