Skip to main content
Audit logs record who did what, when, from where, and with what outcome across your Formbricks instance.
Audit logging is an Enterprise feature. Configure your Enterprise license before enabling it.

Benefits Of Audit Logging

  • Compliance evidence — Exported audit events can support the controls and evidence required by your compliance program.
  • Security investigation support — Audit logs provide visibility into covered user and system actions during an incident.
  • Operational accountability — Track covered changes to answer questions such as “who modified this?” or “when was this deleted?”.

Enabling Audit Logging

  1. Set the following environment variables in your deployment (Docker Compose, Kubernetes, etc.):
.env
  1. Redeploy your containers.
  2. Confirm you can see audit logs in the output of your containers.
Audit logs are written to stdout as JSON Lines. Configure your container platform or logging agent to forward records with level: "audit" to your central logging destination.

Configure Trusted Proxy Hops

AUDIT_LOG_GET_USER_IP=1 uses Formbricks’ shared client-IP resolver. TRUSTED_PROXY_HOP_COUNT must equal the number of trusted CDN, WAF, load-balancer, ingress, and Envoy hops that append to X-Forwarded-For before the request reaches Formbricks. The application and Helm chart default to 1, which assumes one trusted reverse proxy. Examples:
Count the hops in your real deployment; do not copy an example blindly. A value higher than the real chain can let a client prepend and spoof the selected address. A value lower than the real chain selects an intermediate proxy instead of the client. A missing, malformed, or shorter-than-configured chain fails closed to untrusted-client-ip. This setting also affects IP-based rate limits and captured response IP metadata.
With the Helm chart, configure the values under deployment.env:

Understanding The Log Format

Audit logs are JSON Lines (one JSON object per line). A typical entry looks like this:
Key fields:

Centralized Logging And Compliance

Formbricks emits audit events to the application logger. The container’s stdout stream is not, by itself, a durable or immutable audit store. Your deployment must forward the events to a logging platform and configure the controls required by your organization, including:
  • retention and archival periods;
  • write-once or immutability controls;
  • access controls and separation of duties;
  • deletion protection and tamper detection; and
  • monitoring for delivery failures.
Audit logging can support a SOC 2 or other compliance program, but enabling this feature does not make a deployment compliant. Suitability depends on the coverage, forwarding, storage, and operational controls in your environment.

Additional Details

  • Redacted values: Sensitive fields covered by the audit redaction helpers are replaced with "********" before the event is written.
  • Success and failure: Covered operations can emit both success and failure events.
  • Delivery model: Formbricks writes events through the application logger; query APIs, long-term retention, and exports belong to your logging platform.
  • Scope limitation: For now, only events triggered inside the Formbricks application are audited. This means:
    • Embed and Link Surveys are not included in the audit logs.
    • Survey responses created via the client API or client-side SDKs are not audited.