Skip to main content

Environment file (.env)

The .env file at the project root controls all runtime configuration. Below is a complete reference.

Application

APP_NAME="StartMyVPN"
APP_ENV=production          # local | production
APP_DEBUG=false             # Never true in production
APP_URL=https://yourdomain.com
APP_KEY=                    # Generated by: php artisan key:generate

Database

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=startmyvpn
DB_USERNAME=your_db_user
DB_PASSWORD=your_db_password
SQLite is supported for development:
DB_CONNECTION=sqlite
# DB_DATABASE defaults to database/database.sqlite

Mail

MAIL_MAILER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=your_smtp_user
MAIL_PASSWORD=your_smtp_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply@yourdomain.com
MAIL_FROM_NAME="${APP_NAME}"
For local development, use log as the mailer to write emails to the log file instead of sending them:
MAIL_MAILER=log

Queues

QUEUE_CONNECTION=database   # database | redis
For higher throughput, use Redis:
QUEUE_CONNECTION=redis
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=null
REDIS_CLIENT=predis          # predis | phpredis

Cache

CACHE_STORE=file             # file | redis | database

Security

BCRYPT_ROUNDS=12             # Password hashing rounds (10-14 recommended)
RECAPTCHA_SECRET=            # Optional: Google reCAPTCHA v3 secret

Payment gateways

Payment gateway credentials are stored in the Admin → Settings → Payments panel rather than in .env, with the exception of PayPal:
PAYPAL_MODE=live             # sandbox | live
PAYPAL_LIVE_CLIENT_ID=
PAYPAL_LIVE_CLIENT_SECRET=
PAYPAL_CURRENCY=USD
PAYPAL_WEBHOOK_ID=

Social login (Google)

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI=https://yourdomain.com/auth/google/callback

Logging

LOG_CHANNEL=stack            # stack | single | daily
LOG_LEVEL=warning            # debug | info | warning | error
Optional integration with Better Stack (Logtail):
LOG_CHANNEL=betterstack
BETTER_STACK_SOURCE_TOKEN=your_token

In-app settings

After installation, most configuration is managed through the admin panel at Admin → Settings:
SectionWhat you configure
GeneralApp name, support email, logo, landing page content
EmailSMTP credentials (overrides .env at runtime)
PaymentsStripe keys, PayPal sandbox/live toggle, CryptAPI config
SocialGoogle OAuth credentials, enable/disable social login
APIAPI rate limits and API-level toggles
Settings stored in the database take precedence over .env values for email and payment credentials. You only need .env for the initial setup.