Trying to run 2 servers off the same computer
I’m trying to run 2 servers off the same computer, but I can only get one of the servers to let me connect to it. I have been changing the ports in the server properties from 25565 on the second server, but it refuses to let me connect with the ip. I port forwarded it the same way as I did with the first server, but with the new port I would assign to it. (I know localhost would let me connect, but I want to be able to play on it remotely and with friends as well)
88 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by yeeb#0
There's probably a smoother way to do this. If you just want multiple worlds you can do that on one server.
Or could you elaborate further as to why you want 2 servers?
How should I go about doing that? Sorry I don’t know how to do that part. I pretty much just want to keep the survival world on server 1 and have a creative world on server 2. So if I could have two worlds on one server that would be great actually
And if I did the world approach, is there a way to not make the creative inventory carry over to the survival world?
Absolutely. That's very easy if you're on paper or a paper fork.
Use this plugin https://www.spigotmc.org/resources/myworlds.39594/
I don’t think I’m on paper. To be honest I don’t know what that is 😅. The way I made the server was I downloaded the file from the launcher and went from there.
So you're using the one that mojang provides?
Yup
Got it from the Minecraft launcher
There's basically no reason to use that jar anymore.
Aw shoot
nothing wrong with that, just unoptimized to all heck and w/o any plugin support
Paper lets normal clients join (without mods) but lets you use thousands of plugins. And it runs more quickly too.
but yeah PaperMC would be the way to go
Oooh I gotcha. Would there be a way to safely convert my server to paper?
Just drag and drop the jar
should just be able to replace the server jar file
How are you starting the server
i would click the server executable
Lol
@Yeeb download here. Put the file you download where server.jar is now
You usually use some sort of start.bat to tweak startup params
aw shoot so am i doing this all types of wrong?
(completely unrelated, but i'd recommend enabling file extensions for good practice, and also in the rare chance that you're met with a malicious .exe file disguised with a pdf icon)
View > Show > File name extensions iirc
okie dokie, ill do that right now
yeee
But yes migrating vanilla -> paper is automatic
honestly, not necessarily wrong -but if you want to control how much RAM it can use, and it's garbage collector and whatnot, the startup flags do that for you
iirc the default is 2GB or so
ooh gotcha. RAM isnt too big of a problem for me. I have 32 GB
i see i see
but that would be nice to manage at the same time
yeah haha
this is definitely a good tool for it
default options other than the operating system and amount of memory are good
so i should replace my server.jar with that?
No
the papermc jar file you should
but the flags.sh thing, nah that's the thing you open the jar with
ah gotcha
what website do i get papermc from?
Make a new file with the flags.sh website
https://papermc.io/downloads (go to Paper)
Papermc.io
can be named anything, so long as it's a .bat file
do i download 1.20.6 even if my server is running on 1.20.1?
You can download whatever version you want
But btw, if you use paper, you can install plugins to allow lots of versions to join
oh alright. so they dont correlate to each other in terms of versions?
No they do
oooh i like the sound of that
so get paper 1.20.1?
It doesn't really matter. If you want 1.20.6 features go for that but it shouldn't make a difference
alright cool. Ill just do the 1.20.1 since the world orignated on that version
There's a plugin called viaversion that lets anyone with a client newer than 1.9 join
And a plugin called viabackwards that lets anyone with a newer version than the server join
ooh gotcha. I dont think that it will be too big of a problem since its just me and like 4 friends
up to you yea
I downloaded the paper.jar... so i just replace the server.jar with that. Correct?
Yes 👍
for a little context, the jar file you're about to download controls what version the server runs, hence why you can put a newer game version in there (but you can't downgrade from there)
yep!
ooh i gotcha. Imma play it safe and do 1.20.1 then and if me and my friends want to update the server ill handle that beast another time
Good plan 👍
alright im booting it up right now
i like that!
it works!!
so what plugin should i obtain for the multiple worlds?
awesomeeee
do you have a reccomendation?
oh shoot sorry, forgot that was sent
Np that was a while back in this conversation
will there be a way to make the inventories separate from both worlds?
Yes
That's default
oh shoot, that makes my life easier
so download the 1.20.1 version and then download bkcommonlib?
Yes👍
Sorry I forgot to mention bkcommonlib but you got it anyway 😂
all good! so i just throw them both into the plugins folder?
Exactly
Then restart the server
You should see some more messages in the logs after you restart
oh shoot i saw something that said my_worlds!
That's fine
oh buddy im excited to get this working
It's all the same thing
do you know the command to create a world?
oh wait i think i found it on google
They have a nice wiki here https://wiki.traincarts.net/p/MyWorlds
@Yeeb turns out I was wrong. You have to turn on the seperate inventories. Go into the plugins folder, then into the My Worlds folder, then edit the config file (probably named config.yml, idk) and look for the seperate inventories option. Make it true.
okie dokie, ill try that right now\
Trying to figure out how to tp into the new world 😅
I changed that setting in the config file though
got it!
@Arthurmeade12 @Deer Jerky thank you so much for the help!
anytime! Glad to see things getting off to a good start, have fun!
i shall!
👍
I'm going to play devil's advocate and not recommend at all that you run a creative world and survival world on one server
i can think of a million ways that could go south. i run a creative server. people try to hack/crash it all the time to the point i had to lock it down from the public. saved hotbars and nbt items can be a serious mess to deal with and i wouldn't want that shit anywhere near my survival server
i agree with you in terms of the off chance that there's a bug that breaks inventory - though he did say it'll be a private server between him and his 4 friends
The "bulletproof" solution would be run two separate server behind a proxy, but it's probably overkill for a private server
I'd say for sure just boot a Velocity instance, one server for Creative, another for Survival, then just have whatever you need between the two.
DB sync, chat mods, etc.
^
Hey even friends on a private server do dumb shit and end up causing problems, intentional or no. It also just violates the integrity of a survival only server if you have creative mode just a world away, and tons of vulnerabilities to bring inventories/items over from the creative world.
Also much easier to crash a server in creative mode, so best to keep it as separated as possible
I tried to do that with proxy fabric but it didn't work lol
The backend servers need to be on a different port than the proxy server, which should ideally be on 25565. Meaning you need to expose 3 ports total. Make sure you follow the docs
did that ye