MP3Nest

Music, album and movie songs download script for Laravel 13. Thank you for your purchase! This guide takes you from upload to a live site in about ten minutes.

Features

Two home layoutsClassic (hero slider, category tiles, trending, albums, movies, genres) and Spotlight (big hero with search, colour cards, mixed trending row). Switch in Admin → Home & Layouts.
Two song page layoutsClassic (download box, lyrics tabs, details) and Waveform (artist card, more from album, related albums).
Four qualities128, 192, 256 and 320 kbps per song. Upload one file and the script creates the rest automatically when ffmpeg is available.
Album ZIP downloadsOne click downloads a whole album. ZIPs are built once and cached.
Smart uploadsTitle, artist, duration, year and cover are read from the MP3 (ID3) tags. Bulk upload with a ZIP of MP3s or a CSV import.
Cloud storageKeep MP3s on this server or on Cloudflare R2, Amazon S3, Wasabi, Backblaze B2, DigitalOcean Spaces, Vultr, Linode, Contabo, IDrive e2, MinIO, Bunny.net, FTP or SFTP – or paste direct links. Visitors download straight from the storage.
Protected downloadsAudio files live outside the public folder. Downloads use signed links that expire after 10 minutes, and other sites cannot hotlink the stream.
Sticky playerPlay songs from any card. A compact player follows the visitor; song pages have their own player and waveform.
Member libraryFavorites, own playlists, download history and listening history. Google & Facebook login.
Page builderAbout, Team, FAQ, policies or any new page with a visual editor and ready-made sections.
DonationsStripe, PayPal, Razorpay and bank transfer – every payment is verified with the provider.
SEOMeta tags, Open Graph, schema.org (MusicRecording, MusicAlbum, Movie, FAQ, Breadcrumb), sitemap index and robots.txt.
MonetiseGoogle AdSense slots (header, sidebar, in-content, download page, footer), auto ads.txt and Meta Pixel.
Admin panelDashboard with uploads and quick settings, analytics, activity log, roles, backups and responsive design.
BrandingLogo, favicon, four themes (Dark, Light, Neon, Minimal) and eight colour presets.
ExtrasSong requests, DMCA / report form, newsletter, cookie notice, installable app (PWA), multi-language.
Home page – classic layout

Server requirements

ItemRequirement
PHP8.3 or 8.4
DatabaseMySQL 5.7+ / 8.x or MariaDB 10.4+
PHP extensionsPDO MySQL, OpenSSL, Mbstring, Fileinfo, GD, Zip, cURL, DOM/XML, Ctype, JSON, Tokenizer
Web serverApache with mod_rewrite (most shared hosting) or Nginx
Optionalffmpeg (automatic 256/192/128 kbps versions), a cron job, the PHP FTP extension (only for FTP storage)
Not neededComposer, Node.js or SSH – everything is included

Single songs of any size can be uploaded even with a small PHP limit: the upload form sends big files in parts. For ZIP and album uploads set upload_max_filesize and post_max_size to at least 64M. The largest song size is UPLOAD_MAX_MB in .env (default 50).

Package contents

mp3nest/The script (upload this). Includes the vendor/ folder, so no Composer is needed.
documentation/This guide.
START-HERE.txtThe five-step quick start.

Installation (cPanel / shared hosting)

1. Create a database

  1. Open cPanel → MySQL Databases.
  2. Create a database (for example youruser_mp3nest) and a user with a strong password.
  3. Add the user to the database with All Privileges.

2. Upload the files

  1. Open File Manager and go to public_html (or the folder of your sub-domain).
  2. Upload mp3nest.zip (zip the mp3nest folder content) and extract it there. The folder must contain app, public, vendor, .htaccess and so on.
  3. The included .htaccess sends all visitors to the public folder and blocks access to private files. Best practice is to point the domain's document root to the public folder (cPanel → Domains → Document Root).

3. Run the installer

  1. Open your domain. The installer starts automatically at /install.
  2. Check the requirements, enter the database details, then your site name and admin account.
  3. Choose an admin folder name (for example studio-panel) – your panel will be at yourdomain.com/studio-panel.
  4. Tick Import demo content to start with sample songs, albums and images (you can delete them later).
  5. When the installer finishes it locks itself; /install then returns "not found".
Folder permissions: storage/, bootstrap/cache/ and public/uploads/ must be writable (755 or 775). .env must be writable during installation.

Cron job

Add this command in cPanel → Cron Jobs, every minute (replace the path with the one shown in Admin → System Settings):

* * * * * php /home/youruser/public_html/artisan schedule:run >> /dev/null 2>&1

The cron job removes old ZIP and temporary files every day and resets the demo every three hours when demo mode is on. Admin → System Settings shows when it last ran.

Sub-folder, VPS & Nginx

Sub-folder (e.g. yourdomain.com/music): upload into public_html/music; the installer detects the URL automatically.

VPS with Nginx: point the root to /var/www/mp3nest/public and use the standard Laravel rule:

server {
    server_name music.example.com;
    root /var/www/mp3nest/public;
    index index.php;
    client_max_body_size 100M;
    location / { try_files $uri $uri/ /index.php?$query_string; }
    location ~ \.php$ { include fastcgi_params; fastcgi_pass unix:/run/php/php8.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; }
    location ~ /\.(?!well-known) { deny all; }
    location ^~ /uploads/ { location ~ \.php$ { deny all; } }
}

Give the web server user write access: chown -R www-data:www-data storage bootstrap/cache public/uploads .env.

Admin panel

Admin dashboard

The dashboard combines the most-used tools on one screen: statistics, quick upload of a song, album or movie, the latest songs, SEO, AdSense, Meta Ads, theme and feature switches, quick actions and recent activity. Every widget saves only its own fields.

MenuWhat it does
Content ManagementSongs, albums, movies, artists, categories (genres & languages), playlists and the hero slider
Website SettingsSite settings, appearance, home & layouts, menus, pages, e-mail templates
SEO & MarketingSEO, Google AdSense, Meta Ads, analytics and donations
User & SystemUsers, comments, inbox & song requests, reports (DMCA), backups, system, administrators, mail, social login, payment gateways, features, security, activity log

Roles: Super Admins can open everything. Managers can manage content and settings, but not backups, system and administrators.

Uploading music

Upload song
MP3 files are stored in storage/app/private/songs, outside the public web folder, or on the cloud storage you choose (see Cloud storage). Visitors only get a signed link that expires.

Cloud storage (R2, S3, Bunny, FTP …)

By default MP3 files are kept on your hosting. In Admin → Storage (Cloud) you can keep new uploads on a cloud storage instead. It saves disk space and bandwidth on your hosting. Visitors stream and download straight from the storage, with links that expire after the time you set (30 minutes by default).

Storage settings
StorageGood for
Cloudflare R2No fee for downloads (egress). The best choice for busy music sites.
Amazon S3Reliable everywhere, but downloads are billed per GB.
Wasabi, Backblaze B2Very low storage prices.
DigitalOcean Spaces, Vultr, Akamai / Linode, Contabo, IDrive e2S3-compatible storage from VPS providers.
MinIO / other S3-compatibleYour own storage server. Enter its endpoint and switch on "path-style URLs".
Bunny.net Storage + CDNLow price and a fast CDN in every region.
FTP / SFTPA second hosting account or VPS with free disk space.
Direct linksFiles you already host elsewhere: paste the MP3 link per bitrate in the song form.

Cloudflare R2 (recommended)

  1. Cloudflare dashboard → R2 → Create bucket (e.g. mp3nest-music). Copy the Account ID from the R2 overview page.
  2. R2 → Manage R2 API Tokens → Create API token with Object Read & Write for this bucket. Copy the Access Key ID and Secret Access Key.
  3. MP3Nest → Storage: Store new MP3 files on = S3-compatible, Provider = Cloudflare R2, then enter the bucket, keys and Account ID. Leave Region and Endpoint empty.
  4. Optional: connect a custom domain to the bucket (bucket → Settings → Public access) and enter it as Public / CDN URL. The player then streams through Cloudflare's CDN.
  5. Save. The page runs a connection test (upload, read, delete) and shows the result.

Amazon S3, Wasabi, Backblaze B2, Spaces and others

  1. Create a bucket. Keep it private, because MP3Nest uses signed links.
  2. Create an access key that can read and write this bucket. On Amazon S3 this is an IAM user with s3:GetObject, s3:PutObject, s3:DeleteObject and s3:ListBucket.
  3. Choose the provider and enter the bucket, keys and region. Examples: Amazon eu-west-1, Wasabi eu-central-1, B2 us-west-004, Spaces nyc3, Vultr ewr1, Contabo eu2. The endpoint is filled in from the region.
  4. IDrive e2, MinIO and any other provider need the Endpoint, e.g. https://s3.us-west-1.idrivee2.com.

Bunny.net

  1. Bunny dashboard → Storage → Add Storage Zone. Copy its name and its Password (FTP & API Access).
  2. Create a Pull Zone connected to this storage zone. Its hostname looks like mymusic.b-cdn.net.
  3. Recommended: Pull Zone → Security → Token Authentication → enable and copy the key. Download links then expire just like on the other storages.
  4. Enter the zone name, password, region, Pull Zone hostname and token key in MP3Nest, then save.

FTP / SFTP server

Enter the host, port (FTP 21, SFTP 22), username, password and the folder for the files. The folder must already exist. If that folder can be reached in a browser (e.g. https://media.example.com), enter it as Public URL so visitors download from that server. Without it the files are passed through your main site.

Large uploads straight to the bucket

With an S3-compatible storage you can switch on Upload from the browser straight to the bucket. The MP3 goes from the admin's browser to the bucket, skipping your hosting's upload limit and bandwidth. Add the CORS rule shown on the Storage page to your bucket (Cloudflare R2: bucket → Settings → CORS policy; Amazon S3: bucket → Permissions → CORS).

Existing songs

If you switch to another bucket or account, move the files first, or keep the old storage until every song is moved.

Layouts, logo & colours

Appearance settings Home page – spotlight layout

Pages & menus

Page editor

Admin → Pages creates any page in the site design: About, Our Team, Privacy Policy, Terms, DMCA, FAQ or your own. The editor supports headings, lists, links, images and an HTML view. Each page can add optional sections: numbers, feature cards, team members with photos and FAQ (with FAQ schema for Google). Write {site} to insert your site name.

Admin → Menu Management edits the header menu with icons (Classic), the text menu (Spotlight) and the footer links. Drag to reorder.

Members, comments & inbox

Mail (SMTP)

Admin → Mail (SMTP). Enter the details of your mail provider, save, then use "Send Test".

ProviderHostPort / Encryption
Your hosting mailboxmail.yourdomain.com465 / SSL or 587 / TLS
Gmail / Google Workspacesmtp.gmail.com587 / TLS (use an App Password)
Outlook / Microsoft 365smtp.office365.com587 / TLS
Brevosmtp-relay.brevo.com587 / TLS
Mailgunsmtp.mailgun.org587 / TLS
Amazon SESemail-smtp.REGION.amazonaws.com587 / TLS

E-mail templates

Admin → E-mail Templates edits the subject, heading, text and button of every e-mail: welcome, verify e-mail, password reset, donation receipt, bank transfer received, contact reply, song request added, admin login code, newsletter and new report. All e-mails use your logo and colours, and have a live preview.

Donations & payments

Payment settings

All downloads are free. The optional Support Us page (/support-us) lets visitors donate. Configure it in Admin → Payment Gateways. Start with test keys.

Stripe (cards)

  1. Stripe Dashboard → Developers → API keys: copy the publishable and secret key.
  2. Developers → Webhooks → Add endpoint: https://yourdomain.com/webhooks/stripe, event payment_intent.succeeded. Copy the signing secret (whsec_…).
  3. Test card: 4242 4242 4242 4242, any future date and CVC.

PayPal

  1. developer.paypal.com → Apps & Credentials → create an app, copy the Client ID and Secret.
  2. Choose Sandbox for testing and Live when you go live.

Razorpay (UPI, cards, wallets)

  1. Razorpay Dashboard → Settings → API Keys: copy Key ID and Key Secret.
  2. Settings → Webhooks: https://yourdomain.com/webhooks/razorpay, event payment.captured, and a secret.

Bank transfer

Enter your bank details. The donor sends the money, enters the transaction reference (and optionally a receipt) and you approve it in Admin → Donations.

How payments are protected

These rules are covered by automated tests in tests/Feature/DonationSecurityTest.php.

Google & Facebook login

Admin → Social Login. Redirect URLs to add in the developer consoles:

https://yourdomain.com/auth/google/callback
https://yourdomain.com/auth/facebook/callback

SEO & sitemap

AdSense & Meta Pixel

Admin → Google AdSense: enter your publisher ID (ca-pub-…), switch on ads and paste ad unit codes into the positions: header, sidebar, in-content, download page and footer. /ads.txt is created from your publisher ID. The download page shows a short countdown (Features → download countdown) so the download ad is seen.

Admin → Meta Ads: add your Facebook Pixel ID to track page views for Facebook and Instagram campaigns.

Security

Security settings

Public demo mode

  1. Install on a sub-domain with demo content.
  2. Set DEMO_MODE=true in .env.
  3. Run php artisan mp3nest:demo-admin (default login demo@demo.com / demo1234; change it with DEMO_ADMIN_EMAIL and DEMO_ADMIN_PASSWORD).
  4. Add the cron job – the demo content resets every three hours (php artisan mp3nest:demo-reset).

In demo mode every save button in the admin panel is blocked, and the demo member (user@demo.com / password) cannot change its e-mail or password. Login pages show a "Fill" button with the demo logins.

Translation

All texts are translatable. Copy lang/es.json (Spanish example) to a new file such as lang/fr.json, translate the values, then choose the default language in Site Settings. With "Enable Multi-Language" on, visitors get a language selector in the footer.

Customising the design

Updating

  1. Back up the database (Admin → Backup & Restore) and the public/uploads and storage/app/private folders.
  2. Upload the new files over the old ones, but keep your .env file and the two folders above.
  3. Run php artisan migrate --force (or ask your host), then clear the cache in Admin → System Settings.

Troubleshooting

ProblemSolution
500 error after uploadCheck PHP 8.3+, folder permissions and that vendor/ was uploaded. Set APP_DEBUG=true in .env briefly to see the message, then switch it off again.
Uploads fail for big MP3/ZIP filesIncrease upload_max_filesize, post_max_size and max_execution_time in your PHP settings.
E-mails are not sentUse Mail (SMTP) → Send Test. With the driver on "Log only" e-mails go to storage/logs.
Pages show 404 except the home pageEnable mod_rewrite or point the document root to /public.
Forgot the admin folderOpen .env and look at ADMIN_PATH.
Forgot the admin passwordUse a second admin, or run php artisan tinker and update the admins table.
Storage test failsCheck the keys, bucket name and region. R2 needs the Account ID. FTP: the folder must exist and passive mode is usually needed. Some hosts block outgoing FTP/SFTP ports.
Browser upload to the bucket failsAdd the CORS rule from the Storage page to the bucket, or switch "Upload from the browser" off (big files are then sent in parts to your server).
Album ZIP download failsThe PHP Zip extension is required (System Settings shows its status).

Credits & licences

You are responsible for the content you publish. Only upload music you have the right to distribute, and respond to copyright notices from the Reports page.

Changelog

Version 1.0.0 – Initial release.