A modern, secure pastebin system with Dark/Light Mode, Syntax Highlighting, and Admin Panel.
Database: SQLite (no MySQL/PostgreSQL required)
-
Copy Files
- Upload all Lunabin files to your web server directory
- Ensure PHP 7.4+ is available with SQLite support
-
Set Permissions
- The
storage/directory must be writable (755 or 777) - On Linux/Unix:
chmod -R 755 storage/ # or if needed: chmod -R 777 storage/ - The
-
Initialize Database
php init_db.php
- This will create the SQLite database automatically
- The database file will be created at
storage/db.sqlite
123456
The password "123456" is extremely insecure!
You MUST change the password before using Lunabin in production:
- Go to:
http://your-domain.com/Lunabin/admin-login.php - Log in with the password
123456 - Click on "🔑 Change Password" in the Admin Panel
- Set a strong, secure password
Use at least:
- 8-12 characters
- Combination of uppercase and lowercase letters
- Numbers
- Special characters (!@#$%^&*)
Examples of strong passwords:
MySecure2024!L0ngP@ssw0rd#B1nSecur3$2024
- 🌙 Dark/Light Mode - CSS-only Theme-Switching
- 🎨 Syntax Highlighting - Supports many programming languages
- 🔒 Password Protection - Optional for private pastes
- ⏰ Expiration Times - Automatic cleanup
- 📱 Responsive Design - Works on all devices
- 🔗 Share Codes - Short, user-friendly links
- 📊 QR Codes - Easy sharing on mobile
- 📊 Dashboard - Overview of all pastes
- 🔍 Search - By ID, title, or share code
- 🗑️ Paste Management - Delete and manage
- 🧹 Cleanup - Automatic cleanup of expired pastes
- 📈 Statistics - Views, counts, etc.
- 🔑 Password Change - Secure password management
- Admin Authentication with Argon2ID hashing
- CSRF Protection for all admin actions
- XSS Protection through output sanitization
- Rate Limiting for login attempts
- Secure Encryption for protected pastes
- Automatic Session Management
inc/config.php- Main configurationstorage/.admin- Admin authenticationstorage/db.sqlite- SQLite databasecss/style.css- Theme styling
// In inc/config.php
define('DEFAULT_EXPIRY', 86400); // 24 hours default expiration
define('MAX_PASTE_SIZE', 1048576); // 1MB maximum paste size
define('AUTO_CLEANUP', true); // Automatic cleanupLunabin/
├── admin.php # Admin Dashboard
├── admin-login.php # Admin Login
├── index.php # Main page
├── paste.php # Paste creation
├── view.php # Paste display
├── share.php # Share functions
├── qr.php # QR Code Generator
├── css/style.css # Main stylesheet
├── inc/ # PHP includes
│ ├── config.php # Configuration
│ ├── db.php # Database functions
│ └── functions.php # Helper functions
└── storage/ # Data directory
├── db.sqlite # SQLite database
└── .admin # Admin data
- Change password immediately: Use the Admin Panel
- Enable SSL: For production environments
- Set up backups: Regular backup of the SQLite database
- Check for updates: Keep the system up to date
php cleanup_expired.php # Delete expired pastesphp fix_database.php # For issues with the DB structurephp debug_paste.php?id=PASTE_ID # Paste-specific informationIf you have problems:
- Check the permissions of the
storage/directoryls -la storage/ chmod -R 755 storage/
- Make sure PHP has SQLite support
php -m | grep sqlite - Check the Apache/Nginx error logs
- Ensure
init_db.phpwas run successfully to create the database
- Enable APCu for better caching
- SQLite WAL Mode is already enabled
- Regular cleanup prevents excessive DB growth
🔐 Don't forget to change the default password "123456"!
Lunabin is ready to use, but only with a secure admin password! 🚀