Skip to main content
Pterodactyl Panel uses environment variables defined in the .env file for core configuration settings. This file is located in the root of your Panel installation.

Initial Setup

During installation, copy the example environment file:
cp .env.example .env

Core Application Settings

Application Environment

.env
APP_ENV=production
APP_DEBUG=false
APP_ENV
string
default:"production"
Application environment. Use production for live deployments, local for development.
APP_DEBUG
boolean
default:"false"
Enable debug mode. Shows detailed error messages with stack traces.
Never enable in production! Debug mode exposes sensitive application details.

Application Identity

.env
APP_NAME="Pterodactyl Panel"
APP_URL=https://panel.example.com
APP_LOCALE=en
APP_TIMEZONE=UTC
APP_NAME
string
default:"Pterodactyl"
Application name used in emails and UI elements.
APP_URL
string
required
The full URL where your Panel is accessible. Used for generating URLs in emails and console commands.Example: https://panel.example.com
APP_LOCALE
string
default:"en"
Default language locale for the application.
APP_TIMEZONE
string
default:"UTC"
Default timezone for the application. See PHP timezones.

Encryption Key

.env
APP_KEY=base64:YOUR_32_CHARACTER_KEY_HERE
APP_KEY
string
required
Application encryption key. Generated during installation with php artisan key:generate.
Critical Security Setting! Changing this key will invalidate all encrypted data including session cookies.

Theme Configuration

.env
APP_THEME=pterodactyl
APP_THEME
string
default:"pterodactyl"
Active theme name. Custom themes should be placed in resources/themes/.

Security Settings

HashIDs Configuration

HashIDs are used to obfuscate internal database IDs in public-facing URLs.
.env
HASHIDS_SALT=random_salt_value
HASHIDS_LENGTH=8
HASHIDS_SALT
string
required
Random salt for HashID generation. Should be a long, random string.
Never change this value after installation as it will break all existing URLs.
HASHIDS_LENGTH
integer
default:"8"
Minimum length of generated hash IDs.

Environment Restrictions

.env
APP_ENVIRONMENT_ONLY=true
APP_ENVIRONMENT_ONLY
boolean
default:"true"
When enabled, only environment variables are used for configuration. Recommended for security.

Logging Configuration

.env
LOG_CHANNEL=daily
LOG_LEVEL=debug
LOG_DEPRECATIONS_CHANNEL=null
LOG_CHANNEL
string
default:"daily"
Logging channel to use. Options:
  • daily - Separate log file per day
  • single - Single log file
  • stack - Multiple channels
LOG_LEVEL
string
default:"debug"
Minimum log level. Options: debug, info, notice, warning, error, critical, alert, emergency

Generating the Application Key

After creating your .env file, generate an encryption key:
php artisan key:generate --force
The --force flag is required in production environments.

Next Steps

Email Configuration

Configure SMTP and email settings

Database Setup

Configure MySQL/MariaDB connection

Cache & Queues

Set up Redis, caching, and queue workers

Security Settings

Configure SSL, trusted proxies, and sessions

Build docs developers (and LLMs) love