メインコンテンツまでスキップ

Environment Variables (.env)

The .env file is the heart of FeedbackPulse's configuration. It's created automatically during installation, but you can edit it manually anytime.


📍 File Location

/var/www/feedbackpulse-saas/.env

⚠️ セキュリティ: The .env file contains sensitive data (database passwords, APIキー). Never commit it to version control or expose it publicly. It should have 640 permissions.


🔧 After Editing .env

After making changes, clear the config cache:

php artisan config:clear
php artisan config:cache # Optional: cache for production performance

📋 Complete Variable Reference

🏠 Application 設定

VariableDefaultDescription
APP_NAMEFeedbackPulsePlatform name (shown in emails, titles)
APP_ENVproductionEnvironment: production, local, staging
APP_KEY(auto-generated)Encryption key. Never change after installation!
APP_DEBUGfalseShow detailed errors. Must be false in production!
APP_URLhttps://yourdomain.comFull URL of your platform (with https)
APP_LOCALEenDefault language
APP_FALLBACK_LOCALEenFallback language
BCRYPT_ROUNDS12Password hashing strength (higher = slower but more secure)

⚠️ APP_DEBUG=true will expose sensitive information (database credentials, APIキー) in error pages. Never enable in production except for brief debugging sessions.

🗄️ データベース

VariableDefaultDescription
DB_CONNECTIONmysqlデータベース driver: mysql, mariadb, sqlite, pgsql
DB_HOST127.0.0.1データベース server address
DB_PORT3306データベース port
DB_DATABASEfeedbackpulseデータベース name
DB_USERNAMErootデータベース username
DB_PASSWORD(empty)データベース password

📧 Email / SMTP

VariableDefaultDescription
MAIL_MAILERsmtpMail driver: smtp, ses, postmark, sendmail, log
MAIL_HOSTsmtp.mailgun.orgSMTP server host
MAIL_PORT587SMTP port (587 for TLS, 465 for SSL)
MAIL_USERNAME(empty)SMTP username
MAIL_PASSWORD(empty)SMTP password
MAIL_ENCRYPTIONtlsEncryption: tls, ssl, or null
MAIL_FROM_ADDRESS[email protected]Sender email address
MAIL_FROM_NAMEFeedbackPulseSender name

💳 Stripe (Optional)

VariableDefaultDescription
STRIPE_PUBLISHABLE_KEY(empty)Stripe publishable key (starts with pk_)
STRIPE_SECRET_KEY(empty)Stripe secret key (starts with sk_)
STRIPE_WEBHOOK_SECRET(empty)Stripe webhook signing secret (starts with whsec_)

💰 PayPal (Optional)

VariableDefaultDescription
PAYPAL_CLIENT_ID(empty)PayPal REST API client ID
PAYPAL_CLIENT_SECRET(empty)PayPal REST API client secret
PAYPAL_WEBHOOK_ID(empty)PayPal webhook ID for verification
PAYPAL_MODEsandboxMode: sandbox (testing) or live (production)

🔑 Social Login (Optional)

VariableDefaultDescription
GOOGLE_CLIENT_ID(empty)Google OAuth client ID
GOOGLE_CLIENT_SECRET(empty)Google OAuth client secret
GITHUB_CLIENT_ID(empty)GitHub OAuth client ID
GITHUB_CLIENT_SECRET(empty)GitHub OAuth client secret

🤖 AI / OpenAI (Optional)

VariableDefaultDescription
OPENAI_API_KEY(empty)OpenAI API key for 感情分析, auto-tagging, AI replies

🤖 reCAPTCHA (Optional)

VariableDefaultDescription
RECAPTCHA_SITE_KEY(empty)Google reCAPTCHA v2/v3 site key
RECAPTCHA_SECRET_KEY(empty)Google reCAPTCHA secret key

🍪 Session & Cache

VariableDefaultDescription
SESSION_DRIVERfileSession storage: file, database, redis, cookie
SESSION_LIFETIME120Session timeout in minutes
SESSION_DOMAIN(empty)Cookie domain (set to .yourdomain.com for subdomains)
SESSION_SECURE_COOKIEtrueRequire HTTPS for session cookies
CACHE_STOREfileCache driver: file, database, redis, memcached

📦 Queue & Jobs

VariableDefaultDescription
QUEUE_CONNECTIONsyncQueue driver: sync, database, redis

⏰ Cron (Shared Hosting)

VariableDefaultDescription
CRON_TOKEN(auto-generated)Secret token for the web-based cron endpoint /cron/run?token=. Auto-generated during installation. Required only if using URL-based cron instead of CLI.

📁 File Storage

VariableDefaultDescription
FILESYSTEM_DISKlocalDefault storage disk: local, public, s3

🪵 Logging

VariableDefaultDescription
LOG_CHANNELstackLog channel: stack, single, daily, syslog
LOG_LEVELerrorMin log level: debug, info, notice, warning, error, critical

💡 Example Production .env

APP_NAME="FeedbackPulse"
APP_ENV=production
APP_KEY=base64:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
APP_DEBUG=false
APP_URL=https://feedback.mycompany.com

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=feedbackpulse
DB_USERNAME=fp_user
DB_PASSWORD=super_secure_password_here

SESSION_DRIVER=file
SESSION_LIFETIME=120
SESSION_DOMAIN=.feedback.mycompany.com
SESSION_SECURE_COOKIE=true
CACHE_STORE=file

QUEUE_CONNECTION=sync

MAIL_MAILER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=mailgun_password_here
MAIL_ENCRYPTION=tls
[email protected]
MAIL_FROM_NAME="FeedbackPulse"

STRIPE_PUBLISHABLE_KEY=pk_live_xxxxx
STRIPE_SECRET_KEY=sk_live_xxxxx
STRIPE_WEBHOOK_SECRET=whsec_xxxxx

OPENAI_API_KEY=sk-xxxxx

LOG_CHANNEL=daily
LOG_LEVEL=error

⏭️ 次のステップ