10 Home
teddit edited this page 11 months ago

teddit wiki


nothing here yet...

Teddit API

You can get JSON or RSS feed for subreddits and users by adding query parameters to the URL. For example:

You can get full size post images in the subreddit RSS feeds with a query parameter full_thumbs. For example:

In case you want the same JSON response what you get from the official Reddit API, you can get it from teddit API by adding query string &target=reddit. For example:

By adding raw_json=1 query parameter you can get raw JSON response (disables the encoding of <, >, and &). For example:

By adding mode=light query parameter the selftext_html key will be emptied, making the JSON/RSS significantly smaller.



After successfully setuping your instance, it's a good idea to add maxmemory and maxmemory-policy configs to your redis.conf. For example:

Edit redis.conf file and set maxmemory value suitable for your server (e.g. 75% of your total RAM):

# nano /etc/redis/redis.conf

Add this to the end of the file:

maxmemory 2gb

Also add maxmemory-policy:

maxmemory-policy allkeys-lru

Save and exit.

Restart redis:

# systemctl restart redis


nothing here yet...

Disk usage

Note that teddit doesn't remove any cached media files (images & videos) from the server. For time being you have to manually delete files if you are running low disk space.

OAuth vs non-OAuth

In the config file config.js you can set the use_reddit_oauth key to true or false. If the key is set to true, teddit will use Reddit's API with OAuth (Reddit APP id reddit_app_id is needed in the config file). If it's set to false, teddit will use Reddit's API without OAuth (no Reddit APP id needed). Note: If you don't use Reddit OAuth, you might experience unexpected errors (rate limiting). The key is set to false by default.