Skip to content
Luna-OSPublic

About

Ein eleganter Pastebin-Service mit dunklem Theme und erweiterten Features. Entwickelt mit PHP und modernem CSS-Design ohne JavaScript

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🌙 Lunabin - Pastebin System

A modern, secure pastebin system with Dark/Light Mode, Syntax Highlighting, and Admin Panel.

Database: SQLite (no MySQL/PostgreSQL required)

🚀 Installation & Setup

  1. Copy Files

    • Upload all Lunabin files to your web server directory
    • Ensure PHP 7.4+ is available with SQLite support
  2. 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/
  3. Initialize Database

    php init_db.php
    • This will create the SQLite database automatically
    • The database file will be created at storage/db.sqlite

🔐 Admin Access

Default Password

⚠️ IMPORTANT: The default admin password is:

123456

🚨 SECURITY WARNING

The password "123456" is extremely insecure!

You MUST change the password before using Lunabin in production:

  1. Go to: http://your-domain.com/Lunabin/admin-login.php
  2. Log in with the password 123456
  3. Click on "🔑 Change Password" in the Admin Panel
  4. Set a strong, secure password

Creating a 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

📋 Features

For Users

  • 🌙 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

For Admins

  • 📊 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

🛡️ Security Features

  • 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

🔧 Configuration

Important Files

  • inc/config.php - Main configuration
  • storage/.admin - Admin authentication
  • storage/db.sqlite - SQLite database
  • css/style.css - Theme styling

Customizable Settings

// 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 cleanup

📁 Directory Structure

Lunabin/
├── 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

🚀 After Installation

  1. Change password immediately: Use the Admin Panel
  2. Enable SSL: For production environments
  3. Set up backups: Regular backup of the SQLite database
  4. Check for updates: Keep the system up to date

🔄 Maintenance

Manual Cleanup

php cleanup_expired.php  # Delete expired pastes

Database Repair

php fix_database.php     # For issues with the DB structure

Debug Information

php debug_paste.php?id=PASTE_ID  # Paste-specific information

📞 Support

If you have problems:

  1. Check the permissions of the storage/ directory
    ls -la storage/
    chmod -R 755 storage/
  2. Make sure PHP has SQLite support
    php -m | grep sqlite
  3. Check the Apache/Nginx error logs
  4. Ensure init_db.php was run successfully to create the database

⚡ Performance Tips

  • 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! 🚀

About

Ein eleganter Pastebin-Service mit dunklem Theme und erweiterten Features. Entwickelt mit PHP und modernem CSS-Design ohne JavaScript

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages