.env files for configuration: one for the Laravel backend located in the api directory, and one for the Nuxt front-end located in the client directory.
Public instance URL (self-hosted)
Set these variables before exposing a self-hosted instance publicly or configuring OIDC, OAuth, emails, or any feature that generates links back to your OpnForm instance. They must use the real public URL, neverlocalhost in
production.
For a standard Docker deployment available at https://forms.example.com:
APP_URL, FRONT_URL, and NUXT_PUBLIC_APP_URL normally have the same
public origin. In the standard Docker setup, the API is served through that
same origin under /api, which is why NUXT_PUBLIC_API_BASE ends in /api.
If your API is exposed on a separate public origin, use that browser-accessible
API URL instead.
For the deployment workflow, see Docker Deployment.
For the OIDC-specific checklist, see OIDC SSO Configuration.
Backend Environment Variables
The following environment variables are used to configure the Laravel application (OpnForm’s API).Dedicated guides
There are dedicated configuration pages available for more detailed setup instructions on specific topics:- OAuth Integration Setup
- OIDC SSO Configuration
- File Storage (S3)
- Email Configuration (SMTP)
- Custom Domain
- Subdomain Redirect Configuration
Configuration Environment Variables
Self-hosted Enterprise licensing
Self-hosted Enterprise features are unlocked by activating a license key in the OpnForm UI. Most installations can use the default license API endpoint. Use theLICENSE_* variables only when you need to override checkout, billing portal, or license API URLs for your deployment.
For activation steps and troubleshooting, see License Activation.
OAuth Integration Environment Variables
OAuth integrations enable user authentication and third-party service connections. OpnForm automatically handles OAuth redirect URLs - you don’t need to manually configure redirect URIs in your OAuth applications.For detailed setup instructions for each OAuth provider, see the OAuth
Integration Setup guide.
User Options Environment Variables
PHP Configuration Environment Variables
These PHP configuration variables are particularly important when handling file uploads and processing large amounts of data. If any of these variables are not set, PHP will use its default values from the php.ini configuration. When using Docker, these values are set in the docker-compose.yml file. For non-Docker installations, you’ll need to configure these values in your PHP configuration (php.ini) file.
Database Configuration Environment Variables
These variables are essential for connecting the Laravel backend to your database.Anonymous Telemetry
OpnForm tracks usage of its products which helps the team to improve and deliver better software. You can opt-out of this telemetry at any time. What data is collected? None of your customer data is ever transmitted by OpnForm installation. The telemetry data collected are purely usage statistics of various software features:- Basic usage metrics (form creation, submissions, workspace creation, user additions)
- Anonymous instance identifier (UUID)
- Distribution of forms by type
- No personally identifiable information (PII)
- No form content, submission data, or user emails
- Directly improving the product and identifying the parts of product which are popular
- Identifying areas with limited usage or where our users get stuck
- Prioritizing the next set of features to be developed
- Production environments (
APP_ENV=production) - Self-hosted deployments (
SELF_HOSTED=true) - Disabled in local/development environments
OPNFORM_ANONYMOUS_TELEMETRY_DISABLED=true in your environment variables to disable data collection.
Front-end Environment Variables
The easiest way to get started with OpnForm is through our official managed service in the Cloud. It takes just 1 minute to start building forms with the free plan, with high availability, backups, security, and maintenance all managed for you.
Docker Environment Variables
When running OpnForm with Docker, there are some important considerations for handling environment variables:Docker Compose uses shell variables, a root
.env file next to
docker-compose.yml, or a file passed with --env-file when it resolves
${...} values in the Compose file. The service-level env_file entries
such as ./api/.env and ./client/.env only pass variables into the
containers after the Compose file has already been resolved.Updating Environment Variables
When changing environment variables in your.env files, you need to recreate the containers for the changes to take effect. Simply restarting the containers is not sufficient as Docker only loads environment variables when containers are created.
To apply new environment variable changes: