Home

Awesome

THIS IS ONLY A MIRROR REPO!

Main repository at Codeberg: https://codeberg.org/teddit/teddit

Please submit issues and PRs on Codeberg.

teddit

teddit.net

A free and open source alternative Reddit front-end focused on privacy. Inspired by the Nitter project.

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

XMR: 832ogRwuoSs2JGYg7wJTqshidK7dErgNdfpenQ9dzMghNXQTJRby1xGbqC3gW3GAifRM9E84J91VdMZRjoSJ32nkAZnaCEj

Instances

https://teddit.net - Official instance

Community instances:

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.

VariableDescription
domainDefines URL for Teddit to use (i.e. teddit.domain.com). Defaults to 127.0.0.1
use_reddit_oauthBoolean 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_dirDefines location of certificates if using HTTPS (i.e. /home/teddit/le/live/teddit.net). No trailing slash.
themeAutomatically 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_enabledEnables the rendering of user and link flairs on Teddit. Defaults to true
highlight_controversialEnables controversial comments to be indicated by a typographical dagger (†). Defaults to true
api_enabledTeddit API feature. Might increase loads significantly on your instance. Defaults to true
video_enabledEnables video playback within Teddit. Defaults to true
redis_enabledEnables Redis caching. If disabled, does not allow for any caching of Reddit API calls. Defaults to true
redis_dbSets the redis DB name, if required
redis_hostSets the redis host location, if required. Defaults to 127.0.0.1
redis_passwordSets the redis password, if required
redis_portSets the redis port, if required. Defaults to 6379
ssl_portSets the SSL port Teddit listens on. Defaults to 8088
nonssl_portSets the non-SSL port Teddit listens on. Defaults to 8080
listen_addressSets the address Teddit listens for requests on. Defaults to 0.0.0.0
https_enabledBoolean Sets whether or not to enable HTTPS for Teddit. Defaults to false
redirect_http_to_httpsBoolean Sets whether to force redirection from HTTP to HTTPS. Defaults to false
redirect_wwwBoolean 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_compressionBoolean 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_cacheBoolean If this is set to true, view template compilation caching is enabled. Defaults to false
use_helmetBoolean Recommended to be true when using https. Defaults to false
use_helmet_hstsBoolean Recommended to be true when using https. Defaults to false
trust_proxyBoolean Enable trust_proxy if you are using a reverse proxy like nginx or traefik. Defaults to false
trust_proxy_addressLocation of trust_proxy. Defaults to 127.0.0.1
nsfw_enabledBoolean 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
post_comments_sortDefines default sort preference. Options are confidence (default sorting option in Reddit), top, new, controversal, old, random, qa, live. Defaults to confidence
reddit_app_idIf "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

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.

    It's 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.