Detailed guide on configuring environment variables for OpnForm
.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.
Variable Name | Description |
---|---|
H_CAPTCHA_SITE_KEY | Site key for hCaptcha integration. |
H_CAPTCHA_SECRET_KEY | Secret key for hCaptcha integration. |
RE_CAPTCHA_SITE_KEY | Site key for reCAPTCHA integration. |
RE_CAPTCHA_SECRET_KEY | Secret key for reCAPTCHA integration. |
OPEN_AI_API_KEY | API key for accessing OpenAI services. |
UNSPLASH_ACCESS_KEY | Access key for Unsplash API. |
UNSPLASH_SECRET_KEY | Secret key for Unsplash API. |
FRONT_URL | Public facing URL of the front-end. |
FRONT_API_SECRET | Shared secret with the front-end. |
JWT_TTL | Time to live for JSON Web Tokens (JWT). |
JWT_SECRET | Secret key used to sign JWTs. |
JWT_SKIP_IP_UA_VALIDATION | Set to true to disable JWT IP and User Agent validation (defaults to false ). Useful for dynamic IPs. |
Variable Name | Description |
---|---|
GOOGLE_CLIENT_ID | Client ID for Google OAuth authentication and Google Sheets integration. |
GOOGLE_CLIENT_SECRET | Client secret for Google OAuth authentication and Google Sheets integration. |
GOOGLE_FONTS_API_KEY | API key for accessing Google Fonts (optional). |
STRIPE_CLIENT_ID | Client ID for Stripe Connect OAuth integration for payment processing. |
STRIPE_CLIENT_SECRET | Client secret for Stripe Connect OAuth integration. |
TELEGRAM_BOT_TOKEN | Authentication token for your Telegram bot notifications (bot ID is extracted automatically). |
Variable Name | Description |
---|---|
ADMIN_EMAILS | Comma-separated list of admin email addresses. |
TEMPLATE_EDITOR_EMAILS | Comma-separated list of template editor emails. |
EXTRA_PRO_USERS_EMAILS | Comma-separated list of extra pro user emails. |
MODERATOR_EMAILS | Comma-separated list of moderator email addresses. |
SHOW_OFFICIAL_TEMPLATES | Set to false to hide official templates from OpnForm’s template gallery (defaults to true ). |
Variable Name | Description |
---|---|
PHP_MEMORY_LIMIT | Maximum amount of memory a script may consume. |
PHP_MAX_EXECUTION_TIME | Maximum time in seconds a script is allowed to run. |
PHP_UPLOAD_MAX_FILESIZE | Maximum size of an uploaded file. |
PHP_POST_MAX_SIZE | Maximum size of POST data that PHP will accept. |
Variable Name | Description |
---|---|
DB_CONNECTION | The database driver (e.g., mysql , pgsql ). |
DB_HOST | The database server host (e.g., 127.0.0.1 ). |
DB_PORT | The database server port (e.g., 3306 ). |
DB_DATABASE | The name of the database. |
DB_USERNAME | The username for connecting to the database. |
DB_PASSWORD | The password for the database user. |
Variable Name | Description |
---|---|
NUXT_PUBLIC_APP_URL | Public facing URL of the Nuxt application. |
NUXT_PUBLIC_API_BASE | Base URL for the Laravel API. |
NUXT_PUBLIC_H_CAPTCHA_SITE_KEY | Site key for hCaptcha integration on the front-end. |
NUXT_PUBLIC_RE_CAPTCHA_SITE_KEY | Site key for reCAPTCHA integration on the front-end. |
NUXT_API_SECRET | Shared secret key between Nuxt and Laravel backend. |
NUXT_PUBLIC_ROOT_REDIRECT_URL | Permanently redirects users visiting the root path (/), /integrations, or any non-existent (404) page to the specified URL. This effectively “hides” OpnForm’s public pages while keeping forms and admin functionality accessible. See Subdomain Redirect Configuration for detailed setup and examples. |
.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:
docker compose restart
will not reload environment variables from
your .env
files. You must use down
and up
commands to recreate the
containers.