Filament on fortrabbit
Published
Reviewedbyfl
Filament is a Laravel package for admin panels and back-office apps. It deploys like any Laravel app, with a few settings that differ on fortrabbit.
About Filament
Filament builds admin panels, forms and tables on top of Laravel and Livewire. The Laravel guides apply; this page covers what Filament adds. Tested with Filament 5 on Laravel 12.
Software template
Choose Filament in the software list when creating the app. The template is the Laravel one plus QUEUE_CONNECTION and two post-deploy commands. A repo imported from GitHub is detected as Laravel; add the missing lines by hand.
Filament 5, 4, 3
| Deployment | Value |
|---|---|
| Root path | public |
| Deploy strategy | replace |
| Excluded paths | /storage/node_modules |
| Build commands | composer install --no-dev --prefer-dist --no-interaction --no-ansi --no-progress |
| Post-deploy commands | mkdir -p storage/framework/{sessions,views,cache}php artisan migrate --forcephp artisan storage:link --forcephp artisan optimize |
| Environment variables | Value |
|---|---|
| APP_DEBUG | false |
| APP_ENV | production |
| APP_KEY | !RANDOM_KEY! |
| APP_URL | https://${FORTRABBIT_MAIN_DOMAIN} |
| LOG_CHANNEL | stack |
| LOG_STACK | stderr |
| QUEUE_CONNECTION | database |
| Database environment variables | Value |
|---|---|
| DB_CONNECTION | ${FORTRABBIT_DB_TYPE} |
| DB_DATABASE | ${FORTRABBIT_DB_NAME} |
| DB_HOST | ${FORTRABBIT_DB_HOST} |
| DB_PASSWORD | ${FORTRABBIT_DB_PASSWORD} |
| DB_PORT | ${FORTRABBIT_DB_PORT} |
| DB_USERNAME | ${FORTRABBIT_DB_USER} |
php artisan optimize caches config, routes, views and Filament's components in one step, so a separate filament:optimize is not needed.
A custom panel theme is built with Tailwind. Add the Node steps to the build commands:
npm ci
npm run build
File uploads
Filament 5 stores uploads on the disk set by FILESYSTEM_DISK, local by default, which is storage/app/private. Files that need a public URL, like product images, go on the public disk in storage/app/public. Both live on persistent storage and survive deploys, since /storage is excluded from the replace.
The public/storage symlink does not survive: the replace strategy rebuilds public/ on every deploy. That is why storage:link runs as a post-deploy command. Without it, uploaded images return 404.
Livewire caps temporary uploads at 12 MiB, below the platform limit of 128 MiB. Larger files fail with a 422 on /livewire/upload-file and no message in the panel. Raise the rule in config/livewire.php:
'temporary_file_upload' => [
'rules' => ['required', 'file', 'max:51200'], // KiB
],
Upload size and execution time on the PHP side are set in the PHP settings.
Cache, sessions and queue
fortrabbit offers no Redis service. Use the file or database driver for cache and sessions, and the database driver for the queue. The template sets QUEUE_CONNECTION=database. Laravel 11 and later ship the jobs table migration.
Worker and scheduler
Filament imports and exports run on the queue. Add two jobs to the environment:
| Type | Command |
|---|---|
| Worker | php artisan queue:work --sleep=3 --tries=3 --max-time=3600 |
| Cron | php artisan schedule:run, every minute |
Jobs XS holds one job. Worker plus cron needs Jobs SM.
Notifications
fortrabbit does not support WebSockets, so Laravel Reverb and broadcast notifications do not work. Filament's database notifications do: the panel polls for new ones, every 30 seconds by default.
->databaseNotifications()
->databaseNotificationsPolling('15s')
Panel access in production
Outside the local environment, Filament blocks every user whose model does not implement FilamentUser. On fortrabbit, APP_ENV is production, so the panel returns 403 after login.
use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;
class User extends Authenticatable implements FilamentUser
{
public function canAccessPanel(Panel $panel): bool
{
return str_ends_with($this->email, '@example.com');
}
}
PHP sizing
The heaviest request in our test app, a Livewire table update over 500 rows, peaked at 10 MiB of the 256 MiB on PHP SM. The number of PHP processes decides how many requests run at the same time. Scale PHP for that, not for memory.