nitter icon indicating copy to clipboard operation
nitter copied to clipboard

Not able to access the Nitter. Deployed in Docker Locally.

Open vigneshrams opened this issue 2 years ago • 7 comments

Hi @zedeus, I have followed the ReadMe and deployed Nitter Locally to docker. I am not able to access it. Docker is Running and Connected to Redis. I even tried to change it to 8070 Port. Still No luck. Please help me with it. image

vigneshrams avatar Aug 22 '23 17:08 vigneshrams

Are you publishing the ports on the Nitter container?

-p 8070:8070 if you used docker run

or if using docker-compose:

     ports:
      - "8070:8070"

TheLovinator1 avatar Aug 23 '23 10:08 TheLovinator1

@TheLovinator1 Thanks for the Suggestion. Yes, I am using -p 8070:8070 in docker run. Below is the cmd I used, docker run -v $(pwd)/nitter.conf:/src/nitter.conf -p 8070:8070 -d --network host nitter:latest Please help me understand what I am doing wrong here.

Screenshot 2023-09-11 at 5 08 20 PM

vigneshrams avatar Sep 11 '23 11:09 vigneshrams

What HTTP error code are you getting when you try to access your instance?

When I set my instance up, I was getting "502 - Bad Gateway" errors until I changed the address in nitter.conf from 127.0.0.1 to 0.0.0.0; if it's the former, it'll only accept connections from inside the docker container (e.g. not your browser running on another machine).

Rudicron avatar Oct 06 '23 22:10 Rudicron

I tried deploying nitter locally using docker, I can access nitter without any problem from browser on localhost:8080, but I am not getting any results while searching for users or tweets.

  • I have no idea what I am doing wrong. What is unclear for me what should I put in nitter.conf

    • I left the address and port values as in example file
    • I tried putting in hostname "127.0.0.1", "my private IP", "my public IP"
    • I tried putting in replaceTwitter "nitter.net", "127.0.0.1", "127.0.0.1:8080", "my private IP:8080"
    • And all combinations of mentioned above.
  • What is the purpose of hostname in nitter.conf and replaceTwitter, what should I put there?

  • In docker-compose.yml file ports are set to "127.0.0.1:8080:8080"

Please help

Raroog avatar Oct 17 '23 11:10 Raroog

@vigneshrams your screenshots are showing that the nitter container does not have any ports published. Also you combined --network host with -p - don't do that, I believe you should have seen a warning about that when executing the docker run. Also it shows you used image nitter:latest, not the official published image zadeus/nitter:latest - did you build it yourself? We don't know what you changed, so we cannot debug that.

Try this (exactly):

docker run -v $(pwd)/nitter.conf:/src/nitter.conf -p 127.0.0.1:8070:8070 -d zadeus/nitter:latest

in the nitter.conf you need

hostname = "localhost"
address = "0.0.0.0"
port = 8070

then http://localhost:8070 should work

squatica avatar Oct 18 '23 05:10 squatica

@squatica Thanks for your reply. When I don't use --network host nitter docker is not connecting to redis image running already. I used the command given in Nitter Docs docker run -v $(pwd)/nitter.conf:/src/nitter.conf -d --network host nitter:latest then it connects to redis but not working on http://localhost:8070 Please suggest how I can solve this? ./Thanks

vigneshrams avatar Oct 18 '23 13:10 vigneshrams

@vigneshrams One possible solution is to use the provided docker-compose.yaml - the containers are next to each other in the same compose network, so they don't need --network host.

Second solution for docker run - independent containers - use --link <name-of-redis-container>

docker run -v $(pwd)/nitter.conf:/src/nitter.conf -p 127.0.0.1:8070:8070 -d --link nitterRedis zadeus/nitter:latest

also for the docker run way you will need to use redisHost = "nitterRedis" in your nitter.conf

squatica avatar Oct 18 '23 14:10 squatica