At ExamPro if you can justify it with AWS you can do it. We run our own modded minecraft for the team to play in and thought we'd show you how you could do the same.
Talk Resources
Download Twitch Desktop App
https://www.twitch.tv/downloads
Download Minecraft Forge Server
https://files.minecraftforge.net
Top comments (18)
I'm getting a lot of permission denied errors with this one. If I ssh in and execute the
/usr/bin/java -jar /minecraft/forge...jar
myself my server runs fine. But when the system service is started it complains of permission issues:Any thoughts would be helpful!
This is going to come down to permissions.
It's either the eula file is set root:root or you aren't running the server as sudo user.
So I added
WorkDirectory=/minecraft
and all my woes went away.In summary:
sudo
in theExecStart
eula.txt
is owned byec2-user:ec2-user
WorkingDirectory=/minecraft
tominecraft.service
Seems to be working for me. Thanks for the prompt support Andrew - looking forward to playing Minecraft in the cloud.
Do you mean setting the
ExecStart
with/usr/bin/sudo
prepended? I do get further if I run it that way. Just not sure if it is a good idea or not for security.Most servers need to run via sudo to access specific libraries so this is normal.
It could be the case thats where you need to place sudio.
If I didn't have it you don't need it.
You can also just attempt changing the ownership of the eula.txt file because maybe it was created as root user by mistake.
If you are using Amazon Linux then you just need to do
chown: ec2-user:ec2-user eula.txt
and this may resolve your issue.I'm at work at the moment so I can't do more testing.
A few things I can note:
/usr/bin/java ...
on its own (nosudo
) works fine and I can play on my Minecraft server when it starts up, mods and all.sudo
works, but does not create/read theeula.txt
Permissions on the directory are
ec2-user:ec2-user
and that user can create, update and delete theeula.txt
. I might go through the whole set up and make sure everything is configured correctly on the AWS side, but it seems odd that I can run the server myself, but when I try and set it as a service it fails. Having done Windows services for many years I do know it's usually some sort of permission that is the issue.On another note - how do you persist your game world? My thought would be to create a cron job to store the world in my S3 periodically.
Your EC2 instance has an EBS volume which is your virtual hard drive. You can take snapshots which are then stored on AWS managed S3. When you take additional snapshots it only backs up the difference in changes like a git repository.
They don't recommend to take EBS snapshots while the server is running but you certainly can and this is what I do and I've had no ill adverse effects (data loss or reduced server speed).
You could also sync just the files you want to s3 but this I think is less desirable now that I've done both methods.
You can automate EBS snapshots on schedule via CloudWatch events. CloudWatch events are basically serverless cron jobs, and much better than configuring your instance.
medium.com/exampro/2018-modded-min...
Hi I've run into an issue. I can login via SSH and I can ping the EC2 but when I try and connect from the Twitch Minecraft launcher I get a "Failed to connect to the server" "io.netty.channel.AbstractChannel$AnnotatedConnectException:Connection refused: no further information:"
I don't think it even gets to the part where it installs or tries to run anything. Any help would be great.
Nice Post. This got me back into Minecraft. I'll have to check out the spot pricing from AWS, I've really just been using the On-demand pricing and it's starting to get expensive.
Hey! I came across the same issue. What I did:
Disclaimer - not sure how I am going to combine this command into the user data script, but at least it gets the server up and running. I'll try again tomorrow after work and see what I can find as to why this is necessary.
I should really just shoot end-to-end videos on this stuff.
I thought it was a great video. I've mostly used Azure for cloud services so it was a great help navigating through the AWS stuff.
I've been into games in Minecraft for a long time now, and I like that everyone can choose a server that interests them. You can run a modified Minecraft server on AWS or choose absolutely any other server to your liking. Maybe answers.microsoft.com/en-us/xbox/f... will be useful for you. Regardless of which one you choose, each of these servers will provide you with a brilliant experience. These are all good quality server options regardless of whether you are a newbie or already an experienced player. I wish you the best of luck in the game!
sudo systemctl daemon-reload
sudo: systemctl: command not found
how to fix it?