Nitter

Nitter

I wanted an RSS feed from twitter. One that was lightweight & didn't carry the amount of data sharing with twitter that comes as standard. Also one that I could self host.

Enter Nitter.

Screenshot of nitter

It's easy to set up, using the docker image & docker-compose (Updated 8/1/2022 to deal with the need for a redis container in the latest version)

version: '3.8'

services:
  redis:
    image: redis:latest
    container_name: nitter-redis
    restart: unless-stopped
    volumes:
      - /home/docker/nitter/redis/:/var/lib/redis
  nitter:
    image: zedeus/nitter:latest
    container_name: nitter
    restart: unless-stopped
    depends_on:
      - redis
    volumes:
      - /home/docker/nitter/data/:/data
      - /home/docker/nitter/nitter.conf:/src/nitter.conf
    ports:
      - "8080:8080"

You will need a nitter.conf file in the same place as the docker-compose.yml if you don't specify it in the compose file as I have done here.
Here's the one that I use - you'll want to edit the "YOUR.DOMAIN.TLD" & "CREATE A RANDOM KEY" before you use this for yourself.

[Server]
address = "0.0.0.0"
port = 8080
https = true  # disable to enable cookies when not using https
httpMaxConnections = 100
staticDir = "./public"
title = "nitter"
hostname = "nitter.YOUR.DOMAIN.TLD"

[Cache]
listMinutes = 240  # how long to cache list info (not the tweets, so keep it high)
rssMinutes = 10  # how long to cache rss queries
redisHost = redis
redisPort = 6379
redisConnections = 20 # connection pool size
redisMaxConnections = 30
redisPassword = ""
# max, new connections are opened when none are available, but if the pool size
# goes above this, they're closed when released. don't worry about this unless
# you receive tons of requests per second

[Config]
hmacKey = "CREATE A RANDOM KEY" # random key for cryptographic signing of video urls
base64Media = false # use base64 encoding for proxied media urls
tokenCount = 10
# minimum amount of usable tokens. tokens are used to authorize API requests,
# but they expire after ~1 hour, and have a limit of 187 requests.
# the limit gets reset every 15 minutes, and the pool is filled up so there's
# always at least $tokenCount usable tokens. again, only increase this if
# you receive major bursts all the time

# Change default preferences here, see src/prefs_impl.nim for a complete list
[Preferences]
theme = "Nitter"
replaceTwitter = "nitter.YOUR.DOMAIN.TLD"
replaceYouTube = "piped.kavin.rocks"
replaceInstagram = ""
proxyVideos = false
hlsPlayback = false
infiniteScroll = false

Once nitter is up & running you'll be able to access the main page, which just has a search box. No login, no obvious restriction/control. DON'T go exposing that to the whole internet - you'll want to use a reverse proxy at the very least. With SSL.

Nitter main page

In my case I wanted the RSS feeds to be accessible from within the local network, but there's no need for access from outside. So, while I have a subdomain that has a valid SSL certificate, & can access nitter over https, the reverse proxy only allows access from the local network IP addresses. (N.B. docker containers use 172.16.0.0/12 so you may find that your usual local network IP doesn't match - if you are using a docker based RSS reader to pull the RSS feeds from nitter)

To add an RSS feed, find the twitter user & pull up their feed on nitter, then right click the RSS icon (top right of the screen), copy the link & paste that into the RSS reader that you want to use.

To be honest, I'm not sure how to access nitter from outside the network with authentication - in a way that allows a feed reader to work (basic authorisation for human being access should be simple enough, but nitter doesn't have a memory for who you are following, at this point, so it would be a very manual process to visit Twitter via this route)