Skip to main content

Nexus PDP configuration reference

This reference lists the environment variables that configure Permit Nexus PDP (permitio/nexus-pdp), a self-hosted policy decision point (PDP). It is for operators who deploy and tune Nexus PDP. The only required variable is PDP_API_KEY. For deployment requirements such as volumes, probes, and memory, see Deploy Nexus PDP.

Nexus PDP configuration can change between releases

Permit can rename, replace, or remove the variables and defaults on this page in a later release. Pin the Nexus PDP image as described in Image name and tags, not to a moving tag such as 0-beta, and check this page when you upgrade. If you depend on a specific variable, tell Permit support at support@permit.io.

The container PDP (the Edge PDP image permitio/pdp-v2) uses a different set of variables. See the container PDP configuration reference. A variable with the same name can mean something different on each PDP type.

Credentials​

VariableDefaultDescription
PDP_API_KEYRequiredThe Nexus PDP API key of the Permit environment this Nexus PDP serves, from the Permit dashboard. As of November 2026, the dashboard labels this action Copy Nexus PDP API Key. The ordinary environment API key does not work.

PDP_API_KEY is the only credential Nexus PDP needs. The PDP_API_KEY value:

  • binds the container to exactly one Permit environment,
  • authenticates the container to Permit's control plane,
  • carries the address of the control plane, so Nexus PDP connects without a separate URL setting,
  • is the bearer token that the Nexus PDP authorization API accepts from your services,
  • is accepted by the Permit API with the same access as the environment API key, so protect it the same way.
No control-plane URL to set on Nexus PDP

Leave PDP_CONTROL_PLANE unset unless Permit support asks you to set it. On the container PDP, PDP_CONTROL_PLANE is the Permit API URL. On Nexus PDP, PDP_CONTROL_PLANE overrides the control-plane address that PDP_API_KEY carries.

Storage and ports​

VariableDefaultDescription
EDGE_DB_PATH/var/lib/edge-pdp/dbDirectory of the embedded database. Must be on a persistent volume.
EDGE_DATA_DIR/var/lib/edge-pdpDirectory of the event store and generated configuration. Must be on a persistent volume. It never holds the NATS credentials: at startup, Nexus PDP removes a copy that an older version left here.
PDP_RUNTIME_DIR/tmp/edge-pdpDirectory of the NATS credentials Nexus PDP receives from the Permit control plane at startup. An absolute path to a directory that the user Nexus PDP runs as (user ID 10001 in the image) can write, owned by that user or by root, not a symbolic link, not on the persistent volume, and not under EDGE_DATA_DIR or EDGE_DB_PATH. A Kubernetes emptyDir mount point is root-owned and writable by every user, so it qualifies. Nexus PDP keeps the credentials in an owner-only subdirectory. On Kubernetes, mount an emptyDir with medium: Memory here, into the Nexus PDP container only; it also works with readOnlyRootFilesystem. Use one directory per Nexus PDP: a second Nexus PDP on the same directory fails to start.
EDGE_PUBLIC_PORT7000Port of the authorization API, the only port your services call.
EDGE_HEALTH_PORT7001Port of the health and readiness endpoints. Point probes at this port, not at the authorization port.

EDGE_DB_PATH and EDGE_DATA_DIR must be on persistent storage that survives restarts: if either is on ephemeral storage, every restart runs a full cold start. PDP_RUNTIME_DIR must not be on the persistent volume. See Nexus PDP deployment requirements.

Nexus PDP also uses ports 7002, 7003, 8181, 4222, and 8222 internally, bound to loopback only. See Ports used by Nexus PDP. Expose only the ports set by EDGE_PUBLIC_PORT and EDGE_HEALTH_PORT.

Behavior and tuning​

VariableDefaultDescription
RUST_LOGinfoLog level of Nexus PDP. Set info,edge_pdp=debug to add Nexus PDP debug logs.
PDP_DEBUGUnset (off)Set to true to add debug information to policy evaluation requests.
OPA_TIMEOUT_MS2000Timeout for each policy evaluation request to Open Policy Agent (OPA), in milliseconds: the deadline of a whole decision (except the list endpoints, /user-permissions, /user-tenants, /authorized_users and the AuthZEN searches, which run on their own longer deadline set by PDP_ABAC_LIST_TIMEOUT_MS). Keep it above QUERY_DEFAULT_TIMEOUT_MS, which Nexus PDP warns about at startup when it is not, and below your client's own timeout.
QUERY_DEFAULT_TIMEOUT_MS1000Time limit for each data query OPA makes during a decision, in milliseconds. A query that runs past it fails, and the check is denied: Nexus PDP returns its normal deny answer, and only a Failed to query warning in the Nexus PDP log tells it apart from a real deny.
EDGE_PARALLELISM4Number of change transactions Nexus PDP applies concurrently.
EDGE_DECISION_LOG_OPT_OUTfalseSet to true to stop sending decision logs to Permit.
EDGE_DRAIN_TIMEOUT_SECS10Seconds that in-flight requests have to finish during shutdown before Nexus PDP aborts them.
EDGE_CHILD_TERMINATION_TIMEOUT_SECS30Seconds that OPA and the NATS leaf node have to stop after SIGTERM before Nexus PDP sends SIGKILL.
EDGE_WAL_RETENTION_INTERVAL_SECS300Seconds between two passes that remove old changes from the event store. In 0.8.0 and later. See Disk.
EDGE_WAL_RETENTION_MIN_AGE_SECS3600Minimum age, in seconds, of a change before Nexus PDP may remove it from the event store. Nexus PDP removes only changes it has applied and that the database it serves covers, and always keeps the newest. In 0.8.0 and later.

Set the Kubernetes terminationGracePeriodSeconds to at least EDGE_DRAIN_TIMEOUT_SECS plus EDGE_CHILD_TERMINATION_TIMEOUT_SECS, which is 40 seconds at the defaults. See Nexus PDP deployment requirements.

Child process logging​

VariableDefaultDescription
EDGE_NATS_LOG_LEVELFollows RUST_LOGLog level of the NATS leaf node that connects to the control plane: info, debug, or trace.
EDGE_OPA_LOG_LEVELFollows RUST_LOGLog level of OPA: debug, info, or error.
Child process debug levels write authorization data to logs

EDGE_NATS_LOG_LEVEL=trace logs raw message payloads, which contain your authorization data. EDGE_OPA_LOG_LEVEL=debug logs authorization request and response bodies. Set these levels only for short debugging sessions, and remove them before the container serves production traffic.

Offline mode and stale serving​

These variables set how long Nexus PDP stays ready while it is behind the control plane, whether it may start without the control plane, and how long it may serve after the control plane last accepted it. They apply to Nexus PDP 0.8.1 and later: Nexus PDP 0.8.0 and earlier do not read them. For the behavior they control, see Nexus PDP offline mode.

VariableDefaultDescription
PDP_MAX_STALE_SECSUnset (no limit)Seconds a stale episode may last before Nexus PDP reports not ready (503, "state": "not_ready"). Past it, Nexus PDP still answers a caller that reaches it, with X-Permit-Stale-Seconds. At least 1: 0 fails startup. See Limit how long a stale Nexus PDP stays ready.
PDP_OFFLINE_ALLOW_UNPROTECTED_VOLUMEfalseSet to true to let a startup that cannot reach the control plane serve the data already on its volume. Read from the container environment only. Read what it accepts in Start Nexus PDP without the control plane before you set it.
PDP_SIGNUP_RECORD_MAX_AGE_SECS604800 (7 days)Seconds after the control plane last accepted this Nexus PDP during which it may start offline, serve after an offline start, or serve while it heals a long outage. At least 1: 0 fails startup. See The serve cap on an offline start and The heal's ceiling.

Storage engine​

The Nexus PDP embedded database is SurrealDB on RocksDB. The database that serves checks sizes its memory from the container's memory limit, or from the host's memory when the container has none, not from environment variables:

SettingSize
Block cache (the read cache)Half the memory limit minus 1 GiB, and at least 16 MiB
Size of each write buffer32 MiB below a 1 GiB limit, 64 MiB below 16 GiB, and 128 MiB from 16 GiB

Set a memory limit, for example resources.limits.memory on Kubernetes. In Nexus PDP 0.8.0 and later, Nexus PDP refuses to start below 2304 MiB and exits with code 78, because below that the block cache is smaller than two write buffers and writes can stall. See Nexus PDP resource footprint.

The SURREAL_ROCKSDB_* variables, such as SURREAL_ROCKSDB_BLOCK_CACHE_SIZE, SURREAL_ROCKSDB_WRITE_BUFFER_SIZE, SURREAL_ROCKSDB_MAX_WRITE_BUFFER_NUMBER, and SURREAL_ROCKSDB_BACKGROUND_THREADS, don't change the memory of the database that serves checks. Only the step of a cold start that loads the snapshot reads them. In 0.8.0 and later, Nexus PDP logs a WARN at startup that lists any that are set. You can't lower the memory Nexus PDP needs with them.

Give the Nexus PDP container a memory limit of 4 GiB to start, and more for a large data set. Never set it below 2.5 GiB.