|
| 1 | +# Configuration |
| 2 | + |
| 3 | +TryPost is configured through environment variables in the `.env` file. |
| 4 | + |
| 5 | +## Basic Configuration |
| 6 | + |
| 7 | +```env |
| 8 | +APP_NAME="TryPost" |
| 9 | +APP_ENV=local |
| 10 | +APP_DEBUG=true |
| 11 | +APP_URL=http://localhost |
| 12 | +``` |
| 13 | + |
| 14 | +| Variable | Description | |
| 15 | +|----------|-------------| |
| 16 | +| `APP_NAME` | Your application name | |
| 17 | +| `APP_ENV` | Environment: `local`, `staging`, `production` | |
| 18 | +| `APP_DEBUG` | Enable debug mode (set to `false` in production) | |
| 19 | +| `APP_URL` | Your application URL | |
| 20 | + |
| 21 | +## Self-Hosted Mode |
| 22 | + |
| 23 | +```env |
| 24 | +SELF_HOSTED=true |
| 25 | +``` |
| 26 | + |
| 27 | +When `SELF_HOSTED=true`, TryPost skips payment/subscription requirements. This is the default for self-hosted installations. |
| 28 | + |
| 29 | +## Database |
| 30 | + |
| 31 | +TryPost supports PostgreSQL and MySQL. |
| 32 | + |
| 33 | +### PostgreSQL (recommended) |
| 34 | + |
| 35 | +```env |
| 36 | +DB_CONNECTION=pgsql |
| 37 | +DB_HOST=127.0.0.1 |
| 38 | +DB_PORT=5432 |
| 39 | +DB_DATABASE=trypost |
| 40 | +DB_USERNAME=postgres |
| 41 | +DB_PASSWORD=your_password |
| 42 | +``` |
| 43 | + |
| 44 | +### MySQL |
| 45 | + |
| 46 | +```env |
| 47 | +DB_CONNECTION=mysql |
| 48 | +DB_HOST=127.0.0.1 |
| 49 | +DB_PORT=3306 |
| 50 | +DB_DATABASE=trypost |
| 51 | +DB_USERNAME=root |
| 52 | +DB_PASSWORD=your_password |
| 53 | +``` |
| 54 | + |
| 55 | +## Redis |
| 56 | + |
| 57 | +Redis is required for queues and caching. |
| 58 | + |
| 59 | +```env |
| 60 | +REDIS_HOST=127.0.0.1 |
| 61 | +REDIS_PASSWORD=null |
| 62 | +REDIS_PORT=6379 |
| 63 | +``` |
| 64 | + |
| 65 | +## File Storage |
| 66 | + |
| 67 | +TryPost supports local storage and S3-compatible cloud storage. |
| 68 | + |
| 69 | +### Local Storage (default) |
| 70 | + |
| 71 | +```env |
| 72 | +FILESYSTEM_DISK=local |
| 73 | +``` |
| 74 | + |
| 75 | +### AWS S3 |
| 76 | + |
| 77 | +```env |
| 78 | +FILESYSTEM_DISK=s3 |
| 79 | +AWS_ACCESS_KEY_ID=your_key |
| 80 | +AWS_SECRET_ACCESS_KEY=your_secret |
| 81 | +AWS_DEFAULT_REGION=us-east-1 |
| 82 | +AWS_BUCKET=your_bucket |
| 83 | +AWS_URL=https://your-bucket.s3.amazonaws.com |
| 84 | +``` |
| 85 | + |
| 86 | +### Cloudflare R2 |
| 87 | + |
| 88 | +```env |
| 89 | +FILESYSTEM_DISK=r2 |
| 90 | +R2_ACCESS_KEY_ID=your_key |
| 91 | +R2_SECRET_ACCESS_KEY=your_secret |
| 92 | +R2_ENDPOINT=https://your-account.r2.cloudflarestorage.com |
| 93 | +R2_REGION=auto |
| 94 | +R2_BUCKET=your_bucket |
| 95 | +R2_URL=https://your-custom-domain.com |
| 96 | +``` |
| 97 | + |
| 98 | +### Other S3-Compatible Storage |
| 99 | + |
| 100 | +Any S3-compatible storage (MinIO, DigitalOcean Spaces, etc.) can be used with the `s3` disk configuration. |
| 101 | + |
| 102 | +## Mail |
| 103 | + |
| 104 | +Configure your mail driver for sending emails (invites, notifications). |
| 105 | + |
| 106 | +```env |
| 107 | +MAIL_MAILER=smtp |
| 108 | +MAIL_HOST=smtp.example.com |
| 109 | +MAIL_PORT=587 |
| 110 | +MAIL_USERNAME=your_username |
| 111 | +MAIL_PASSWORD=your_password |
| 112 | +MAIL_ENCRYPTION=tls |
| 113 | +MAIL_FROM_ADDRESS="[email protected]" |
| 114 | +MAIL_FROM_NAME="${APP_NAME}" |
| 115 | +``` |
| 116 | + |
| 117 | +## Social Platforms |
| 118 | + |
| 119 | +Each social platform requires API credentials. See the [Platforms documentation](../platforms/README.md) for setup instructions. |
| 120 | + |
| 121 | +## Next Steps |
| 122 | + |
| 123 | +- [Connect your social accounts](../platforms/README.md) |
| 124 | +- [Create your first post](first-steps.md) |
0 commit comments