When the instance is fully stopped, start it back up from the control panel and refresh your server list in minecraft. sudo systemctl status it looks good, go ahead and shut down the machine (this stops the instance on the EC2 control panel). sudo systemctl enable should work, but be sure to check the status as follows. Next you need to enable the service so it runs on boot. sudo systemctl start then use the top command to ensure Java is running. SAVING ALL MAPS."\015'ĮxecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "save-all"\015'ĮxecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "stop"\015' DELETE COMMENTS IN PARENTHESES)ĮxecStart=/usr/bin/screen -DmS mc-%i /usr/bin/java -Xmx2G -jar minecraft_server.jar noguiĮxecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "say SERVER SHUTTING DOWN IN 5 SECONDS. User=minecraft (MAKE SURE YOU HAVE SET UP A USER WITH APPROPRIATE PRIVILEGES) (THIS WORKING DIRECTORY IS IMPORTANT, PUT IT 1 FOLDER BACK FROM YOUR server.jar FOLDER) Note and then omit the comments in parentheses. Also, insert the following text into the file: Navigate to /etc/systemd/system/ and create a new file using your favorite text editor sudo nano /etc/systemd/system/ This tutorial seems to work just fine but I had to make a couple edits and I’ll clarify some of the code in it. I had one of my nerd friends (Jake) get this working on my original rig. Here is the tutorial for “installing” DuckDNS as a linux cronjob. Use whatever flavor you’d like for your dynamic DNS reroutes. I use DuckDNS because it’s free and has been working for me. This makes connecting easier as each time the server turns on, it gets a new ip address and having a name to connect to is a lot easier than copy-pasting the new ip address every time you start up the server. Note for me for future scp transfers: scp :/opt/zippedserver.zip /opt/destination_folder 3) DuckDNS Cronjob I got it transferred over thanks to the help of Jake and Melissa who kept rebooting my laptop! Previous transfers failed mid-way through and I think a few files got corrupted. What I did was zip up the entire minecraft server folder and transfer it as one chunk. It doesn’t like to stay alive longer than 20 or 30 minutes. This was particularly difficult as I’m currently in Alaska and my computer is in New Mexico. Since I had a minecraft server already working, I figured I’d just delete the install on the AWS server and copy mine over. The cool thing here is you can start in the free tier and if you’d like to upgrade the hardware, all you have to do is change the instance type. There is enough info here to get this thing running but we’ll have to deviate from the path to get it running on it’s own. Starting an instance easily done by creating an amazon AWS account and following the tutorial below. Set up a webpage that lets users log in and turn on the server remotely.Write a script that checks active connections on port 25565 (minecraft) and 22 (ssh) and shuts down the server if it’s not being talked to for over an hour.Write minecraft server auto-start script.Write Duckdns cronjob to update the IP address on startup.This project will outline my steps towards creating the minecraft server and implementing a method to save money when it’s not in use. These servers have an hourly rate of $0-$0.22/hr. Of course owning a server will be cheaper in the long run, but I simply do not want one in my house. This should be cheaper than the upfront cost of a new computer + electricity + my time and effort setting up and maintaining it. Instead of building a computer/server from scratch I decided to pay (or not) for the convenience of an AWS server. Unfortunately it’s starting to suffer from reliability issues. My wife and I set up a little rinky dink minecraft server on one of my Toshiba laptops.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |