Not able to access the Nitter. Deployed in Docker Locally.
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.
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 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.
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).
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
@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 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 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