Requirements
- PHP 8.3+ (CLI and web server must use the same version)
- Composer 2.x
- Node.js 20 LTS and npm
- MySQL 8 or MariaDB 10.6+
- FFmpeg (required for lyrics video and audio pipelines)
- Optional: Redis (not required; MelodAI uses database queues by default)
On Windows, XAMPP is the most common stack. Laragon and WAMP work the same way with different folder paths.
Step 1: Enable Required PHP Extensions (php.ini)
Edit the php.ini used by both Apache and CLI. Typical paths:
- Windows XAMPP:
C:\xampp\php\php.ini - Windows WAMP:
C:\wamp64\bin\php\php8.3.x\php.ini - macOS Homebrew:
/opt/homebrew/etc/php/8.3/php.ini - Linux:
/etc/php/8.3/apache2/php.iniand/etc/php/8.3/cli/php.ini
Required extensions (remove leading ; if commented):
bcmath,ctype,curl,dom,fileinfo,gd,intl,mbstring,mysql,openssl,pcntl,pdo_mysql,posix,tokenizer,xml,zip
Recommended:
exif,iconv,sodiumredisonly if you switchQUEUE_CONNECTION/CACHE_STOREto Redis
Also verify these php.ini values for uploads and long jobs:
upload_max_filesize = 64Mpost_max_size = 64Mmax_execution_time = 300memory_limit = 512MWindows/XAMPP SSL fix (if OpenAI, Suno, or R2 return cURL error 60):
curl.cainfo = C:\xampp\php\extras\ssl\cacert.pemopenssl.cafile = C:\xampp\php\extras\ssl\cacert.pemRestart Apache, then verify extensions:
php -mphp --iniStep 2: Prepare Project and .env
Place the project in your web root, for example C:\xampp\htdocs\melodai.
cd C:\xampp\htdocs\melodaicopy .env.example .envcomposer installphp artisan key:generateMinimum local .env values:
APP_ENV=localAPP_DEBUG=trueAPP_URL=http://localhost/melodai/publicSKIP_INSTALL_WIZARD=falseQUEUE_CONNECTION=databaseMELODAI_QUEUE_AFTER_RESPONSE=trueREDIS_CLIENT=predisOn XAMPP, use OPENAI_SSL_VERIFY=false and CLOUDFLARE_R2_SSL_VERIFY=false only if CA bundle is missing. Prefer fixing curl.cainfo instead.
Step 3: Database Setup
Create a MySQL database (phpMyAdmin or CLI), then set:
DB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=melodaiDB_USERNAME=rootDB_PASSWORD=Run migrations and seeders:
php artisan migratephp artisan db:seedphp artisan storage:linkStep 4: Build Frontend Assets
npm installnpm run buildFor active development with hot reload, use npm run dev instead of build-only.
Step 5: Run the Application
Recommended — starts web server, queue worker, and Vite together:
composer run devAlternative manual terminals:
php artisan servephp artisan melodai:work --tries=1npm run dev- Website (artisan serve):
http://127.0.0.1:8000 - XAMPP Apache:
http://localhost/melodai/public - Login (users and admins):
/login— admin accounts are redirected to/adminafter sign-in
Horizon requires Linux/macOS with pcntl. On Windows/XAMPP always use php artisan melodai:work or composer run dev.
Step 6: Installation Wizard
On first visit, open /install and complete all steps (database, site URL, admin account, and integrations).
After installation, configure providers in Admin → Settings (AI, Mail, Payment, YouTube, Security).
Step 7: FFmpeg (Local)
Install FFmpeg and set paths in .env:
FFMPEG_BINARIES=C:\ffmpeg\bin\ffmpeg.exeFFPROBE_BINARIES=C:\ffmpeg\bin\ffprobe.exeLinux/macOS example:
FFMPEG_BINARIES=/usr/bin/ffmpegTroubleshooting (Local)
- Vite manifest error: run
npm run buildornpm run dev. - Queue jobs never run: keep
melodai:workorcomposer run devrunning. - cURL error 60: set CA bundle in php.ini or temporarily
OPENAI_SSL_VERIFY=false. - Permission errors: ensure
storageandbootstrap/cacheare writable. - Installer redirect loop: confirm DB connection works and migrations completed.