Dev
Dev

Reputation: 1374

Restrict typesense to localhost only

I am trying to host typesense in a self-hosted virtual machine. I don't want to expose the typesense to the public. I want to restrict access from localhost only. How can I restrict the typesense from accessing outside?

Upvotes: 0

Views: 366

Answers (1)

ErJab
ErJab

Reputation: 6375

You want to set the --api-address and --peering-address to 127.0.0.1 to ensure that Typesense is only listening for inbound connections from localhost.

These two parameters are documented here: https://typesense.org/docs/0.23.1/api/server-configuration.html#using-command-line-arguments

--api-address

Address to which Typesense API service binds. Default: 0.0.0.0

--peering-address

Internal IP address to which Typesense peering service binds. If this parameter is not specified, Typesense will attempt to use the first available internal IP.

Upvotes: 0

Related Questions