Step Four - Environment
In this step, we set environment configuration for Jexpanel.
Copy configuration file
The .env file at the root of the application houses critical environment variables, such as database configuration.
We can copy over the .env.example file provided, which will fill in default values:
cp -R .env.example .env
ReCAPTCHA must also be disabled in order to log in. Add this line to your .env file:
RECAPTCHA_ENABLED=false
Install application dependencies
While we already installed system packages in previous steps, we now need to install dependencies that are specific to Jexpanel. Run the following command below to do so:
composer install --no-dev --optimize-autoloader
Generate application key
Now we can generate an application key, used to encrypt sensitive data on the application.
NEVER share this key. If this is exposed, all encrypted data on your instance (like passwords) will be compensated.
php artisan key:generate --force
Configure app & database settings
Basic Panel setup can be done by running the below commands via the CLI:
php artisan p:environment:setup # Basic app setup
php artisan p:environment:database # Database credentials
Migrate database configuration
Now that the database is set up and the credentials have been configured, we can run the migrations:
php artisan migrate --seed --force
Create admin user
To access the Panel for the first time, you'll need to make a user via the CLI - don't worry, you can create users easily via the frontend! Here's a simple command which will take you through the steps of setting up the initial admin account:
php artisan p:user:make
Give webserver permissions
Finally, give the webserver necessary permissions to access files via the chown command.
chmod -R 755 storage/* bootstrap/cache/
# If using NGINX, Apache or Caddy (not on RHEL / Rocky Linux / AlmaLinux)
chown -R www-data:www-data /var/www/jexactyl/*
# If using NGINX on RHEL / Rocky Linux / AlmaLinux
chown -R nginx:nginx /var/www/jexactyl/*
# If using Apache on RHEL / Rocky Linux / AlmaLinux
chown -R apache:apache /var/www/jexactyl/*
TEMPORARY WORKAROUND: As this software version is extremely new and unstable, the following workaround is required:
Set RECAPTCHA_ENABLED=false in your .env file to disable ReCAPTCHA, as the module currently doesn't work.