Open files error: "This site can't be reached. Localhost refused to connect."


Rocket.Chat works as expected except for files that I attach in a channel. I can attach a .pdf and everything works as expected. The file name appears as a hyperlink on the post in the channel. But when I click on the link I get an error that I quote in the topic subject above. What am I doing wrong here?

Server Setup Information

  • Version of Rocket.Chat Server: 3.13.2
  • Operating System: Ubuntu linux
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version:
  • Proxy:
  • Firewalls involved:

Any additional Information

Bump. Anyone out there?


Localhost refused to connect.

So how have you got your DNS set up?

Are you using a reverse proxy/SSL etc etc? Sounds like you are accessing it from a different URL than expected?

It is set up on a reserved IP address: Nothing fancy here; just defaults.

  • File uploads is enabled.
  • Accepted media types is black to accept all.
  • Using GridFS for storage type.

And again, the whole install works perfectly except for when I try to access an uploaded file. When accessing a test pdf I just uploaded, the url that fails is:


Thanks for any pointers.

I solved it: I needed to go into General > Site URL and change from localhost to the ip address of the install. Works now.