Install Libreddit on Heroku

Libreddit is an open-source web frontend for Reddit written in Rust using the Reddit’s JSON API to create a privacy-friendly interface for navigating Reddit.

Libreddit is an open-source web frontend for Reddit website written in Rust. The application uses the Reddit’s JSON API to create a privacy-friendly Reddit mirror. Libreddit grabs Reddit’s content (comments,images, and videos) but without the user interaction capabilities. You won’t be able to comment, vote or gift. But If you are someone who likes to lurk, this will add a privacy layer to your binge-redditing. As the server acts as a bridge between you and Reddit, it cannot track your location or browsing habits.

Libreddit Web Interface

Libreddit is fast, much faster than the Reddit’s own website. In part, because it doesn’t use any JavaScript — none — that’s not something you expect these days. It’s just bare-metal HTML/CSS with one of the popular programming language around. You lose a bit of interactivity without JavaScript, but the snappiness will almost feel like a native app on your browser (in my opinion anyway).

Let’s get right to installation. If you want to read more about Libreddit, you can visit their GitHub project page.

Requirements (All Free):

  1. Git Installed
  2. Heroku CLI Installed
  3. Heroku Account
  1. Clone the Libreddit git repository on your local machine. Don’t worry — you don’t have to install Rust or build the application on your local machine. We just need to configure the environment, so it builds successfully on Heroku.

    git clone
  2. You’ll need a Heroku account and an app ( created. You can do this from the Heroku dashboard. Heroku’s accounts are free and their free tier is enough for tinkering. One limitation to free or unverified (accounts without linked credit card) accounts is that you cannot link a custom domain with your app.

2) a. You’ll also need Heroku command line application installed on your system. It helps you connect to your Heroku account, manage git, monitor logs, and push your application to the server. Once you’ve set up an app on Heroku, login to your account.

  1. As Libreddit is built on Rust, we need to add the rust runtime to our Heroku build setup. You do this by running this command on your terminal.

    heroku buildpacks:set emk/rust

  2. For Rust web-based applications on Heroku, they require a PORT environment variable to run. Hence, we set up the PORT environment variable to 8080 in app setting section on Heroku dashboard. Libreddit application can access this value with $PORT variable.
  3. Last step is to tell Heroku how to run the application after a build succeeds on the server. Libreddit has default configuration to run on 8080 but with Heroku’s port environment variable requirement we need some additional arguments. So we use the $PORT environment variable we used in Step 4.

    web: ./target/release/libreddit -p $PORT -H 63115200

The -H argument tells libreddit to run with HSTS configuration.

  1. The final step is to push the application to Heroku. Commit all the changes you’ve made to your application. Then push it to your app on Heroku.

After the compilation is complete, you will have Libreddit working on your Heroku subdomain. Now, you can enjoy Reddit without Reddit tracking you. Here’s the instance we created:

These are the settings you can set on your Libreddit instance:

Use HLS for videos to stream video and audio at the same time. Rest of the settings are self explanatory.

That’t it, Enjoy your private Reddit viewing experience. Here’s a video of the installation process:

P.S. Teddit is the next other alternative for Libreddit that deserves a mention, if you want to explore third-party web applications for Reddit.

Leave a Reply