Run your own Minecraft Server

on Amazon Lightsail

Amazon Lightsail is the easiest way to get started on AWS and is an easy-to-use virtual private server (VPS). 

In this tutorial, you set up a dedicated Minecraft server on Amazon Lightsail. Minecraft is best experienced with a dedicated server . Dedicated servers have many benefits such as: 

  • Performance: you might not notice it at first, but as you progress in the game, hosting and playing at the same time can cause you to lag, sometimes at the worst possible moment.
  • Always on: if you are playing with two or more friends, it might be challenging for everyone to log on at the same time. A dedicated server is always available so you and you friends can log on any time.
  • Latency: if your friends live far away, a dedicated server can split the latency difference and provide a better overall experience to everyone.

Before you begin, accept the EULA for Minecraft., and get setup with a free trial of Minecraft, if you don't already have the game. 

Get started with Amzon Lightsail for free. 

About this Tutorial
Time 10 minutes                                           
Cost $5.00 + Minecraft license 
Use Case Compute
Products Amazon Lightsail
Audience Developer
Level Beginner
Last Updated March 15, 2021

1. Create an Amazon Lightsail account

This tutorial is free tier eligible. 

Once you've created a Lightsail account, sign into the Lightsail console. 

Already have an account? Sign-in

2. Launch your Lightsail instance

a. Choose Create instance in the Instances tab of the Lightsail home page.


b. Choose Change Region and Availability Zone to create your instance in another location.

Select the closest Region to you so that you have good latency when playing.


c. Choose Linux as your platform, and select Ubuntu as your Blueprint. 

When choosing your Blueprint, ensure you are selecting from the subsection, OS Only, not Apps + OS.

To learn more about Lightsail Blueprints, see Choose an Amazon Lightsail instance image.


d. Choose your instance plan.

Select the $5/month instance plan.

Note: If you expect to build a large world with more players, consider choosing a more powerful instance.

Learn more on our Lightsail pricing page.

Screen Shot 2020-04-09 at 12.22.04 PM

e. Enter a name for your instance.

Screen Shot 2020-04-09 at 12.22.16 PM

f. Double-check everything and then click Create instance. 


3. Configure and connect to your server

a. Once your server is ready, select it, and click the Networking tab. 


Screen Shot 2020-04-09 at 12.22.33 PM

b. In the Networking tab, add a firewall rule to allow port 25565.

This is the default port used by the Minecraft network protocol.

c. Open port 25565 to enable Minecraft clients to connect to the server.

Screen Shot 2020-04-09 at 12.22.41 PM

d. Navigate to the Connect tab, and select Connect using SSH. 

e. SSH to your Lightsail instance from your browser by using the public IP address. You will need this Public IP address later in the tutorial, too. 


f. This will open a browser popup with a browser window for you to run commands on your Lightsail instance. Once connected, run:

sudo apt -y update && sudo apt -y install default-jre screen

g. Update the server and install the Java Runtime.


4. Install and run Minecraft Server

a. Run the following commands within your Lightsail SSH session.

# screen will keep running Minecraft after we disconnect SSH

# Create a directory to hold the Minecraft files:
sudo mkdir /usr/games/minecraft
cd /usr/games/minecraft

# Visit
# Download the server jar file
sudo wget -O mcserver.jar 

# Run the minecraft server:
sudo java -Xmx1G -Xms1G -jar mcserver.jar nogui

b. The first time you try to start the Minecraft server, it will display an error indicating that you must accept the EULA.


c. In order to accept the EULA, you need to write “eula=true” to the contents of eula.txt, but since this file is owned by root, you need to change ownership first. 

To do so, enter the following command: 

# change ownership of eula.txt
sudo chown ubuntu eula.txt

# accept the EULA
echo "eula=true" > eula.txt

# re-run the Minecraft server command
sudo java -Xmx1G -Xms1G -jar mcserver.jar nogui

d. Monitor the console for any errors. If everything goes well, here’s what you should see:


Once the Minecraft server is up and running, if you need to run other commands in your SSH session without stopping the server, exit screen by pressing “CTRL+A” and then “d”.

Next time you connect to your Lightsail instance, you’ll be greeted with an empty bash prompt. Don’t worry, your server is probably running within a screen session. To list the active screen sessions, run “screen -ls”. In the output, each line begins with the ID of the session. If you only have a single screen session, you can connect to it by running “screen -r”. If there are multiple sessions, you will need to run “screen -r ” where ID is the session ID.

5. Connect your Minecraft Client

a. On your client machine install and launch Minecraft. Enter your unique IP address in the Multiplayer/server. Then press Done.


If you have trouble adding your server, double check the IP address and make sure port 25565 is open in Step 1.

Now you can share your server IP Address with your friends and family and enjoy a fast, reliable private Minecraft Server!

5. Next steps

Now that you can connect to your instance, what you do next depends on how you plan to use it. For example, you can:


You used Amazon Lightsail to easily host a Minecraft server.

Amazon Lightsail is great for developers, WebPros, and anyone looking to get started on AWS in a quick and cheap way. You can launch SSD-based instances, databases, manage domains, load balancers, and much more.

Was this tutorial helpful?

Thank you
Please let us know what you liked.
Sorry to disappoint you
Is something out-of-date, confusing or inaccurate? Please help us improve this tutorial by providing feedback.