Teddit is a privacy-respecting frontend alternative to Reddit. Unlike the regular website, it creates an interface without JavaScript and does not track and log every link and page you visit. Here we show you how to install Teddit on your Linux server.
Installing Teddit
This tutorial shows you how to install Teddit on Ubuntu. We are using the domain “yetanotherteddit.xyz,” though you can use your own domain name or the localhost.
- Open a terminal and run the following command to install all the necessary tools and programs for Teddit:
sudo apt install nodejs redis-server ffmpeg git iptables-persistent nginx npm certbot python3-certbot-nginx
- Copy the Teddit repository from the developer’s Codeberg page by running the following command:
git clone https://codeberg.org/teddit/teddit cd teddit
- Use the npm utility to install the program’s binaries to your system:
npm install --no-optional
- Copy the configuration template to the root directory of your Teddit repository:
cp config.js.template config.js
- Run the following command to test whether the Teddit binary is running properly in your system:
npm start
Setting Up the Web Server
With Teddit installed, you need to set up the web server so that it can be accessed from the browser. This section focuses on securing your server using Nginx.
- Make sure your firewall is only accepting incoming connections on ports 22, 80 and 443:
sudo iptables -I INPUT -m state --state NEW -p tcp --dport 22 -j ACCEPT sudo iptables -I INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT sudo iptables -I INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT sudo netfilter-persistent save
- Create the Nginx configuration file for your Teddit server:
sudo nano /etc/nginx/sites-available/teddit
- Insert a new
server{}
block inside the “teddit” configuration file. For example, the following should create a simple reverse proxy out of the box:
server { listen 80; listen [::]:80; root /var/www/html; server_name yetanotherteddit.xyz www.yetanotherteddit.xyz; location / { proxy_pass http://127.0.0.1:8080; } }
- Enable the new configuration.
sudo ln -s /etc/nginx/sites-available/teddit /etc/nginx/sites-enabled/
- Restart the Nginx daemon to reload all of your new settings.
sudo systemctl reload nginx
With Nginx properly running, you can also easily enable SSL for your webserver. Doing this will ensure that every incoming connection to your Teddit instance is secure:
certbot --nginx yetanotherteddit.xyz
You should now be able to access your Teddit installation on your domain name.
Tip: Reddiquette: learn what you should/shouldn’t do in Reddit.
Creating a Reddit API Key for Teddit
You need a Reddit API key for your Teddit instance to access Reddit’s servers.
- Log in to your Reddit account and open the Application Preferences page.
- Click the “Create an App…” button on the page’s upper-left corner.
- Provide the name for the API key that you want to make.
- Select the “Application Type” for your API key by clicking the “installed app” radio button.
- Write the current URL of your instance in the “about url” box. You also need to write “http://localhost:8080” in the “redirect url” box.
- Click the “create app” button to generate the API key for your instance.
- The web page will display a small box where all the details of your new API key will be printed. Copy the string underneath the name of your new app.
- Back to your server, open the Teddit’s “config.js” file and find the “reddit_app_id” value.
- Paste and replace the current value of this variable with your Reddit’s API key.
Tip: Teddit can’t download Reddit’s videos for you. Find out how to do it here.
Frequently Asked Questions
Is it possible to log in to my Reddit account in Teddit?
No. Teddit is a view-only version of Reddit, so you can’t log in to Reddit here. Similar to Reddit’s “no participation” mode, you cannot comment and upvote any posts in Teddit either.
I cannot see beyond the first page of a subreddit.
This issue is most likely due to a missing Reddit API key. To fix this, you need to double-check that you have properly copied the App ID value from Reddit to your config.js file.
You can also temporarily fix this by disabling the API support in Teddit. You can do this by changing the “use_reddit_oauth” value to false
.
Is it possible to automate the Teddit startup process?
You can easily automate the Teddit startup process by using pm2. This is a process manager for NodeJS applications that is simple to install and use.
To use this with Teddit, you need to run the following command: npm install pm2 -g && pm2 start app.js
.
Image credit: Unsplash. All alterations and screenshots by Ramces Red.
Our latest tutorials delivered straight to your inbox