Environment Configuration
All configuration is managed through the.env file in your project root. Start by copying the example file:
Application Settings
The name of your application, displayed in the UI and emails.
Application environment. Use
local for development, production for live deployments.Application encryption key. Generated automatically by
php artisan key:generate.Enable debug mode for detailed error messages. Set to
false in production.The base URL of your application.
Memory limit for media synchronization jobs. Increase if syncing large catalogs.
Lionz TV / Xtream Codes API
Configure your Xtream Codes API credentials to connect to Lionz TV:Your Lionz TV API host URL (without http:// or https://).
API port number. Typically
80 for HTTP or 443 for HTTPS.Your Lionz TV username.
Your Lionz TV password.
Custom user agent for API requests. Defaults to Firefox user agent.
MeiliSearch Configuration
MeiliSearch must be running before starting the application or syncing content.
Laravel Scout driver. Must be
meilisearch.Whether to queue search indexing operations. Recommended to keep
true for better performance.MeiliSearch server URL with port.
MeiliSearch master key for authentication. Must match the key used when starting MeiliSearch.
aria2 Download Manager
Configure aria2 for handling downloads:aria2 RPC server hostname with protocol.
aria2 RPC server port.
Secret token for aria2 RPC authentication. Must match the
--rpc-secret used when starting aria2.Root directory for downloads. Defaults to
storage/app/public/downloads.Database Configuration
SQLite is the default and recommended database for ease of setup. You can switch to MySQL or PostgreSQL if needed.
Queue Configuration
Queue driver for background jobs. Default
database works well for most use cases.Background jobs are used for media synchronization, search indexing, and download monitoring. The queue worker is automatically started with
composer dev.Optional Features
Enable Laravel Telescope debug assistant. Set to
false in production.Enable direct download links feature for content.
Service Initialization
After configuring your.env file, initialize the application configuration:
Initialize Configurations
Store aria2 and Xtream Codes configurations from This command reads from your environment variables and creates database records:
.env into the database:This only needs to be run once after initial setup or when updating service credentials.
Sync Media Content
Perform the initial content synchronization:This command:
- Fetches all categories from Lionz TV via Xtream Codes API
- Syncs VOD and Series content to the local database
- Indexes all content in MeiliSearch for fast searching
Running the Application
Development Mode
Start all development services:- Laravel server on
http://localhost:8000 - Queue worker for background jobs
- Log watcher (Pail) for real-time logs
- Vite dev server for hot module reloading
Development with SSR
For server-side rendering support:Production Mode
Scheduled Tasks
For automated content syncing, add to your crontab:crontab
Configuration Summary
Essential Configuration Checklist
-
.envfile created from.env.example -
APP_KEYgenerated - Xtream Codes API credentials configured
- MeiliSearch installed and running
- aria2 installed and RPC enabled
- Database created and migrated
-
php artisan lionz:configureexecuted -
php artisan lionz:sync-mediacompleted - Application accessible at
http://localhost:8000
Next Steps
Usage Guide
Learn how to search, download, and manage your IPTV content
API Reference
Explore the Xtream Codes API integration
Troubleshooting
Common configuration issues and solutions
Advanced Features
Series monitoring, bulk downloads, and automation