Every variable PNLCS reads from .env: each env() call in config/,
together with what .env.example ships. That is 124 variables read in
config/ and 4 more that only .env.example names.
Most settings live in the admin area, not here. .env holds what PNLCS needs
before it can reach its database, plus the framework's drivers.
The install wizard caches the configuration. After a change to .env, run
php artisan config:cache (or php artisan optimize) from the PNLCS
directory as the web server user, or the change is not seen.
.env holds the database password and the application key: keep it owned
by the web server user, mode 640 (Security).
Default below is what PNLCS uses when the variable is missing.
.env.example is the value the shipped file sets; a copy of that file
is where every installation starts. "—" means none.
Wizard: the install wizard writes these into .env. The database page
writes the DB_* values (only once the connection works); the last page
writes the APP_* ones. APP_KEY is created before the wizard opens, on
the first web request to a copy that has no key.
A variable set in the real environment (Docker's -e, the web server or
PHP-FPM) wins over the same line in .env; Install with Docker
passes the DB_* values and APP_URL that way. The image also has its own
start-up variables (PNLCS_CHANNEL, PNLCS_VERSION, AUTO_UPDATE): see
Install with Docker.
The application name. Also the default mail sender name and the start of the session cookie name and of the cache and Redis key prefixes: changing it signs everybody out
APP_ENV
production
production
yes (production)
The environment name. Keep production
APP_KEY
—
empty
first request
The encryption key for sessions, cookies and stored secrets (service passwords, SSL private keys, two-factor backup codes and more). Made on the first web request when missing, or with php artisan key:generate. Never change it on a running installation: what was encrypted with it can no longer be read. Back it up with the database
APP_PREVIOUS_KEYS
empty
—
Comma list of older keys, still accepted for decrypting while you rotate APP_KEY
APP_DEBUG
false
false
yes (false)
true shows full error pages with code and settings. Never on a public site
APP_URL
http://localhost
https://your-domain.com
yes
The site's address. Used wherever a full address is built, links in emails among them; also the default for MAIL_EHLO_DOMAIN
APP_LOCALE
en
en
yes
The language used when no other is chosen. The default language picked in Setup → Languages takes precedence once set; the wizard sets both
APP_FALLBACK_LOCALE
en
en
The language a missing translation falls back to
APP_FAKER_LOCALE
en_US
en_US
Language of generated test data (development only)
APP_MAINTENANCE_DRIVER
file
file
Where maintenance mode is recorded: file, or cache to share it between several servers
APP_MAINTENANCE_STORE
database
—
The cache store used when APP_MAINTENANCE_DRIVER=cache
BCRYPT_ROUNDS
12
12
Cost of password hashing. Read by Laravel's own hashing configuration, not by a file in config/
There is no APP_TIMEZONE: config/app.php fixes the application time zone
at UTC.
PNLCS needs MySQL 8 or MariaDB; keep DB_CONNECTION=mysql for both. The
defaults are those of the mysql connection.
Variable
Default
.env.example
Wizard
What it does
DB_CONNECTION
sqlite
mysql
yes (mysql)
Which connection to use. Set it: the built-in default, sqlite, does not work with PNLCS
DB_HOST
127.0.0.1
127.0.0.1
yes
Database server
DB_PORT
3306
3306
yes
Database port
DB_DATABASE
laravel
pnlcs
yes
Database name
DB_USERNAME
root
pnlcs
yes
Database user
DB_PASSWORD
empty
empty
yes
Database password
DB_SOCKET
empty
commented out
Unix socket path, used instead of host and port
DB_URL
—
—
A whole connection as one URL (mysql://user:pass@host:3306/db), in place of the separate values
DB_CHARSET
utf8mb4
—
Connection character set
DB_COLLATION
utf8mb4_unicode_ci
—
Connection collation
MYSQL_ATTR_SSL_CA
—
—
Path to a CA certificate, to connect to the database over TLS
Read only by connections PNLCS does not use: DB_FOREIGN_KEYS (SQLite,
default true) and DB_SSLMODE (PostgreSQL, default prefer). The
PostgreSQL and SQL Server connections also read DB_HOST, DB_PORT (5432 and
1433) and the other DB_* values.
Once a mail type is saved under Setup → General Settings (SMTP or PHP
mail), the panel's settings replace MAIL_MAILER and the SMTP values here,
and the panel's sender address and name replace MAIL_FROM_*. Until then
.env decides, and .env.example ships MAIL_MAILER=log: mail is written to
the log, not sent. See Configure email.
Variable
Default
.env.example
What it does
MAIL_MAILER
log
log
How mail leaves: smtp, sendmail, ses, postmark, resend, log, array, failover, roundrobin
MAIL_HOST
127.0.0.1
127.0.0.1
SMTP server
MAIL_PORT
2525
587
SMTP port
MAIL_USERNAME
—
null
SMTP user
MAIL_PASSWORD
—
null
SMTP password
MAIL_SCHEME
—
null
smtps for TLS from the first byte (port 465); empty for SMTP with STARTTLS
MAIL_URL
—
—
The whole SMTP connection as one URL
MAIL_EHLO_DOMAIN
the host of APP_URL
—
The name PNLCS gives itself to the SMTP server
MAIL_SENDMAIL_PATH
/usr/sbin/sendmail -bs -i
—
The sendmail command, for MAIL_MAILER=sendmail (also what PHP mail in the panel uses)