Skip to main content

Authentication & Access

Reset admin password

For Docker Compose deployments:
Enter the account email and new password when prompted. For source code deployments, run the same command from the api directory.

401 errors after login

If the error started after a domain change, check that the public URLs match the new domain. Also review CONSOLE_CORS_ALLOW_ORIGINS and WEB_API_CORS_ALLOW_ORIGINS under CORS Configuration. From dify/docker, validate and apply the changes with the deployment’s existing Compose project and options:

Configuration

Change default port

Modify .env configuration:
For API service port changes, update the nginx configuration in docker-compose.yaml.

Increase file upload limits

Update in .env:
  • UPLOAD_FILE_SIZE_LIMIT - Maximum file size
  • NGINX_CLIENT_MAX_BODY_SIZE - Must match to avoid issues

Workflow complexity limits

Adjust MAX_TREE_DEPTH in web/app/components/workflow/constants.ts (default: 50). Note: Excessive depth impacts performance.

Node execution timeout

Set TEXT_GENERATION_TIMEOUT_MS in .env to control runtime per node.

Email Configuration

Not receiving password reset emails? Configure mail settings in .env:
  1. Set up mail parameters (SMTP settings)
  2. Restart services:
Check spam folder if emails still don’t arrive.

Invite members without email service

In local deployments without email configured, the invitation page displays a link after sending. Copy and forward this link to users manually.

Database Issues

Connection errors with pg_hba.conf

If you see:
Allow connections from the error’s network segment:

File not found error for encryption keys

This error occurs after changing deployment methods or deleting api/storage/privkeys:
Reset encryption key pairs: Docker Compose:
Source code (from api directory):
This is irreversible. Existing LLM credentials and tool credentials (built-in, custom, and MCP tools) are purged for every workspace and must be re-entered.

Workspace Management

Rename workspace

Modify the tenants table in the database directly.

Change application access domain

Set APP_WEB_URL to the new public base URL. See Common Variables for where to set it and how to apply the change.
Last modified on November 18, 2026