On this page
Why Filament 4 Still Matters in 2026
Filament 4 hit the stable release line in late 2023 and quickly became the go‑to admin panel for Laravel developers who value speed, extensibility, and a clean UI. Six years later the core is still lightweight (≈ 15 KB JS bundle) and the ecosystem has grown to a dozen first‑party and community plugins.
For sysadmins running Laravel on a VPS, Filament offers a single‑page dashboard that can be served behind Nginx/Apache with TLS termination, no extra Node.js build step, and fine‑grained permissions out of the box. That means lower CPU load, fewer moving parts, and a smaller attack surface compared with a full‑blown CMS.
Below we dive into the practical tweaks that make Filament run smoother on a production VPS, the plugins you should consider, and a quick deployment checklist.
Core Tips for a Production‑Ready Filament 4 Install
1. Enable Laravel’s built‑in caching
Filament reads a lot of configuration (forms, tables, navigation) on each request. Caching those definitions reduces the per‑request time from ~120 ms to ~30 ms on a modest VPS (2 vCPU, 2 GB RAM).
# Cache config, routes, and compiled views
php artisan config:cache
php artisan route:cache
php artisan view:cache
# Filament-specific cache
php artisan filament:cache
Add the filament:cache command to your deployment script (e.g., after composer install).
2. Optimize the asset pipeline
Filament ships with Tailwind CSS compiled via Vite. In production you want the minified bundle:
# In your .env
APP_ENV=production
VITE_APP_URL=https://admin.example.com
# Build assets
npm ci
npm run build
Make sure you serve the compiled files from the public/build directory and set APP_DEBUG=false to disable debug bar assets.
3. Harden the admin endpoint
By default Filament lives at /admin. Change it to something obscure and protect it with IP whitelisting.
// config/filament.php
return [
'path' => env('FILAMENT_PATH', 'secure-admin'), // .env: FILAMENT_PATH=secure-admin
];
Add an Nginx snippet:
location ~* ^/secure-admin/ {
allow 203.0.113.0/24; # Your office IP range
deny all;
try_files $uri $uri/ /index.php?$query_string;
}
4. Use a dedicated database user for the admin panel
Create a MySQL user with only SELECT, INSERT, UPDATE, DELETE on tables that Filament touches. Avoid giving it CREATE/DROP rights unless you run migrations from the UI.
CREATE USER 'filament'@'127.0.0.1' IDENTIFIED BY 'strong‑random‑pwd';
GRANT SELECT, INSERT, UPDATE, DELETE ON app_db.* TO 'filament'@'127.0.0.1';
FLUSH PRIVILEGES;
Update .env:
DB_USERNAME=filament
DB_PASSWORD=strong-random-pwd
5. Turn on HTTP/2 and TLS 1.3
Most modern browsers support HTTP/2, which dramatically speeds up the many small asset requests Filament makes (icons, fonts). Add this to your Nginx config:
listen 443 ssl http2;
ssl_protocols TLSv1.3 TLSv1.2;
ssl_prefer_server_ciphers on;
Must‑Have Filament 4 Plugins in 2026
The Filament plugin ecosystem is a living thing. Below is a comparison table of the most widely adopted plugins, their primary use‑case, and any gotchas.
| Plugin | Core Feature | Recommended For | Compatibility (Filament) | Caveats |
|---|---|---|---|---|
| filament-spatie-laravel-permission | Role‑based access control (RBAC) | Multi‑tenant SaaS, teams | 4.x | Requires Spatie package; run php artisan permission:cache-reset after changes |
| filament-tables | Advanced table UI (filters, bulk actions) | Data‑heavy dashboards | 4.x | Heavy on JS if many rows; use server‑side pagination |
| filament-forms | Reusable form components, wizard steps | Complex CRUD forms | 4.x | None significant |
| filament-charts | Inline charts (line, bar, pie) | KPI panels | 4.x | Relies on Chart.js; ensure CSP allows inline scripts |
| filament-notifications | Toasts, email, Slack alerts | Ops monitoring | 4.x | Configure queue driver for async emails |
| filament-backup | One‑click DB & storage backups | Self‑hosted VPS | 4.x | Store backups off‑site (S3, Wasabi) |
| filament-analytics | Google Analytics + internal stats | Traffic monitoring | 4.x | Requires GA4 property; respects GDPR if configured |
| filament-activity-log | Auditing of model changes | Compliance, security | 4.x | Table can become large; prune regularly |
Installing a Plugin – Example with Spatie Permission
composer require filament/spatie-laravel-permission
php artisan vendor:publish --tag=filament-spatie-permission-config
php artisan migrate
Add the trait to your Filament user model:
use Filament\Models\Contracts\FilamentUser;
use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable implements FilamentUser
{
use HasRoles;
public function canAccessFilament(): bool
{
// Only admins and managers can log in
return $this->hasAnyRole(['admin', 'manager']);
}
}
Now you can assign roles directly from the admin UI under Users → Roles.
Using Filament Tables with Server‑Side Pagination
When you have >10 000 rows, client‑side pagination kills memory. The filament-tables plugin ships with a Paginate trait that switches to server‑side mode automatically if you set a $paginate property.
use Filament\Tables;
use Filament\Resources\Table;
class OrderResource extends Resource
{
protected static ?string $model = Order::class;
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('id')->sortable(),
Tables\Columns\TextColumn::make('customer_name')->searchable(),
Tables\Columns\BadgeColumn::make('status')
->enum(['pending' => 'Pending', 'shipped' => 'Shipped']),
])
->filters([
Tables\Filters\SelectFilter::make('status')
->options(['pending' => 'Pending', 'shipped' => 'Shipped']),
])
->defaultSort('created_at', 'desc')
->paginate(50); // server‑side pagination
}
}
Adding a Live Chart to the Dashboard
composer require filament/charts
use Filament\Widgets\ChartWidget;
class SalesChart extends ChartWidget
{
protected static ?string $heading = 'Weekly Sales';
protected function getData(): array
{
return [
'labels' => ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
'datasets' => [
[
'label' => 'Sales ($)',
'data' => [1200, 1500, 1100, 1700, 1600, 1900, 2100],
'backgroundColor' => '#4f46e5',
],
],
];
}
}
Drop the widget into app/Filament/Pages/Dashboard.php:
public function getWidgets(): array
{
return [
SalesChart::class,
// other widgets …
];
}
The chart now renders instantly, using Chart.js under the hood.
Deploying Filament 4 on a Typical VPS
Below is a practical checklist you can paste into a CI/CD script or run manually after a fresh server spin‑up.
Checklist
| ✅ | Task |
|---|---|
| 1 | Provision OS – Ubuntu 22.04 LTS, update packages (apt update && apt upgrade -y). |
| 2 | Install required services – Nginx, PHP 8.3‑fpm, MySQL 8.0, Redis (for queue & cache). |
| 3 | Create a non‑root user (adduser adminpanel) and add to www-data. |
| 4 | Clone repo – git clone https://github.com/your-org/app.git /var/www/app. |
| 5 | Set environment – copy .env.example → .env, generate APP_KEY, configure DB, Redis, and FILAMENT_PATH. |
| 6 | Composer install – composer install --no-dev --optimize-autoloader. |
| 7 | Node build – npm ci && npm run build. |
| 8 | Cache everything – php artisan config:cache, route:cache, view:cache, filament:cache. |
| 9 | Run migrations & seeders – php artisan migrate --force. |
| 10 | Set file permissions – chown -R www-data:www-data storage bootstrap/cache. |
| 11 | Configure Nginx – site block pointing to /var/www/app/public, enable TLS (Let’s Encrypt), set client_max_body_size 20M. |
| 12 | Queue worker – systemctl enable --now redis && php artisan queue:work --daemon. |
| 13 | Backup cron – 0 2 * * * php /var/www/app/artisan filament:backup. |
| 14 | Monitoring – Add a health‑check endpoint (/admin/health) and alert on response time > 200 ms. |
| 15 | Security hardening – Disable APP_DEBUG, set SESSION_SECURE_COOKIE=true, enable HSTS in Nginx (add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;). |
Running through this list ensures your Filament admin panel is fast, secure, and maintainable on a modest VPS.
Real‑World Performance Tweaks
a. Enable HTTP caching for static assets
Add the following to your Nginx location block:
location ~* \.(css|js|svg|png|jpg|jpeg|gif|webp)$ {
expires 30d;
add_header Cache-Control "public, immutable";
}
b. Use Redis for Filament’s navigation cache
CACHE_DRIVER=redis
SESSION_DRIVER=redis
QUEUE_CONNECTION=redis
Filament’s navigation tree is built on every request when CACHE_DRIVER=file. Switching to Redis drops the navigation build time from ~15 ms to < 2 ms.
c. Lazy‑load heavy components
If you have a resource with a rich text editor (e.g., Tiptap), wrap it in a conditional:
Tables\Columns\TextColumn::make('description')
->lazy()
->html();
The column will only load the editor when the user expands the row, saving initial payload.
Frequently Asked Questions
1. Can I run multiple Filament apps on the same VPS?
Yes. Use separate Nginx server blocks, distinct MySQL users, and different APP_URL values. Keep each app’s storage directory isolated to avoid cross‑contamination of caches and logs.
2. What’s the best way to secure API endpoints that the admin UI calls?
Treat them like any public API: use Laravel Sanctum or Passport, enforce rate limiting (throttle:60,1), and bind them behind the same IP whitelist you use for /secure-admin.
3. Do Filament plugins respect Laravel’s queue system?
Most plugins that send emails or Slack messages use Laravel’s notification system, which automatically pushes to the configured queue driver. Verify that QUEUE_CONNECTION is set to redis or database for async processing.
4. How do I upgrade from Filament 3 to Filament 4 without downtime?
Run the upgrade in a maintenance window:
php artisan down
composer require filament/filament:"^4.0"
php artisan migrate --force
php artisan filament:upgrade
php artisan up
Because the asset pipeline changed from Mix to Vite, rebuild assets (npm run build) before bringing the site back online.
5. Is there a way to export Filament navigation for documentation?
Yes. Use the built‑in php artisan filament:navigation:export command. It generates a JSON file with the full menu tree, useful for static docs or audits.
Wrapping Up
Filament 4 continues to shine as a lightweight, developer‑first admin panel that fits perfectly on a self‑hosted VPS. By caching aggressively, tightening the admin endpoint, and picking the right plugins—Spatie Permission for RBAC, Tables for data grids, Charts for visual KPIs, and Backup for safety—you’ll get a production‑grade dashboard without the bloat of a full CMS.
Remember to keep your deployment checklist handy, monitor response times, and rotate your backup destinations regularly. With these practices, your Filament admin panel will stay snappy, secure, and ready for the next wave of features.
Happy coding, and if you need more in‑depth guides, feel free to check out the resources at mahbuburriad.com.