XAXA Server control panel

Guides

Laravel

For a fresh Laravel app, tick Install Laravel now in Add site: XAXA creates the database and installs the app for you. The steps below deploy your own repository.

1. Create the site

Add site → PHP, PHP 8.4, document root public. Create a database in the Databases tab.

2. Deploy

ssh example@your-server
cd ~/htdocs
rm -rf example.com
git clone https://github.com/you/app.git example.com
cd example.com
composer install --no-dev --optimize-autoloader
cp .env.example .env
php artisan key:generate

Set the database in .env:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_DATABASE=app_db
DB_USERNAME=app_u
DB_PASSWORD=...

Then:

php artisan migrate --force
php artisan optimize

If you build assets, run npm ci && npm run build.

3. Scheduler and queues

Add a cron job every minute:

cd ~/htdocs/example.com && php artisan schedule:run >> /dev/null 2>&1

For queues, turn on Settings → PHP → Queue workers. XAXA runs php artisan queue:work as the site user, all the time, so a queued job (an email, a notification, a webhook) starts within seconds instead of waiting up to a minute for cron.

  • Workers: 1 to 4. Each one handles one job at a time and keeps about 50 MB of memory; more workers help when jobs wait on the network (mail, APIs).
  • Queues: comma separated, highest priority first (high,default).
  • Job time limit: 1 minute to 1 hour. Keep retry_after in config/queue.php (90 seconds by default) above it, otherwise a long job is started a second time while the first one still runs.

A worker that stops (a crash, a fatal error) starts again after 5 seconds, and each one restarts by itself every hour to give memory back. Every successful deploy and every PHP version change restarts the workers on the new code; a worker always finishes the job it holds first. The worker status is on the same card, its output under Logs → Queue. Failed jobs stay in Laravel: php artisan queue:failed and php artisan queue:retry all in the terminal.

The workers need the project's artisan file in htdocs/<domain>: deploy or upload the code before turning them on.

Redis

Redis runs on 127.0.0.1:6379. Create the site's own Redis user under Databases → Redis, then set REDIS_USERNAME, REDIS_PASSWORD and REDIS_PREFIX=<site user>: (every key must start with it), and CACHE_STORE=redis / SESSION_DRIVER=redis to use it. php artisan cache:clear on a Redis store runs FLUSHDB, which a site's Redis user may not run (it would delete other sites' keys).

Found a mistake or need help? support@xaxa.com.tr