Skip to content

PortableProgrammer/lurker

 
 

Repository files navigation

lurker

lurker is a selfhostable, read-only Reddit client, forked from oppiliappan/lurker

It is better than old-reddit because:

  • it renders well on mobile
  • it respects prefers-color-scheme
  • no reddit account necessary to subscribe to subreddits
  • no reddit account necessary for over-18 content

Features

  • minimal use of client-side javascript
  • card and compact views
  • pagination
  • allows automatic collapsing of u/AutoModerator comments
  • optional reduction of duplicate posts during a session
  • multireddit support
  • crosspost support
  • extensible support for popular 3rd-party media (imgur images and galleries, xkcd, etc.)
  • automatic media link expansion
  • account-based subscription system
  • invite-only user management
  • comment collapsing, jump-to-next/prev comment
  • "search on undelete" url for deleted comments
  • over-18, spoiler content hidden by default

Gallery

lurker card view, dark theme lurker card view, light theme
Card view, dark theme Card view, light theme
lurker compact view, dark theme lurker compact view, expanded media, dark theme
Compact view, dark theme Compact view, expanded media, dark theme
lurker comments view, dark theme lurker subscriptions view, dark theme
Comments view, dark theme Subscriptions view,dark theme
lurker card view, mobile, dark theme lurker compact view, mobile, dark theme
Card view, mobile, dark theme Compact view, mobile, dark theme

Setup

Docker Desktop

Tip

lurker stores data in /data, so create a volume mount on the host accordingly

# Pull (if necessary) and start lurker in a detached container
docker run --detach --volume /your/host/lurker-data:/data --publish 3000 ghcr.io/portableprogrammer/lurker:latest

Docker Compose

Tip

lurker stores data in /data, so create a volume mount on the host accordingly

version: '3'
services:
  lurker:
    image: ghcr.io/portableprogrammer/lurker:latest
    container_name: lurker
    volumes:
      - /your/host/lurker-data:/data
    ports:
      - "3000:3000"

Bun

Start lurker with just bun

bun run /path/to/lurker/src/index.js

NixOS

Run lurker as a systemd service on NixOS

inputs.lurker.url= "git+https://github.com/portableprogrammer/lurker";
  .
  .
  .
services.lurker = {
  enable = true;
  port = 9495;
};

Usage

Caution

Upon first run, lurker initializes its database and then is open to registration without authentication. Ensure you have appropriate controls in place to restrict access until the first admin account is created.

lurker is open to registrations when first started. Navigate to /register and create an account, which will be an admin account. Click on Snoo at the top-right to view the dashboard, change your preferences, and to invite other users to your instance.

Technical

lurker uses an SQLite database to store accounts, invites, preferences, subscriptions, etc. It creates lurker.db in the local (or, in the case of containers, /data) directory. There is no way to configure this right now.

Development

VS Code

Use the included devcontainer in VS Code or any other IDE that supports it.

Tip

When using devcontainers, you may want to forward the lurker devcontainer port externally (e.g. to use a mobile device to test); you can easily do so with another Docker container.

# In a separate shell

# Get the running containers
$ docker ps
CONTAINER ID   IMAGE             COMMAND                  CREATED       STATUS        PORTS     NAMES
eda5e926106f   vsc-lurker-xxxx   "/bin/sh -c 'echo Co…"   3 weeks ago   Up 13 hours             stupefied_dirac

# Get the IP address of the vsc-lurker-xxxx container
$ docker inspect stupefied_dirac | jq '.[0].NetworkSettings.IPAddress'
"172.17.0.2"

# Start an attached socat proxy container to forward the traffic
$ docker run --rm -p 8080:1234 verb/socat TCP-LISTEN:1234,fork TCP-CONNECT:172.17.0.2:3000

You can now browse your lurker devcontainer instance remotely via http://<host_ip>:8080/. When finished, kill the attached container using Ctrl-C to stop port-forwarding.

Nix

nix shell .#        # get a devshell
nix build .#lurker  # build the thing

3rd-party Assets

Reddit brand assets and elements are utilized in compliance with the Reddit Brand foundation (v2.09 at the time of last review).

lurker utilizes the Inter typeface by Rasmus Andersson

About

selfhostable, read-only reddit client

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • JavaScript 49.6%
  • Pug 33.6%
  • CSS 13.4%
  • Nix 3.3%
  • Dockerfile 0.1%