Go to file
2021-04-08 09:35:33 -04:00
.github Merge pull request #3 from sethsimmons/main [PR FROM GITHUB] 2021-03-26 20:55:24 +01:00
inc remove redundant code from prev commit 2021-04-05 18:03:40 +02:00
static improve reddit error messages 2021-03-28 16:35:45 +02:00
views fix upvote ratio percentage rounding #181 2021-04-02 21:12:04 +02:00
.dockerignore Added support for Docker, Docker-Compose 2020-12-07 12:57:20 -07:00
.gitignore simplify installation 2020-12-03 18:12:04 +01:00
app.js Add config REDIS_DB, REDIS_PASSWORD 2021-04-05 19:11:11 +09:00
CHANGELOG.md Update 'CHANGELOG.md' 2021-03-26 03:18:26 +01:00
config.js.template Add configuration for domain_replacements 2021-04-06 00:12:31 +09:00
docker-compose.yml Add healthcheck to docker-compose.yml 2021-03-12 18:06:34 +01:00
Dockerfile Update docker nodejs to latest LTS 2021-04-05 19:09:48 +09:00
LICENSE add AGPL 3.0 license 2020-12-01 16:11:22 +01:00
package-lock.json fix Pug security vulns. see more PR #165 2021-03-19 19:56:43 +01:00
package.json up version 2021-03-21 21:23:21 +01:00
README.md Partial update to README 2021-04-08 09:35:33 -04:00
routes.js move the preferences middleware to routes.js, away from the app.js - no need to have the middlware on every single request 2021-04-02 15:04:57 +02:00

teddit

teddit.net

A free and open source alternative Reddit front-end focused on privacy. Inspired by the 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
  • Unofficial API (RSS & JSON support, no rate limits or Reddit account required)
  • 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 Reddits API with or without OAuth (so Reddit API key is not necessarily needed).

Join the teddit discussion room on Matrix: #teddit:matrix.org

XMR: 832ogRwuoSs2JGYg7wJTqshidK7dErgNdfpenQ9dzMghNXQTJRby1xGbqC3gW3GAifRM9E84J91VdMZRjoSJ32nkAZnaCEj

Instances

https://teddit.net - Official instance

Community instances:

TODO

  • User trophies
  • “other discussions” feature
  • “Open on reddit” links
  • … and lot of other small stuff

Roadmap

  • HLS video streaming? (Would require browser JavaScript)
  • User login, so people can use their Reddit account through teddit to comment and up/downvote posts etc. ## Changelog

See CHANGELOG.md ## Installation

Docker-compose method

wget https://codeberg.org/teddit/teddit/raw/branch/main/docker-compose.yml
docker-compose build
docker-compose up

Teddit should now be running at http://localhost:8080.

Docker image is available at https://hub.docker.com/r/teddit/teddit.

Environment Variables

The following variables may be set to customize your deployment at runtime.

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 Reddits 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 users 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
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
redirect_www
use_compression
use_view_cache
use_helmet
use_helmet_hsts
trust_proxy
trust_proxy_address
nsfw_enabled
post_comments_sort
reddit_app_id

Manual

  1. Install Node.js.

  2. (Optional) Install redis-server.

    Highly recommended  it works as a cache for Reddit API calls.

  3. (Optional) Install ffmpeg.

    Its needed if you want to support videos.

    # Linux
    apt install redis-server ffmpeg
    
    # macOS
    brew install redis
  4. Clone and set up the repository.

    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

Teddit should now be running at http://localhost:8080.