Recent Discussions

Help with self hosting

Unanswered
Crested Auklet posted this in #questions
Messages26 messages
Views0 views
Crested AukletOP
This a follow up of a reddit post that I made on the sub and was told to post here so here is the link to said post https://www.reddit.com/r/admincraft/s/ZpbZXK0Uhs . It as screenshots of the various error messages and some of what I tried to do to solve it (btw thanks u/Orange_Nestea for all the help you've given me)
Masai Lion
Hello, you want to make sure the server firewall itself allows 25565/tcp traffic inbound, and you would want to make sure you have a port forwarding rule in place to allow 25565 from the internet.
also, I'm assuming that your server is not your local computer that you are also trying to play on. In that case, localhost won't work. You need to use server-ip:25565 to connect.
"connection refused" generally means the firewall isn't open.

Reading through that reddit thread, it looks like you have tried changing some of the networking and it is still giving you grief
Crested AukletOP
Yep in the thread I sent picture of the firewall rule that I made to allow port 25565 and all the other stuff yet I still can't enter using ip:25565 and yes it's the same computer I'm trying to play
Oh idk if this really matters but the mod pack that I got the server pack from is Crazy Craft Updated from curse forge
Masai Lion
mod pack should not matter at all. If its not working with Vanilla, it wont matter what mods there are.
I see in the thread they said to blank out server-ip, and you did that already? Then the NullPointerException points to you actually being able to connect, but then there was some kind of Java issue
and i would make sure you dont have a second server somehow running on 25565. thats what the error in your third screenshot is talking about, "FAILED TO BIND TO PORT"
Crested AukletOP
and how would I check if I have another server? Sorry if it's a dumb question just don't know much on servers
Masai Lion
Sorry, I should have clarified. Make sure that you don't have two instances of Java (the "server") running at once that are both trying to use port 25565. You should be able to see that in Task Manager.
Masai Lion
You could reboot your computer to make sure that no MC servers are running, and then try to start the server after reboot and see if you still get that NullPointerException. It looks like it is related to the FAILED TO BIND TO PORT error.

If you can connect at that point on localhost:25565, then you could try connecting via public.ip:25565. If that works, your port forwarding and firewall rules should be working, and then your friends should be able to get in as well with that same public.ip:25565 server address.
Masai Lion
Since you are running it manually, there should only be one server running at a time, but you never know.

Something that guy did not go over in the video is setting a whitelist, which you should definitely do for an internet-facing server. You need to set white-list=true at the bottom of the server.properties file and fill out the whitelist.json file in that same "All the Mods 9" folder he was using in his example. You want to add you and your friends' Minecraft usernames so that only you can connect.

The minecraft Wiki has more information on it https://minecraft.wiki/w/Server#Whitelist Admincraft also has some information in their post at the top. https://old.reddit.com/r/admincraft/comments/1mhjtof/read_before_posting_someone_just_logged_into_my/
Crested AukletOP
Hey I was FINALLY able to join the server with local host but wasn´t able with publicip:25565 . Is it because since Im the one hosting i cant use that ip? My friends arent online rn so I cant test it with them
Masai Lion
good deal! That's definitely progress.

In one of your imgur pics, you had your Windows Firewall rule set incorrectly. You want the Local port to be 25565 AND the Remote port to be 25565. Fixing that should have the local piece done.

The final step would be making sure you have a port forwarding rule set on your router. This is going to be different depending on your router's make and model. In essence, that port forwarding rule needs to ALLOW TCP traffic for 25565 and send it to your server (192.168.1.222 based on previous screenshots). You have to login to your router and there should be an "advanced networking" tab with a section for port forwarding.
qP6LzrS.png
that is harder to help with since everyone has different networking hardware. I would say that posting a screenshot might help, but i dont want you to accidentally dox yourself by sending sensitive info.

just look for "advanced networking" or "port forwarding" and that should put you in the right direction.
Masai Lion
For context, localhost is working because you are on the same computer that you are trying to connect to. The publicip:25565 is not working because that route is taking you from your computer, routing "out to the internet", back to your network through your router, and then finally back to your computer over its public address. The port forwarding rule needs to be in place for any access from the internet to your local computer to work.

You want to make sure that publicip:25565 works for you before asking your friends to test, because they will all use that exact same connection string to connect.
Crested AukletOP
I made this one when the other guy was trying to help me
image.png
as for the firewall ill make sure to fix that
To check if server is accessible outside
Crested AukletOP
Does this mean it works?
image.png
Connecticut Warbler
yes it does
Crested AukletOP
Hey I was already playing with them so forgot to tell that ITS WORKING! Ty so much to everyone that helped
Loading...