selfhostable, read-only reddit client
1### lurker
2
3lurker is a selfhostable, read-only reddit client. it is
4better than old-reddit because:
5
6- it renders well on mobile
7- it respects `prefers-color-scheme`
8- no account necessary to subscribe to subreddits
9- no account necessary for over-18 content
10
11i host a version for myself and a few friends. reach out to
12me if you would like an invite.
13
14### features
15
16- minimal use of client-side javascript
17- account-based subscription system
18- pagination
19- invite-only user management
20- comment collapsing, jump-to-next/prev comment
21- "search on undelete" url for deleted comments
22- over-18, spoiler images are hidden by default
23
24i use lurker daily, and above features are pretty good for
25my use. i do not intend to add much more, i don't like
26writing js.
27
28### gallery
29
30|  |  |  |
31| ------------------------- | -------------------------------- | --------------------------------- |
32| login | search | subreddit view |
33
34|  |  |  |
35| ------------------------- | -------------------------------- | --------------------------------- |
36| subscriptions page | inline post thumbnail expand | comments view |
37
38|  |  |  |  |
39| ------------------------------- | -------------------------------- | -------------------------- | --------------------------- |
40| collapse comments | admin dashboard & invites table | light mode | mobile optimized page |
41
42### setup
43
44you can run lurker as a systemd service on nixos:
45
46```nix
47inputs.lurker.url= "git+https://git.peppe.rs/web/lurker";
48 .
49 .
50 .
51services.lurker = {
52 enable = true;
53 port = 9495;
54};
55```
56
57or with the docker image:
58
59```bash
60# pull the latest image from gh container registry
61$ docker pull ghcr.io/oppiliappan/lurker:latest
62
63REPOSITORY TAG IMAGE ID CREATED SIZE
64ghcr.io/oppiliappan/lurker latest ba3733164889 ??? 227MB
65
66# start lurker in a container
67#
68# lurker stores data in /data,
69# so create a volume on the host accordingly:
70$ docker run -v /your/host/lurker-data:/data -p 3000 ghcr.io/oppiliappan/lurker:latest
71```
72
73or with docker compose:
74
75```yaml
76version: '3'
77services:
78 lurker:
79 image: ghcr.io/oppiliappan/lurker:latest
80 container_name: lurker
81 volumes:
82 - /your/host/lurker-data:/data
83 ports:
84 - "3000:3000"
85```
86
87or with just [bun](https://bun.sh/):
88
89```bash
90bun run src/index.js
91```
92
93### usage
94
95the instance is open to registrations when first started.
96you can head to /register and create an account. this
97account will be an admin account. you can click on your
98username at the top-right to view the dashboard and to
99invite other users to your instance. copy the link and send
100it to your friends!
101
102### environment variables
103
104- `LURKER_PORT`: port to listen on, defaults to `3000`.
105- `LURKER_THEME`: name of CSS theme file. The file must be present in `src/public`.
106
107### technical
108
109lurker uses an sqlite db to store accounts, invites and
110subscriptions. it creates `lurker.db` in the current
111directory. there is no way to configure this right now.
112
113to hack on lurker:
114
115```bash
116nix shell .# # get a devshell
117nix build .#lurker # build the thing
118```
119
120### todo
121
122- [ ] avoid js to toggle details in views/index.pug
123- [ ] highlights for op, sticky etc.
124- [ ] open in reddit/reply in reddit link
125- [ ] subscription manager: reorder, mass add
126- [ ] support crossposts
127- [x] collapse even singular comments
128- [x] details tag on safari
129- [x] expand/collapse comments
130- [x] fix gallery thumbnails
131- [x] fix spacing between comments
132- [x] fix title rendering in views/comments.pug
133- [x] pass query params into templates, add into pagination
134- [x] placeholder for unresolvable thumbnails
135- [x] set home to sum of subs
136- [x] styles for info-containers
137- [x] support 'more comments'