Miniflux is a lightweight, open-source RSS feed reader designed for simplicity and performance. Its self-hosted nature makes it an excellent choice for users who value privacy, customization, and full control over their data. In this guide, we'll cover how to deploy, configure, and manage Miniflux, with practical, hands-on steps to set it up using Docker or a manual installation, configure Nginx as a reverse proxy, enable logging, create backups, and more.
Installing Miniflux
π¦ Docker/Docker Compose Setup
To deploy Miniflux with Docker, create a docker-compose.yml
file tailored to its requirements. This setup includes PostgreSQL as the database and defines environment variables for seamless configuration.
version: "3.9"
services:
db:
image: postgres:15-alpine
container_name: miniflux_db
environment:
POSTGRES_USER: miniflux
POSTGRES_PASSWORD: securepassword
POSTGRES_DB: miniflux
volumes:
- miniflux_db_data:/var/lib/postgresql/data
restart: always
app:
image: miniflux/miniflux:latest
container_name: miniflux_app
ports:
- "8080:8080"
environment:
DATABASE_URL: postgres://miniflux:securepassword@db/miniflux?sslmode=disable
depends_on:
- db
restart: always
volumes:
miniflux_db_data:
Deploy the application by running the following commands in the same directory containing docker-compose.yml
:
docker-compose up -d
This command starts both the PostgreSQL and Miniflux containers in detached mode. Miniflux will be accessible at http://<server-ip>:8080
.
π Manual Installation
For users who prefer a manual setup on a Linux server, follow these steps:
- Install the required dependencies:
sudo apt update && sudo apt install -y postgresql wget
- Create a PostgreSQL database and user for Miniflux:
sudo -u postgres psql
CREATE DATABASE miniflux;
CREATE USER miniflux_user WITH PASSWORD 'securepassword';
GRANT ALL PRIVILEGES ON DATABASE miniflux TO miniflux_user;
\q
- Download and install the latest Miniflux binary:
wget https://github.com/miniflux/v2/releases/latest/download/miniflux-linux-amd64 -O miniflux
chmod +x miniflux
sudo mv miniflux /usr/local/bin/
- Start Miniflux with the necessary environment variables:
DATABASE_URL=postgres://miniflux_user:securepassword@localhost/miniflux?sslmode=disable miniflux
Miniflux will now be running on port 8080.
Configuring Nginx as a Reverse Proxy
π Nginx Configuration
Set up Nginx to route traffic to Miniflux running on port 8080. Create a new server block file for Miniflux (e.g., /etc/nginx/sites-available/miniflux
):
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Enable the configuration and reload Nginx:
sudo ln -s /etc/nginx/sites-available/miniflux /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
π SSL/TLS Setup
Secure your Miniflux instance with Let's Encrypt by using Certbot:
sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.com
Set up automatic certificate renewals by adding this to your crontab:
0 0 * * * certbot renew --quiet
Logging and Debugging Miniflux
ποΈ Enabling Debug Logs
Enable debug logging in Miniflux by setting the DEBUG
environment variable:
DEBUG=1 DATABASE_URL=postgres://miniflux_user:securepassword@localhost/miniflux?sslmode=disable miniflux
π Viewing Logs
For Docker deployments, view logs using the following command:
docker logs miniflux_app
If running manually, Miniflux logs are output to the terminal where itβs started.
π οΈ Troubleshooting Common Issues
Check the Miniflux logs for errors like "cannot connect to the database." Ensure the DATABASE_URL
environment variable is correctly configured and the database is accessible.
π€ Exporting Logs
To forward logs to an external log management system, use tools like fluentd
or filebeat
to collect and forward output from the Docker container or logs from your server.
Backup and Restore
ποΈ File-Based Backups
Backup your docker-compose.yml
file and application data volume:
tar -czvf miniflux_backup.tar.gz /path/to/docker-compose.yml /var/lib/docker/volumes/miniflux_db_data
π Database Backups
For a PostgreSQL database, run:
docker exec -t miniflux_db pg_dumpall -c -U miniflux > miniflux_backup.sql
Restore the backup with:
cat miniflux_backup.sql | docker exec -i miniflux_db psql -U miniflux
π Automated Backup Scripts
Set up a cron job to back up the database daily:
echo "0 2 * * * docker exec -t miniflux_db pg_dumpall -c -U miniflux > /path/to/backups/miniflux_backup_$(date +\%F).sql" | crontab -
Updating and Upgrading Miniflux
β¬οΈ Updating Docker Images
Update Miniflux to the latest version with:
docker-compose pull
docker-compose up -d
π οΈ Manual Updates
If installed manually:
-
Download the latest Miniflux binary.
-
Replace the existing binary and restart the app.
π Checking for Updates
Visit the Miniflux GitHub releases page to monitor for new updates.
Leveraging Minifluxβs Unique Features
π§ Enabling APIs
Activate the Miniflux API by generating an API token in the web UI under "Settings." Use this token for API requests:
curl -H "X-Auth-Token: your-token" https://your-domain.com/v1/feeds
π Advanced Configurations
Enable custom feed filters or integrations by modifying the environment variables in docker-compose.yml
. For example:
environment:
BASE_URL: "https://your-domain.com"
POLLING_FREQUENCY: "1h"
Wrapping Up
By following this guide, you've deployed, configured, and secured your self-hosted Miniflux instance. With full control over your RSS feed reader, you can customize its functionality, securely manage your data, and take advantage of its lightweight yet powerful features. Start exploring Miniflux today and enjoy a fast, privacy-focused RSS reading experience!