teddit-reddit-frontend-alte.../README.md

230 lines
13 KiB
Markdown
Raw Normal View History

2020-11-17 21:44:32 +01:00
# teddit
## teddit is no more actively maintained!
[Due to Reddit's API changes](https://en.wikipedia.org/wiki/2023_Reddit_API_controversy), this project is no more actively maintained.
Feel free to fork the project if you like, or contribute to other alternative Reddit front-ends, such as Libreddit, which are trying to come up with circumventions.
This project is still maintained, but just not actively. You can create PRs, but don't expect them to be merged right away.
---
2020-11-17 22:02:20 +01:00
[teddit.net](https://teddit.net)
2020-11-17 21:44:32 +01:00
A free and open source alternative Reddit front-end focused on privacy.
Inspired by the [Nitter](https://github.com/zedeus/nitter) project.
* No JavaScript or ads
* All requests go through the backend, client never talks to Reddit
* Prevents Reddit from tracking your IP or JavaScript fingerprint
2021-01-06 16:23:49 +01:00
* [Unofficial API](https://codeberg.org/teddit/teddit/wiki#teddit-api) (RSS & JSON support, no rate limits or Reddit account required)
2020-11-17 21:44:32 +01:00
* Lightweight (teddit frontpage: ~30 HTTP requests with ~270 KB of data downloaded vs. Reddit frontpage: ~190 requests with ~24 MB)
* Self-hostable. Anyone can setup an instance. An instance can either use Reddit's API with or without OAuth (so Reddit API key is not necessarily needed).
2020-11-17 21:44:32 +01:00
2020-11-29 13:03:06 +01:00
Join the teddit discussion room on Matrix: [#teddit:matrix.org](https://matrix.to/#/#teddit:matrix.org)
2020-11-19 06:55:25 +01:00
2020-11-17 21:44:32 +01:00
XMR: 832ogRwuoSs2JGYg7wJTqshidK7dErgNdfpenQ9dzMghNXQTJRby1xGbqC3gW3GAifRM9E84J91VdMZRjoSJ32nkAZnaCEj
2020-11-17 21:57:40 +01:00
2020-12-01 16:16:30 +01:00
## Instances
[https://teddit.net](https://teddit.net) - Official instance
Community instances:
| Instance | Onion Link | I2P | Notes |
|-|-|-|-|
| [teddit.ggc-project.de](https://teddit.ggc-project.de) | | | |
| [teddit.zaggy.nl](https://teddit.zaggy.nl) | | | |
| [teddit.tinfoil-hat.net](https://teddit.tinfoil-hat.net) | | | |
| [teddit.domain.glass](https://teddit.domain.glass) | | | |
| [snoo.ioens.is](https://snoo.ioens.is) | [snoo.ioensistjs7wd746...onion](http://snoo.ioensistjs7wd746zluwixvojbbkxhr37lepdvwtdfeav673o64iflqd.onion/) | | |
| [teddit.httpjames.space](https://teddit.httpjames.space) | | | |
2023-05-01 01:10:22 +02:00
| [teddit.xbdm.fun](https://teddit.xbdm.fun) | | | |
| | [ibarajztopxnuhabfu7f...onion](http://ibarajztopxnuhabfu7fg6gbudynxofbnmvis3ltj6lfx47b6fhrd5qd.onion) | [xugoqcf2pftm76vbznx4...i2p](http://xugoqcf2pftm76vbznx4xuhrzyb5b6zwpizpnw2hysexjdn5l2tq.b32.i2p) | Operated by [mdleom.com](https://mdleom.com/about/#Services) |
2022-10-03 19:42:05 +02:00
| [incogsnoo.com](https://incogsnoo.com) | [tedditfyn6idalzso5wam....onion](http://tedditfyn6idalzso5wam5qd3kdtxoljjhbrbbx34q2xkcisvshuytad.onion/) | [http://teddit.i2p](http://teddit.i2p) | |
| [teddit.pussthecat.org](https://teddit.pussthecat.org) | | | Operated by [PussTheCat.org](https://pussthecat.org/) |
2022-10-03 19:42:05 +02:00
| [reddit.lol](https://reddit.lol) | [http://dawtyi5e2cfyfmoht...onion](http://dawtyi5e2cfyfmoht4izmczi42aa2zwh6wi34zwvc6rzf2acpxhrcrad.onion) | [http://vzeiwzi7ogwl3i...b32.i2p](http://vzeiwzi7ogwl3ijrfek4fbtwhvamxcpyqoc3s4vcgnhlp54s5clq.b32.i2p) | Operated by https://liberta.casa | |
| [teddit.sethforprivacy.com](https://teddit.sethforprivacy.com/) | [qtpvyiaqhmwccx...onion/](http://qtpvyiaqhmwccxwzsqubd23xhmmrt75tdyw35kp43w4hvamsgl3x27ad.onion/) | | For more similar hosted tools, see [blog.sethforprivacy.com](https://blog.sethforprivacy.com/about/#my-community-resources) |
2021-12-18 14:28:26 +01:00
| [teddit.adminforge.de](https://teddit.adminforge.de) | | | Operated by https://adminforge.de |
2022-01-18 19:52:08 +01:00
| [teddit.bus-hit.me](https://teddit.bus-hit.me) | | | Operated by https://bus-hit.me |
| [teddit.froth.zone](https://teddit.froth.zone) | | | |
2022-03-30 19:56:40 +02:00
| [rdt.trom.tf](https://rdt.trom.tf) | | | Part of the https://trom.tf project |
| [teddit.encrypted-data.xyz](https://teddit.encrypted-data.xyz) | | | |
| [i.opnxng.com](https://i.opnxng.com) | | | |
| [teddit.tokhmi.xyz](https://teddit.tokhmi.xyz) | | | |
| [teddit.garudalinux.org](https://teddit.garudalinux.org) | | | Managed by https://garudalinux.org |
| [teddit.privacytools.io](https://teddit.privacytools.io) | [jnuonmf2n36sfdmyksqq....onion](http://jnuonmf2n36sfdmyksqqqyab3w63cq4kx24olyjleh5z6zzfvyt7uqqd.onion) | | Part of [PrivacyTools.io](https://www.privacytools.io/) and hosted by [Privex](https://www.privex.io/) |
| [td.vern.cc](https://td.vern.cc) | [td.vernccvbvyi5qhfzyqen...onion](http://td.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion) | [td.vern.i2p](http://verncco2oaxjikammz4pi7umzp673cme6zuemx7yeeewspwrw3va.b32.i2p) | Operated by https://vern.cc |
| [teddit.rawbit.ninja](https://teddit.rawbit.ninja) | [yqu4yj5lju7bmlwpzpml...onion](http://yqu4yj5lju7bmlwpzpmltb5gsu6cw7nnbcxxx4iqemwa56nxjiggf4qd.onion) | | Operated by https://rawbit.ninja |
2022-10-23 20:31:41 +02:00
| [teddit.hostux.net](https://teddit.hostux.net) | | | Operated by https://hostux.net |
2023-04-27 15:43:32 +02:00
| [teddit.no-logs.com](https://teddit.no-logs.com/) | | | Operated by https://no-logs.com |
| [teddit.projectsegfau.lt](https://teddit.projectsegfau.lt) | [teddit.pjsfkvpxlinjamta...onion](http://teddit.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion) | | Maintained by Project Segfault Team (https://projectsegfau.lt/team) |
2023-08-17 15:20:39 +02:00
| [teddit.laserdisc.tokyo](https://teddit.laserdisc.tokyo) | | | |
2023-09-07 04:46:31 +02:00
| [t.sneed.network](https://t.sneed.network) | [t.sneed4fmhevap3ci4x...onion](http://t.sneed4fmhevap3ci4xhf4wgkf72lwk275lcgomnfgwniwmqvaxyluuid.onion/) | | Operated by [sneed.network](https://sneed.network) |
2023-09-08 10:09:51 +02:00
| | [teddit.skunky7dhv7no...onion](http://teddit.skunky7dhv7nohsoalpwe3sxfz3fbkad7r3wk632riye25vqm3meqead.onion/) | | Self-hosted, works only from 7-11 AM Moscow time to 10-12 PM, in Donetsk |
2021-08-29 20:49:36 +02:00
<!--
2021-08-29 20:47:40 +02:00
Remove the Changelog section, because the CHANGELOG.md is not updated anymore
2021-01-19 18:51:11 +01:00
## Changelog
2021-01-19 18:51:11 +01:00
See ```CHANGELOG.md```
2021-08-29 20:47:40 +02:00
-->
2020-11-17 21:44:32 +01:00
## Installation
2020-11-17 21:57:40 +01:00
### Docker-compose method (production)
```docker
version: "3.8"
services:
teddit:
container_name: teddit
image: teddit/teddit:latest
environment:
- DOMAIN=teddit.net
- USE_HELMET=true
- USE_HELMET_HSTS=true
- TRUST_PROXY=true
- REDIS_HOST=teddit-redis
ports:
- "127.0.0.1:8080:8080"
networks:
- teddit_net
healthcheck:
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:8080/about"]
interval: 1m
timeout: 3s
depends_on:
- teddit-redis
teddit-redis:
container_name: teddit-redis
image: redis:6.2.5-alpine
command: redis-server
environment:
- REDIS_REPLICATION_MODE=master
networks:
- teddit_net
networks:
teddit_net:
```
Note: This compose is made for a true "production" setup, and is made to be used to have teddit behind a reverse proxy, if you don't want that and prefer to directly access teddit via its port:
- Change `ports: - "127.0.0.1:8080:8080"` to `ports: - "8080:8080"`
- Remove `DOMAIN=teddit.net`, `USE_HELMET=true`, `USE_HELMET_HSTS=true`, `TRUST_PROXY=true`
### Docker-compose method (development)
```bash
git clone https://codeberg.org/teddit/teddit
cd teddit
docker-compose build
docker-compose up
```
2020-12-10 23:18:18 +01:00
Teddit should now be running at <http://localhost:8080>.
2021-04-08 15:35:33 +02:00
Docker image is available at [https://hub.docker.com/r/teddit/teddit](https://hub.docker.com/r/teddit/teddit).
#### Environment Variables
The following variables may be set to customize your deployment at runtime.
2021-04-08 16:14:52 +02:00
| Variable | Description |
|-|-|
| domain | Defines URL for Teddit to use (i.e. teddit.domain.com). Defaults to **127.0.0.1** |
| use_reddit_oauth | *Boolean* If true, "reddit_app_id" must be set with your own Reddit app ID. If false, Teddit uses Reddit's public API. Defaults to **false** |
| cert_dir | Defines location of certificates if using HTTPS (i.e. /home/teddit/le/live/teddit.net). No trailing slash. |
| theme | Automatically theme the user's browser experience. Options are *auto*, *dark*, *sepia*, or you can set *white* by setting the variable to empty ( '' ). Defaults to **auto** |
| flairs_enabled | Enables the rendering of user and link flairs on Teddit. Defaults to **true** |
| highlight_controversial | Enables controversial comments to be indicated by a typographical dagger (†). Defaults to **true** |
| api_enabled | Teddit API feature. Might increase loads significantly on your instance. Defaults to **true** |
| api_force_https | Force HTTPS to Teddit API permalinks (see #285). Defaults to **false** |
2021-04-08 16:14:52 +02:00
| video_enabled | Enables video playback within Teddit. Defaults to **true** |
| redis_enabled | Enables Redis caching. If disabled, does not allow for any caching of Reddit API calls. Defaults to **true** |
| redis_db | Sets the redis DB name, if required |
| redis_host | Sets the redis host location, if required. Defaults to **127.0.0.1** |
| redis_password | Sets the redis password, if required |
| redis_port | Sets the redis port, if required. Defaults to **6379** |
| ssl_port | Sets the SSL port Teddit listens on. Defaults to **8088** |
| nonssl_port | Sets the non-SSL port Teddit listens on. Defaults to **8080** |
| listen_address | Sets the address Teddit listens for requests on. Defaults to **0.0.0.0** |
| https_enabled | *Boolean* Sets whether or not to enable HTTPS for Teddit. Defaults to **false** |
| redirect_http_to_https | *Boolean* Sets whether to force redirection from HTTP to HTTPS. Defaults to **false** |
2021-04-09 22:29:20 +02:00
| redirect_www | *Boolean* Redirects from www to non-www URL. For example, if true, Teddit will redirect https://www.teddit.com to https://teddit.com. Defaults to **false** |
| use_compression | *Boolean* If set to true, Teddit will use the [https://github.com/expressjs/compression](Node.js compression middleware) to compress HTTP requests with deflate/gzip. Defaults to **true** |
| use_view_cache | *Boolean* If this is set to true, view template compilation caching is enabled. Defaults to **false** |
2021-04-08 16:14:52 +02:00
| use_helmet | *Boolean* Recommended to be true when using https. Defaults to **false** |
| use_helmet_hsts | *Boolean* Recommended to be true when using https. Defaults to **false** |
| trust_proxy | *Boolean* Enable trust_proxy if you are using a reverse proxy like nginx or traefik. Defaults to **false** |
| trust_proxy_address | Location of trust_proxy. Defaults to **127.0.0.1** |
2021-08-16 20:53:42 +02:00
| http_proxy | Set http/https proxy to use for outgoing requests. See [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) for details |
2021-04-08 16:14:52 +02:00
| nsfw_enabled | *Boolean* Enable NSFW (over 18) content. If false, a warning is shown to the user before opening any NSFW post. When the NFSW content is disabled, NSFW posts are hidden from subreddits and from user page feeds. Note: Users can set this to true or false from their preferences. Defaults to **true** |
2021-08-29 20:39:13 +02:00
| videos_muted | *Boolean* Automatically mute all videos in posts. Defaults to **true** |
2021-04-08 16:14:52 +02:00
| post_comments_sort | Defines default sort preference. Options are *confidence* (default sorting option in Reddit), *top*, *new*, *controversal*, *old*, *random*, *qa*, *live*. Defaults to **confidence** |
| reddit_app_id | If "use_reddit_oauth" config key is set to true, you have to obtain your Reddit app ID. For testing purposes it's okay to use this project's default app ID. Create your Reddit app here: https://old.reddit.com/prefs/apps/. Make sure to create an "installed app" type of app. Default is **ABfYqdDc9qPh1w** |
2021-08-29 20:39:13 +02:00
| domain_replacements | Replacements for domains in outgoing links. Tuples with regular expressions to match, and replacement values. This is in addition to user-level configuration of privacyDomains. Defaults to **[]** |
| cache_control | *Boolean* If true, teddit will automatically remove all cached static files. Defaults to **true** |
| cache_control_interval | How often the cache directory for static files is emptied (in hours). Default is every 24 hours. Requires cache_control to be true. Defaults to **24** |
| suggested_subreddits | Array of suggested subreddits, which are displayed in the top bar (if the user doesn't have any subscriptions) and in the cleaned home page. Defaults to Reddit's default suggested subreddits. |
2021-03-28 16:58:05 +02:00
### Manual
1. Install [Node.js](https://nodejs.org).
2020-12-10 23:18:18 +01:00
1. (Optional) Install [redis-server](https://redis.io).
2023-05-05 15:59:44 +02:00
Highly recommended it works as a cache for Reddit API calls.
2020-12-10 23:18:18 +01:00
1. (Optional) Install [ffmpeg](https://ffmpeg.org).
It's needed if you want to support videos.
```bash
# Linux
apt install redis-server ffmpeg
# macOS
brew install redis
```
1. Clone and set up the repository.
2020-11-17 21:57:40 +01:00
```bash
git clone https://codeberg.org/teddit/teddit
cd teddit
npm install --no-optional
cp config.js.template config.js # edit the file to suit your environment
redis-server
npm start
```
2020-12-03 18:29:03 +01:00
Teddit should now be running at <http://localhost:8080>.
2022-10-14 22:28:48 +02:00
You can also run teddit from a process manager like [pm2](https://www.npmjs.com/package/pm2):
```
## To run:
npm install pm2 -g
pm2 start app.js --name teddit
## To run on startup:
pm2 startup
pm2 save ## if using systemd, see below.
## To restart or stop
pm2 restart teddit
pm2 stop teddit
```
See also the [pm2 instructions for running a project on startup](https://pm2.keymetrics.io/docs/usage/startup/). In particular, if using systemd, see the section on how to modify the systemd init file so that it runs after your system connects to the network.
2023-02-26 14:26:01 +01:00
## Legal
2023-03-08 15:13:09 +01:00
Teddit does not host any content. All content shown on any Teddit instances is from Reddit™. Reddit is a trademark of Reddit Inc. Teddit is not affiliated with Reddit Inc. Any issues with content shown on any Teddit instances need to be reported to Reddit, not the instance host's internet provider or domain provider.