Deploying Leed
Introduction
Leed (short for Light Feed) is a minimalist, self-hosted RSS feed aggregator that prioritizes simplicity and speed. Originally developed as a lightweight alternative to more complex feed readers, Leed provides a clean interface for following your favorite websites, blogs, and news sources without the bloat of feature-heavy applications.
Built with PHP and designed for minimal resource consumption, Leed stores feeds in a MySQL/MariaDB database and presents articles through a responsive web interface. The application focuses on doing one thing well: aggregating and displaying RSS/Atom feeds in an organized, readable format.
Key highlights of Leed:
- Lightweight Design: Minimal resource footprint makes it ideal for low-powered servers and shared hosting
- Fast Performance: Optimized codebase ensures quick page loads and responsive navigation
- Clean Interface: Distraction-free reading experience with a focus on content
- OPML Import/Export: Easily migrate feeds from other readers or back up your subscriptions
- Folder Organization: Group feeds into categories for better organization
- Keyboard Shortcuts: Navigate efficiently using keyboard commands
- Mobile Responsive: Read comfortably on phones and tablets
- Multi-User Support: Create separate accounts for different users
- API Access: Integrate with mobile apps and third-party clients
- Easy Installation: Simple setup with minimal dependencies
This guide walks through deploying Leed on Klutch.sh using Docker, configuring the database, and customizing your feed reader for daily use.
Why Deploy Leed on Klutch.sh
Deploying Leed on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds Leed without complex configuration. Push to GitHub, and your feed reader deploys automatically.
Persistent Storage: Attach persistent volumes for your database and configuration. Your feed subscriptions and read history survive container restarts.
HTTPS by Default: Klutch.sh provides automatic SSL certificates, ensuring secure access to your feeds from anywhere.
GitHub Integration: Connect your repository directly from GitHub. Updates trigger automatic redeployments.
Scalable Resources: Start with minimal resources and scale as your subscription list grows.
Environment Variable Management: Securely store database credentials without exposing them in your repository.
Custom Domains: Assign a custom domain for a personalized feed reading experience.
Always-On Availability: Your feed reader stays online 24/7, continuously fetching new articles.
Prerequisites
Before deploying Leed on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Leed configuration
- Basic familiarity with Docker and containerization concepts
- A MySQL/MariaDB database (can be deployed as a separate service)
- (Optional) A custom domain for your Leed instance
Understanding Leed Architecture
Leed uses a straightforward architecture:
PHP Application: The core is a PHP application that handles feed fetching, parsing, and display.
MySQL/MariaDB Database: Stores feeds, articles, user preferences, and read states.
Cron Jobs: Scheduled tasks fetch new articles from subscribed feeds at regular intervals.
Web Interface: A responsive HTML/CSS/JavaScript frontend for reading and managing feeds.
Preparing Your Repository
Repository Structure
leed-deploy/├── Dockerfile├── cron/leed-cron├── README.md└── .dockerignoreCreating the Dockerfile
FROM php:8.2-apache
# Install required PHP extensionsRUN docker-php-ext-install mysqli pdo pdo_mysql
# Install additional packagesRUN apt-get update && apt-get install -y \ cron \ curl \ && rm -rf /var/lib/apt/lists/*
# Enable Apache modulesRUN a2enmod rewrite
# Set working directoryWORKDIR /var/www/html
# Download and extract LeedRUN curl -L https://github.com/LeedRSS/Leed/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1
# Set permissionsRUN chown -R www-data:www-data /var/www/html \ && chmod -R 755 /var/www/html
# Copy cron configurationCOPY cron/leed-cron /etc/cron.d/leed-cronRUN chmod 0644 /etc/cron.d/leed-cron && crontab /etc/cron.d/leed-cron
# Expose portEXPOSE 80
# Start cron and ApacheCMD cron && apache2-foregroundCreating the Cron File
Create cron/leed-cron:
*/15 * * * * www-data php /var/www/html/action.php > /dev/null 2>&1Creating the .dockerignore File
.git.github*.mdLICENSE.gitignore*.log.DS_Store.env.env.localEnvironment Variables Reference
| Variable | Required | Default | Description |
|---|---|---|---|
MYSQL_HOST | Yes | - | MySQL/MariaDB server hostname |
MYSQL_DATABASE | Yes | leed | Database name |
MYSQL_USER | Yes | - | Database username |
MYSQL_PASSWORD | Yes | - | Database password |
Deploying Leed on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 80
- Navigate to
https://your-app.klutch.sh/install.php - Enter your database credentials
- Create an admin account
- Complete the setup wizard
Set Up MySQL/MariaDB Database
Deploy a MySQL or MariaDB database as a separate Klutch.sh app or use a managed database service. Create a database for Leed.
Push Your Repository to GitHub
git initgit add Dockerfile cron/ .dockerignore README.mdgit commit -m "Initial Leed deployment configuration"git remote add origin https://github.com/yourusername/leed-deploy.gitgit push -u origin mainCreate a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project named “leed” or “rss-reader”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select your Leed repository.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Add database connection variables:
| Variable | Value |
|---|---|
MYSQL_HOST | Your MySQL hostname |
MYSQL_DATABASE | leed |
MYSQL_USER | Your database username |
MYSQL_PASSWORD | Your database password |
Attach Persistent Volumes
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/var/www/html/constant.php | 1 MB | Configuration file |
Deploy Your Application
Click Deploy to start the build process.
Complete Installation
Access your Leed instance and complete the web-based installation:
Initial Configuration
Adding Your First Feeds
After installation:
- Log in with your admin credentials
- Click the ”+” button to add a new feed
- Enter the RSS/Atom feed URL
- Organize into folders if desired
Importing from Other Readers
- Export an OPML file from your previous reader
- Navigate to Settings > Import
- Upload your OPML file
- Review and confirm the imported feeds
Configuring Update Intervals
The cron job updates feeds every 15 minutes by default. Modify cron/leed-cron to change the frequency:
- Every 5 minutes:
*/5 * * * * - Every 30 minutes:
*/30 * * * * - Hourly:
0 * * * *
Production Best Practices
Security Recommendations
- Use strong passwords for all accounts
- Remove
install.phpafter setup completes - Keep PHP and Leed updated
- Restrict database access to necessary hosts
Performance Tips
- Limit the number of feeds if running on limited resources
- Adjust cron frequency based on needs
- Use database connection pooling
- Enable PHP opcache for faster performance
Backup Strategy
- Regularly back up the MySQL database
- Export your OPML feed list periodically
- Back up the configuration file
Troubleshooting
Feeds Not Updating
- Verify cron is running inside the container
- Check PHP error logs for fetch failures
- Ensure the feed URLs are accessible
- Test feeds with an online RSS validator
Database Connection Issues
- Verify database credentials in environment variables
- Ensure MySQL is accessible from the container
- Check firewall rules between services
Display Problems
- Clear browser cache
- Check Apache error logs
- Verify file permissions are correct
Additional Resources
Conclusion
Deploying Leed on Klutch.sh gives you a lightweight, self-hosted RSS reader with automatic builds and secure HTTPS access. Its minimalist design ensures fast performance and a distraction-free reading experience.
With Leed on Klutch.sh, you can stay updated with your favorite content sources while maintaining complete control over your data and reading habits.