You push a fresh Laravel repo to a new GitHub project, then realize the production server needs a live .env, a database connection, and a queue worker. You have a domain, an Ember plan, and SSH access - now you need to make Laravel run on TrueCore without surprises.
Deploying Laravel with Composer
TrueCore provides PHP 8.3 in every plan that includes the PHP-FPM stack. The version matches the CLI, so running php -v in the shell prints PHP 8.3.x. Composer is not pre-installed, but the SSH environment has the tools you need to add it.
# Download the installer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
# Verify the installer hash (replace with the latest hash from composer.com)
php -r "if (hash_file('sha384', 'composer-setup.php') === '9e...') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); }"
# Install globally for the user
php composer-setup.php --install-dir=$HOME/bin --filename=composer
rm composer-setup.php
Once Composer is in $HOME/bin, add that directory to your $PATH in ~/.profile:
export PATH="$HOME/bin:$PATH"
Load the profile (source ~/.profile) and run the typical Laravel install steps:
cd ~/webroot # truecore puts you in the web root after SSH login
composer install # installs the vendor folder
php artisan key:generate
php artisan storage:link
The storage:link command creates a symbolic link from public/storage to storage/app/public, which is required for public file uploads. The link works because each site runs inside its own bwrap container, keeping the symlink isolated from other users.
Managing .env and Sensitive Config
Laravel reads configuration from a .env file in the web root. TrueCore does not expose a web-based editor for that file, but you can edit it safely with any terminal editor (nano, vim) or upload it via SFTP. Keep the file outside version control - it contains database passwords and API keys.
A typical .env for a TrueCore site looks like:
APP_NAME=MyLaravelApp
APP_ENV=production
APP_KEY=base64:V0pVdEd2...
APP_DEBUG=false
APP_URL=https://example.com
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=your_database_name
DB_USERNAME=your_username
DB_PASSWORD=your_password
CACHE_DRIVER=file
QUEUE_CONNECTION=database
SESSION_DRIVER=file
Database credentials are generated when you create a PostgreSQL 16 instance in the panel. Ember, Blaze and Inferno plans include per-customer PostgreSQL 16, so your DB_HOST stays at 127.0.0.1. Use the site CLI - described in our "SSH Access on TrueCore" post - to list databases:
site db list
The command returns the name and user you can copy into .env. After editing, test the connection:
php artisan migrate --pretend
If the command reports "SQLSTATE[08006]", double-check the credentials. Because each site runs in its own container, there is no risk of leaking another customer's database.
Running Scheduled Jobs and Queues
Laravel's scheduler is useful for sending emails, processing uploads, pruning data, or running any recurring task. On shared hosting the standard, supported approach is Laravel's own scheduler driven by cron: you register a single cron entry that calls php artisan schedule:run every minute, and Laravel decides which of your defined tasks are due.
TrueCore exposes a Cron tab in the customer portal where you add exactly that entry. Point it at your site's artisan binary and set it to run every minute:
* * * * * php /home/username/webroot/artisan schedule:run >> /dev/null 2>&1
Replace username with the SSH username shown on the portal. The task runs with the same user and container constraints as your web processes, so a misbehaving job cannot exhaust another customer's resources.
Inside your app, define what actually runs in app/Console/Kernel.php, for example:
$schedule->command('queue:work --stop-when-empty')->everyMinute()->withoutOverlapping();
Using --stop-when-empty lets each invocation drain the queue and exit, which suits a cron-driven schedule far better than a permanently running daemon. TrueCore is standard shared hosting, so there is no long-running "queue worker service" to configure — the scheduler plus a queue:work --stop-when-empty command covers the same ground without a resident background process.
Resource Considerations
Scheduled jobs consume CPU and memory while they run. An Ember plan provides 40 GB of storage and a fair-use CPU allocation. If a run does heavy work, consider batching it, moving some jobs to an external service, or upgrading to Blaze or Inferno where the fair-use limits are higher. Keep each scheduled task modest so it finishes well within its minute window.
File Storage Paths and Public Assets
Laravel stores uploaded files in storage/app. The public/storage symlink created by php artisan storage:link points to storage/app/public. Because each site runs inside its own bwrap sandbox, these paths are immutable from the outside. When you need to back up files, you can use the built-in backup system — which runs every 6 hours on Blaze and every 30 minutes on Inferno (12-hourly on Ember) — or trigger a manual backup with:
site backup create --type=files
Backups are encrypted and stored in per-node Backblaze B2 buckets, matching the security model explained in our infrastructure overview.
If you prefer to serve large assets directly from a CDN, you can generate signed URLs in Laravel and let the CDN pull from https://yourdomain.com/storage/.... The underlying nginx on TrueCore caches static files efficiently, so most traffic for images and PDFs will be served without hitting PHP at all.
Bringing It All Together
- SSH in - add your key in the portal, then
ssh username@yourdomain.com. - Install Composer - follow the steps above, add it to
$PATH. - Pull your repo -
git clone https://github.com/you/laravel-app.git .or usegit pull. - Configure .env - copy the database credentials from
site db list, setAPP_URL, runphp artisan key:generate. - Run migrations -
php artisan migrate --force. - Create the storage link -
php artisan storage:link. - Schedule your jobs - add a
php artisan schedule:runcron entry in the portal's Cron tab, and drive queues withqueue:work --stop-when-emptyfrom the scheduler. - Test - visit
https://yourdomain.com, runphp artisan route:list, and check the logs withsite logs nginx.
The workflow mirrors the approach we described for WordPress in our earlier posts, but Laravel benefits from PostgreSQL 16's advanced query planner and a clean, cron-driven scheduler for recurring work. TrueCore's container-based isolation means your code runs under the same security constraints as any other site, while still giving you the flexibility of full SSH access.
If you hit a limit - for example, the 40 GB storage on Ember - the panel will warn you before the fair-use threshold is reached. You can upgrade at any time; the migration is handled by the same site CLI that you used to add databases.
Running Laravel on TrueCore is therefore a straightforward affair: modern PHP, a current PostgreSQL engine, Composer ready via SSH, clear .env handling, and a cron-driven scheduler for queues and recurring jobs. The stack is deliberately simple, so you spend time building features, not wrestling with the hosting layer.