LFReader is a self-hosted Local-first Feed Reader written in Python and Solid.js.
Note
This app is still in its early stage. Breaking changes may occur from time to time. Check migration notes before updating.
Light mode:

Dark mode:

Config options:

# create data dir
mkdir -p data
docker run -d -p 8080:80 --name lfreader -v $PWD/data:/app/data dcsunset/lfreader
Then access http://localhost:8080 in browser.
The database and archived files will be stored in the volume /app/data in container (or where you mount it in the host).
The log of backend server is stored at /app/logs/backend.log inside the container.
You can quickly check the log by docker exec lfreader tail /app/logs/backend.log.
The default config file can be found in docker/config.json in this repo.
You can use your own config simply by mounting it to /app/config.json:
# suppose your config is at ./config.json
docker run -d -p 8080:80 --name lfreader -v $PWD/config.json:/app/config.json -v $PWD/data:/app/data dcsunset/lfreader
To install backend server only, you can use pip to install the backend dir in this repo:
pip install -e "git+https://github.com/DCsunset/LFReader.git#egg=lfreader_server&subdirectory=backend"
This package is available in NUR.
The output of the derivation includes both backend executable (bin/lfreader-server)
and frontend static files (in share/lfreader).
Besides, a NixOS module for backend server is provided in the Nix flake output.
Simply import the flake and import the module modules.lfreader and add the following NixOS configuration:
{
imports = [ nur-dcsunset.modules.lfreader ];
services.lfreader = {
enable = true;
host = "::";
port = 3000;
openFirewall = true;
settings = {
db_file = "/data/db.sqlite";
archiver = {
base_dir = "/data/archives";
};
log_level = "info";
};
};
}
First, clone this repo.
Then, build the frontend (bundled files are in directory frontend/dist):
cd frontend
pnpm install
pnpm build
cd ..
Next, install dependencies and run backend:
# use Nix
nix run .#backend-prod
# or manually
cd backend
pip install -r requirements.txt
uvicorn lfreader_server.app:app --host 0.0.0.0 --port 3000
Finally, use your favorite web server to serve the frontend files (frontend/dist)
and set up the reverse proxy to pass routes prefixed by /api to backend.
If archiving is enabled (default), make sure the archives directory is served at /archives.
This repo also provide a backend CLI tool lfreader_lookup to look up an archived resource file in a database.
Available config options can be found in the sidebar UI.
One important option is to enable/disable archiving. For feeds that contain many images or videos, it might be slow and expensive to archive them. You can disable archiving globally in such case.
The following environment variables are supported when running the backend:
| Variable | Description |
|---|---|
| LFREADER_CONFIG | Config file path |
The config file is in JSON format.
Please see refer to Config class in file backend/config.py for available options and default values.
Change directory to frontend.
Create a symlink public/archivesto the backend archive directory to serve resources.
Finally, run pnpm install and pnpm dev.
With Nix, run dev server directly: nix run .#backend-dev
Or install all the dependencies (you could also use venv here):
pip install -r fastapi uvicorn
uvicorn lfreader_server.app:app --reload --port 3000
To test if the backend pyproject can build successfully:
cd backend
## optionally set up vevn
# python -m venv venv
# . ./venv/bin/activate
## pip install
pip install .
Steps to migrate database from v3.0.0+ to v4.0.0+:
python scripts/migrate_v4.0.0.py <db>. This will update the database in place.Steps to migrate database from v2.0.0+ to v3.0.0+:
base_url, base_dir, and archive_options to match your old settings and put the old archive directory at the specified locationpython scripts/migrate_v3.0.0.py <old_db> <new_db> to create the new db and update the archive directoryMove original environment variables to config file.
Steps to migrate database from below v1.2.0 to v1.2.0:
python scripts/migrate_v1.2.0.py <old_db> <new_db> to migrate all previous entriesAGPL-3.0
Content type
Image
Digest
sha256:e091bcb1e…
Size
76.6 MB
Last updated
3 months ago
docker pull dcsunset/lfreader