r/admincraft • u/jirushan • 14h ago
Software Resource Hosting an on-demand customizable Minecraft server for cheap (or free theoretically) with plugins/mod (Fabric) support via Discord & AWS in like half an hour
Around half a year ago I set up an on-demand Minecraft server for a uni club I'm in by having a discord bot communicate with an AWS lambda which then turned on an AWS instance with a minecraft server (that also shuts itself off automatically after no players are active). Basically means u can just turn on a minecraft server via discord.
One of my friends recently was asking about it, so I decided to just make something simple for people to follow along. https://github.com/jiru-shan/AWS_Discord_MC_Server here is the link, it takes around 20 to 30 minutes to setup & you just need a Discord account and an AWS account and then you have a minecraft server that can be scaled to player count and is on-demand (this is mostly for smaller-scale minecraft servers tbh cuz if not you'd just have it on all the time & there r probs more efficient ways to scale to really large player counts).
DISCLAIMER: While I did code/set up all the original AWS components of this project myself the first time, I am not an avid user of terraform, so a large chunk of the terraform instructions (as well as the documentation and a good chunk of the test cases, since I was a bit lazy, though I have read the documentation & thoroughly tested the repository & instructions) are AI generated.
Additionally, depending on your plan, AWS can charge you real money if things are not working properly (no exorbitant numbers, since its just running a lambda & an ec2 instance, but you could get overcharged for a server being up for too long and not shutting itself off automatically, which you can check with /status and the AWS console). While I have tested the instructions from scratch several times and have not confirmed any errors (particularly ones that would lead to excess billing), I would recommend starting from the AWS FREE TIER (which is suitable for running ~5-7 players). The free tier also comes with credits of $100 (or $200 if u complete some basic AWS challenges) that you cannot spend more than until upgrading, which should last you the length of the free tier (half a year). Free tier means you can see if anything breaks essentially. The free tier credits also apply to non free tier instances once you upgrade so with $200 in credits u can actually go quite a while for free playing modded and stuff. Also its pretty easy to create multiple AWS free tier accounts if you have multiple payment methods & the worlds are easily transferable.
Technical Stuff: The server is hosted through Fabric and comes with several plugins (which can be configured as well if you follow instructions). The only ones that the server is shipped with right now are server-side optimization plugins. Content mods are also supported. If you have some amount of technical knowledge, it is also quite easy to log in to the server itself and make any changes you want by using the AWS dashboard and then just using regular bash. There also should be config options for almost everything (how long it takes for people to time out, built in server ops/whitelists, though you can op yourself through this and then whitelist players on the server in game, whether the discord bot pings you when the server goes down, etc, etc). Some of these config options only apply if you set them on first boot but those are mentioned on the front page of the readme & there's also a separate document dedicated to changing/upgrading stuff, including making manual changes yourself without having them get reset accidentally.
In terms of price optimization you can also save like a few bucks a month (if you're trying to max free tier money) by using Route53 with a domain (i used a subdomain of my club) instead of paying for Elastic IP addresses. This is explained in the docs but basically AWS instances change IP each reload so either you can pay money to give yourself a permanent one (Elastic IP) or set it up so that on boot of the instance it reassigns the IP the domain is pointing to to your new IP. If you already want your server to have a domain then you should be doing this since paying for both the domain and having that domain point to an elastic IP is kinda pointless (there is just a config option for this follow instructions). This also has the added benefit of making it so its unlikely your server gets scanned by bots, and, even if it does, they won't have records of it once it gets turned on and off (IP changing on each boot).
I would not recommend this for large scale servers (you'll always have a player online anyway). Also, if you have any issues/have feedback/suggested changes feel free to reply here or open an issue on github.
•
u/TheVibeCurator Admincraft 11h ago
Post approved