Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Do I’ve to enter my server address instead of 198.51.100.0 this ip address right?
sudo ufw allow from <server_address> to any port 9200
```
My current sudo ufw status is
```
rajasimon@localhost:~$ sudo ufw status
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
Nginx Full ALLOW Anywhere
9200 ALLOW 198.51.100.0
9200 ALLOW my_server_ip4_address
OpenSSH (v6) ALLOW Anywhere (v6)
Nginx Full (v6) ALLOW Anywhere (v6)
```
Thank you, Erin Glass
Your content helps me to setup elasticsearch in my system.
Nice guide but external connections don’t work.
So first add your IP address to the firewall
# sudo ufw allow from xxx.yyy.aaa.bbb to any port 9200
then edit the elasticsearch.yml configuration file. Change network.host: localhost to network.host: 0.0.0.0
If you restart the service with systemctl restart elasticsearch you’ll get an error.
You need to add this at the bottom of the .yml file:
discovery.type: single-node
then restart systemctl restart elasticsearch
SSH to the remote server (xxx.yyy.aaa.bbb) and test with curl -X GET 'http://xxx.yyy.aaa.abb:9200' if the IP address of the ElasticSearch server is xxx.yyy.aaa.abb
Thanks for a great tutorial. Digital Ocean is always my trusted source for such tutorials.
FYI: This curl command
curl -X GET -H "Content-Type: application/json" 'http://localhost:9200/tutorial/helloworld/1' -d '{ "message": "Hello World!" }'
throws an IllegalArgumentException:
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [GET /tutorial/helloworld/1] does not support having a body"}],"type":"illegal_argument_exception","reason":"request [GET /tutorial/helloworld/1] does not support having a body"},"status":400}%
Because it’s passing a body for a GET request.
I tried to open port 9200 to remote IP via UFW but as I try to connect from this IP with curl I am getting an error: connection refused. I am not sure but If elasticsearch.yml config file contains localhost it should not work. Ok so I added the IP to the config file but then systamctl restart elasicsearch fails. As I revert it back to localhost it works. How to allowe secure remote connection?
What if the remote IP is dynamic? Is there a solution to solve the problem when I will need to set up UFW port every time the IP will change? It does not seems to be cleaver.
Synchronizing state of elasticsearch.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable elasticsearch