Install Elasticsearch in 5 Minutes on Digital Ocean

May 29, 2014

development

This is a short tutorial to install Elasticsearch in 5 minutes on Ubuntu in a Digital Ocean droplet. I've been working with WordPress for a long time and what really got me hooked in the early days was the "Famous 5-Minute Install". I'm extending that same concept to one of my new favorite tools - Elasticsearch. It's a super fast search service built on Lucene that has an embedded RESTful JSON API. Since it's native JSON, any object you have in your code - whether it be a Javascript object or a C# object - can be serialized and inserted into an Elasticsearch Index. So technically you can use it as a NoSQL database. It clusters and does a lot of other fancy stuff but that's not the point of this article. Anyway you probably already know what it is if you stumbled on this post so lets get your very own Elastic Search sandbox up and running...

Step 1: Get A Server

Screen Shot 2014-05-23 at 1.23.28 PMIn order to get this done in 5 minutes we're going to use Digital Ocean to spin up a cloud server. Why? Because it's awesome and your server will be ready in 55 seconds... It's cheap to run and free to get started if you use one of their many promo codes. If this doesn't sound awesome to you, feel free to spend an hour or so setting up a Linux virtual machine. Either way, this tutorial assumes you are going to run ElasticSearch on Linux, specifically Ubuntu. So after you sign up for Digital Ocean, setup a free  Ubuntu Droplet (more info than you need is here). They'll email you the root password and you should be good to go to access the Linux console from their website. Screen Shot 2014-05-23 at 1.31.38 PM Note: there are a bunch of other things you'll want to do if you run this server in production - like setting up SSH, disabling root login, and other things. Follow this tutorial for 'Initial Server Setup With Ubuntu' for more details.

Step 2: Install Elasticsearch

Now you are ready to install Elasticsearch. Fortunately that's the easy part. Run the shell script in this gist to get up and running. Aaaand you're done. Want to make sure it's running? Run a curl in your console, hitting port 9200.

curl http://localhost:9200

You should see something like this giving you some meta data about your Elasticsearch instance.   Install ElasticSearch In 5 Minutes Now, if I had DNS setup for this hostname, you will now be able to hit Elasticsearch externally with http://elastic.brudtkuhl.com:9200 but for now you can just go at the public IP address that Digital Ocean provides. This is the first in a series of posts on my experiences working with Elasticsearch. Do you have any questions on how to install Elasticsearch? Now onto your next step: Securing Elasticsearch. Note: Links to DigitalOcean use my referral code. I'd recommend them if I didn't have a referral code.


Active Projects

I'm always tinkering with new ideas and building interesting things. From AI-powered tools to micro-SaaS products, these are the projects currently keeping me up at night. Each one solves a specific problem I've encountered or explores an emerging technology I'm excited about.

🤖 PMPrompt

I recently launched PMPrompt, a curated collection of AI prompts for product managers. The goal is simple - help PMs save time and be more effective by leveraging AI in their daily workflow. Read more about this project in my blog post about building PMPrompt or try the AI-Powered PRD Generator.

📊 SurveySnaps

I recently launched SurveySnaps, a platform that makes collecting location-based feedback dead simple using QR codes. The goal is straightforward - help businesses gather real-time feedback from specific locations without the complexity of traditional survey tools. Read more about this project in my blog post about building SurveySnaps.

🏗️ JSONL Tools

I am working on a set of tools to help me work with JSONL. JSONL is a simple format for working with JSON data. I am working on a set of tools to help me work with JSONL data. I will use these tools to help me work with my own data as well as help me build my own APIs. One of the tools I am developing is a JSONL Validator to ensure the integrity and structure of JSONL data. Read more about this project in my blog post about building JSONL Tools.

🤖 Make Storytime

Personalized children's stories generated by AI. This is an app I am building with my kids.

📠 Fax Online

Yea, I know. But there is a long tail for everything and believe it or not there was an underserved market for people that need to send a fax online. Some people (like me!) just need to send a one time fax.

Read more about this micro Saas project in a blog post about building an online fax service.

🥑 Free URL Indexer

Free URL Indexer is a free tool to help you index your backlinks and get them into Google faster. It's a simple tool that I built to help me with my own SEO efforts and I decided to share it with the world. It's a free tool and I don't even ask for your email address. Just paste in your URL and click the button.

👉 See all projects