Skip to content

oppiliappan/lurker

Repository files navigation

lurker

lurker is a selfhostable, read-only reddit client. it is better than old-reddit because:

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

i host a version for myself and a few friends. reach out to me if you would like an invite.

features

  • minimal use of client-side javascript
  • account-based subscription system
  • pagination
  • invite-only user management
  • comment collapsing, jump-to-next/prev comment
  • "search on undelete" url for deleted comments
  • over-18, spoiler images are hidden by default

i use lurker daily, and above features are pretty good for my use. i do not intend to add much more, i don't like writing js.

gallery

login search subreddit
login search subreddit view
subs gallery comments
subscriptions page inline post thumbnail expand comments view
collapse invite light mobile
collapse comments admin dashboard & invites table light mode mobile optimized page

setup

you can run lurker as a systemd service on nixos:

inputs.lurker.url= "git+https://git.peppe.rs/web/lurker";
  .
  .
  .
services.lurker = {
  enable = true;
  port = 9495;
};

or with the docker image:

# pull the latest image from gh container registry
$ docker pull ghcr.io/oppiliappan/lurker:latest

REPOSITORY                   TAG       IMAGE ID       CREATED        SIZE
ghcr.io/oppiliappan/lurker   latest    ba3733164889   ???            227MB

# start lurker in a container
#
# lurker stores data in /data,
# so create a volume on the host accordingly:
$ docker run -v /your/host/lurker-data:/data -p 3000 ghcr.io/oppiliappan/lurker:latest

or with docker compose:

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

or with just bun:

bun run src/index.js 

usage

the instance is open to registrations when first started. you can head to /register and create an account. this account will be an admin account. you can click on your username at the top-right to view the dashboard and to invite other users to your instance. copy the link and send it to your friends!

technical

lurker uses an sqlite db to store accounts, invites and subscriptions. it creates lurker.db in the current directory. there is no way to configure this right now.

to hack on lurker:

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

todo

  • avoid js to toggle details in views/index.pug
  • highlights for op, sticky etc.
  • open in reddit/reply in reddit link
  • subscription manager: reorder, mass add
  • support crossposts
  • collapse even singular comments
  • details tag on safari
  • expand/collapse comments
  • fix gallery thumbnails
  • fix spacing between comments
  • fix title rendering in views/comments.pug
  • pass query params into templates, add into pagination
  • placeholder for unresolvable thumbnails
  • set home to sum of subs
  • styles for info-containers
  • support 'more comments'