User

Installing Laravel

One-click Laravel installation via Opterius Hosting Mode — runs Composer, creates a database, writes .env, and configures the document root automatically.

Last updated 1775606400

Go to Hosting Mode → Laravel → Install.

Form Fields

Field Notes
Domain Select from your account's domains or subdomains. The project will be created inside this domain's directory.
PHP version Laravel 10 requires PHP 8.1+. Laravel 11 requires PHP 8.2+. See Switching PHP Version.
Database A new database and database user are created automatically.

What the Agent Does

When you submit, the agent (POST /laravel/install) runs the following steps:

  1. Runs composer create-project laravel/laravel to download and scaffold the latest Laravel release into /home/{username}/{domain.com}/laravel-app/.
  2. Creates a new MariaDB database and database user scoped to your account. See Creating Databases for the naming convention.
  3. Writes a .env file with the correct APP_URL, DB_DATABASE, DB_USERNAME, DB_PASSWORD, and DB_HOST values.
  4. Runs php artisan key:generate to set APP_KEY in .env.
  5. Sets directory permissions to 755 and file permissions to 644. Sets storage/ and bootstrap/cache/ to 775 so the web process can write to them.
  6. Sets the domain's document root to the public/ subdirectory of the project. See Laravel Document Root.

[!NOTE] Composer is installed system-wide by default. No setup is required before running a Laravel install.

After Install

The panel displays:

  • APP_URL — the base URL of your application.
  • Database name, database user, and password for the auto-created database.

[!WARNING] Save the database credentials before closing this screen. The password is shown once and is not retrievable from the panel — only from your .env file on disk.

Verifying the Install

Visit the domain in a browser. You should see the default Laravel welcome page. If you see a 403 or blank page, confirm the document root is pointing at laravel-app/public/ under Hosting Mode → Domains → [domain] → Document Root.

# SSH: confirm .env was written and APP_KEY is set
cat /home/username/domain.com/laravel-app/.env | grep APP_KEY

# SSH: confirm storage is writable
php artisan storage:link --path=/home/username/domain.com/laravel-app/

Next Steps