Flux is a self-hosted PHP dashboard for freelancers. This guide covers requirements, database setup, configuration, and first-time access.
Requirements
- PHP 8.3 or higher with PDO, GD, and cURL extensions
- MySQL 5.7+ or MariaDB 10.3+
- Apache, Nginx, or OpenLiteSpeed with mod_rewrite enabled
- SSL certificate (required for Stripe/PayPal webhooks)
- Cron job access for automated tasks
Step 1 — Upload Files
Extract the Flux package and upload all flux-*.php files, the assets/ directory, and .htaccess to your web root or a subdirectory.
Step 2 — Create the Database
Import flux-setup.sql via phpMyAdmin or the MySQL CLI:
mysql -u your_user -p your_database < flux-setup.sql
Step 3 — Configure Database Connection
Open flux-config.php and update the following constants:
| Constant | Description |
|---|---|
DB_HOST | Database hostname (usually localhost) |
DB_NAME | Name of the database you created |
DB_USER | Database username |
DB_PASS | Database password |
DB_CHARSET | Character set (default utf8mb4) |
Step 4 — Set Base URL & Branding
In flux-config.php, set your panel URL and brand name:
| Constant | Description |
|---|---|
BASE_URL | Full URL to your Flux installation (e.g., https://panel.yoursite.com/) |
BRAND_NAME | Your business name displayed in the header and emails |
TIMEZONE | PHP timezone string (e.g., America/New_York) |
Step 5 — Configure Payment Gateways
Flux supports Stripe and PayPal for invoice payments. Add your keys in flux-config.php:
| Constant | Description |
|---|---|
STRIPE_PK | Stripe Publishable Key |
STRIPE_SK | Stripe Secret Key |
STRIPE_WEBHOOK | Stripe Webhook Secret |
PAYPAL_CLIENT | PayPal Client ID |
PAYPAL_SECRET | PayPal Secret |
PAYPAL_SANDBOX | Set to true for testing, false for live |
Step 6 — Set Up Cron Jobs
Add the following cron jobs for automated tasks:
# Daily analytics snapshot
0 0 * * * /usr/bin/php /path/to/flux-cron-daily.php
# Hourly invoice status sync
0 * * * * /usr/bin/php /path/to/flux-cron-hourly.php
Step 7 — First Login
Navigate to flux-install.php in your browser to create the first admin account. Delete flux-install.php immediately after setup.
Delete flux-install.php after first run. Leaving it accessible allows anyone to create an admin account.
Need Hosting?Use our affiliate link and code
NEXUS for 15% off your first purchase at ReviveNode.