🔥Minecraft Server on Repl.it!🔥
How to run a minecraft server on repl.it
Hey guys today I'm going to show you how to run a minecraft server on repl.it.
Note: You need hacker plan for this to work right now!
Installation is super simple!
- Start a new bash repl
- In the console paste this:
wget -O mc.sh https://xpiredl.scoder12.repl.co/mc.sh
- In main.sh, paste this:
bash mc.sh
Run the repl and follow the instructions!
Once you see Done!
in the console, connect to the ip shown in ip.txt
If you have questions ask in the comments!
How to change minecraft version
- If you already have a server, delete the files
mc/server.jar
andmc.sh
- Run the command above that starts with
wget
again (even if you already have the script) - In
mc.sh
, find the line that saysVERSION=1.16.3
and edit it to your desired version
Huge shoutout to @letsrepl for the initial concept.
Remember to upvote if you enjoyed!
excited villager noises
Consider putting php -S 0.0.0.0:3000 ip.txt & bash mc.sh
in main.sh
, instead of just bash mc.sh
. This automatically sets up a website for it, making it easier to use with uptime robot.
Once this is setup, go to uptime robot and create a keyword monitor that checks every 5 minutes for the keywords "Server running on". That way the server will stay up all the time.
Don't forget to put the ngrok_token
and ngrok_region
values in your .env
!
@gg2001 What IP should I use? How do I forward this ever-changing IP to a domain?
@Forgiving22 buy ngrok premium if you want to have an IP that doesn't change https://ngrok.com/pricing
@Scoder12 How do you do this I couldn't find any .env file
@JasperLianLian click main.sh
then press the add file button and type .env
and then press enter
@Scoder12 like this?
ree not work here
basically whats the ngrok key reee
@Coder100 You have to login to the dashboard that it gives you, and then copy the auth token
ok what do i log in with i don't want to make acc reee @Scoder12
@Coder100 u have to make acc
LMFAO just found out @MarcusWeinberger
it says "chmod: cannot access 'jre/bin/java': No such file or directory" please help me dude
@CroxyTheDev sorry, should be fixed now if you try again
I actually made a server!!! You have to make a .env file beforehand and it will work!
and plus, I have Minecraft
how did you make the .env file? @zhidao
@zhidao I tried that. I'll start again and create the .env file first as you mentioned. I was thinking there was something in the naming I may have been missing. Thanks!
@ThomasHagan no the .env file is lit named ".env"
@zhidao Thanks! Felt a bit dumb to find that out.
@ThomasHagan ok but bruh
When is the minecraft Bedrock server coming out? I can help you test it if required
@yadunandanrocks i also want a minecraft bedrock server on repl
@yadunandanrocks not sure, I don't know how to set it up tbh
i just create the server and got this Can't keep up! Is the server overloaded? :/
@DiveshTheReal yeah but it still works
Can you do this without Hacker? I'm a random kid wanting to play Minecraft and I've already used my savings for that.
@PokeGirl1024 You can use the Student Developer Pack to get hacker for free
Does it work for bedrock too?
@DarshanRajpara1 If you could find low-level access to the Linux host of the Repl servers, yes. I'm still not sure if you can. With third-party hosts like PocketMine that runs on PHP, I bet you could.
@DarshanRajpara1 Someone was asking for help with a bedrock server using pocketmine, but they were having trouble connecting. I think thats its definitely possible in theory but hasn't been pulled off yet
how to allow cracked clients to join the server?
@IronBoy345 find the line in server.properties
that says online=true
and replace it with online=false
@VoltyDragon that is very weird. It seems like a temporary repl.it issue. Try again and if it still doesn't work, replace https
with http
@Scoder12 thank you, it worked this time!
why is it only hacker plan?
@Ravens0606 because minecraft servers use a lot of memory
ok, do you know how to run it on my computer directly? @Scoder12
@Scoder12 Can I upload my existing world to the server? :D
@SiuIeng probably
@Scoder12 can you tell me how? :D
@SrNox weird. I have no idea how to solve that.
@Scoder12 Two things, Frist, I keep getting this error, and idk what to do, pls help.
Second thing, I hate to ask this but in the instructions can you put down in all caps "YOU DON'T NEED TO FORK THE REPL BELOW" because I did, and worked on the web design only to find out I didn't need to lol. Hope you can help!
@YeetsaJr The error is because you don't have hacker plan. If you read the whole post you wouldn't have either of these issues.
@Scoder12 Ah, sorry for my stupidity lol, by any chance do you know why you need hacker plan?
@YeetsaJr java is a memory hog and what you're seeing is the server not having enough memory. Hacker plan includes double the memory. (You can get hacker plan for free with GitHub student developer pack)
@Scoder12 Ok, Thanks
as the ngrok tunnel change, all the data in the server gets lost.
is there anyway i can use my ip and port or if i can save that data before ip port gets changed?
@927gaming You mean save your world data? Well, it would help to stop the server by typing stop
in console or /stop
in chat. I have also had issues with it saving and I think this is due to repl.it not snapshotting the files. I am not 100% sure how to fix it but maybe by opening all of the files in mc/world
and it's subfolders in the editor before you leave the editor. Hope this helps!
@Scoder12 I was thinking if there was a way to use the ip address and port instead of using ngrok's tunnel, I have the hackers plan and I can make it 24/7 but as soon as the tunnel port changes all the data get deleted, so I guess using ip and port might help us.
@927gaming which data are you referring to? The repl.co URL only accepts websites, so minecraft data cannot be sent through it. The only way to get the IP and port to stay the same is to pay for ngrok premium.
@Scoder12 i was saying about the game data, anyways thanks for the help!!
Does it work for minecraft 1.16.5?
@Fletchermed it should, try with a brand new repl and follow the instructions in the post to change the version
how to make someone OP in this repl server hosting ???
@DemonKingSwarn1 while its running type op TheirName
in the console
@Scoder12 thanks
how can i update the java version?
@927gaming why would you want to do that
chmod: cannot access 'jre/bin/java': No such file or directory
exit status 1
please help
@ByGoneNeutron delete repl and try again. If you are concerned about losing your world, delete mc.sh and re-download it
dont have a world yet D: @Scoder12
@ByGoneNeutron then delete the repl and try again, it was a bug in the script so dw its not your fault
i got an "unknown host" error inside minecraft.
Also how to update the server to latest minecraft version.
@DemonKingSwarn1 Are you connecting to the ip that is in ip.txt
after it says "Ready" in the console? and check the post, I updated it with instructions on how to update to latest version
how can I upgrade the server version?
it says outdated server i'm still on 1.15.1
@927gaming Delete the repl and try again, should work now
I got a SSL error "Unable to establish SSL connection." in wget. using Curl got me curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to xpiredl.scoder12.repl.co:443
@AcceleratedCode Hi, replit is experience issues with all server repls lately, so you'll have to manually copy and paste the script from the repl I linked to the post.
Hey, first of all thank you for the helpful tip! Can you upload an existing world onto the server?
@EpicBoomerMomen Yep, you can, once you run the script for the first time it should create the traditional server file structure. Then you can stop the server and replace the world .dat
files by uploading into the repl. Only thing to keep in mind is that there is a size limit per repl that cannot be increased.
coder dm me on discord. is it possible you and i can work on doing this but for SCP:SL servers instead?
It says the server is overloaded and cant keep up
aish, I'm a bash noob. How do u do the .env stuff?
Do we have to download Xpire?
Just found out I didn't have Minecraft. Take an upvote!
https://repl.it/@coder100/minecraft-or-something-idk-scoder-but-i-have-hacker#ip.txt
@Coder100 lol haha I don't have minecraft too
lol @TheJuiceTin