# Docmost Cloudron Configuration Your Docmost instance is configured with Cloudron defaults but can be customized after installation. ## Current Configuration **Email**: Uses Cloudron's internal email server by default **Storage**: Uses local storage in `/app/data/uploads` by default **Database**: PostgreSQL (managed by Cloudron) **Cache**: Redis (managed by Cloudron) ## Custom Configuration To customize your Docmost installation, you can create a `.env` file in the app's data directory: ### 1. Access Your App's Data Directory ```bash # SSH into your Cloudron server cloudron exec --app docmost # Navigate to the data directory cd /app/data # Copy the sample configuration cp env.sample .env ``` ### 2. Edit the Configuration ```bash # Edit the .env file nano .env ``` ### 3. Restart the App After making changes to the `.env` file, restart the app: ```bash cloudron restart --app docmost ``` ## Common Customizations ### Custom Email Server To use Gmail instead of Cloudron's email server: ```bash # In /app/data/.env MAIL_DRIVER=smtp SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_USERNAME=your-email@gmail.com SMTP_PASSWORD=your-app-password SMTP_SECURE=true MAIL_FROM_ADDRESS=your-email@gmail.com MAIL_FROM_NAME="Docmost" ``` **Important**: Values with spaces must be quoted with double quotes. ### S3 Storage To use Amazon S3 or compatible storage: ```bash # In /app/data/.env STORAGE_DRIVER=s3 AWS_S3_ACCESS_KEY_ID=your-access-key AWS_S3_SECRET_ACCESS_KEY=your-secret-key AWS_S3_REGION=us-east-1 AWS_S3_BUCKET=your-bucket-name AWS_S3_ENDPOINT=https://s3.amazonaws.com ``` ### File Upload Limits To increase file upload limits: ```bash # In /app/data/.env FILE_UPLOAD_SIZE_LIMIT=100MB FILE_IMPORT_SIZE_LIMIT=100MB ``` ### Custom Draw.io Server To use a self-hosted draw.io server: ```bash # In /app/data/.env DRAWIO_URL=https://your-drawio-server.com ``` ## Available Environment Variables See the full list of available environment variables in the [Docmost documentation](https://docmost.com/docs/self-hosting/environment-variables). ## Troubleshooting ### Check Current Configuration ```bash cloudron exec --app docmost -- env | grep -E "(MAIL|STORAGE|S3)" | sort ``` ### View App Logs ```bash cloudron logs --app docmost ``` ### .env File Format Errors If you see errors like `line 1: Docmost: command not found`, your .env file has syntax errors: 1. **Values with spaces must be quoted**: ```bash # Wrong: MAIL_FROM_NAME=My Company # Correct: MAIL_FROM_NAME="My Company" ``` 2. **No spaces around equals sign**: ```bash # Wrong: MAIL_DRIVER = smtp # Correct: MAIL_DRIVER=smtp ``` 3. **Check for invalid characters**: ```bash # Validate your .env file: cloudron exec --app docmost -- cat /app/data/.env ``` ### Reset to Defaults To reset to Cloudron defaults, simply remove the custom .env file: ```bash cloudron exec --app docmost -- rm -f /app/data/.env cloudron restart --app docmost ``` ## Security Notes - The `.env` file is stored in `/app/data/` which is included in Cloudron backups - Database and Redis credentials are managed by Cloudron and should not be changed - Email credentials are stored in plaintext in the `.env` file - Consider using app-specific passwords for email providers