A
Admincraft7mo ago
Yeeb

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
Admincraft Meta
Admincraft Meta7mo ago
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
Arthurmeade12
Arthurmeade127mo ago
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?
Yeeb
YeebOP7mo ago
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?
Arthurmeade12
Arthurmeade127mo ago
Absolutely. That's very easy if you're on paper or a paper fork. Use this plugin https://www.spigotmc.org/resources/myworlds.39594/
Yeeb
YeebOP7mo ago
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.
Arthurmeade12
Arthurmeade127mo ago
So you're using the one that mojang provides?
Yeeb
YeebOP7mo ago
Yup Got it from the Minecraft launcher
Arthurmeade12
Arthurmeade127mo ago
There's basically no reason to use that jar anymore.
Yeeb
YeebOP7mo ago
Aw shoot
Deer Jerky
Deer Jerky7mo ago
nothing wrong with that, just unoptimized to all heck and w/o any plugin support
Arthurmeade12
Arthurmeade127mo ago
Paper lets normal clients join (without mods) but lets you use thousands of plugins. And it runs more quickly too.
Deer Jerky
Deer Jerky7mo ago
but yeah PaperMC would be the way to go
Yeeb
YeebOP7mo ago
Oooh I gotcha. Would there be a way to safely convert my server to paper?
Arthurmeade12
Arthurmeade127mo ago
Just drag and drop the jar
Deer Jerky
Deer Jerky7mo ago
should just be able to replace the server jar file
Arthurmeade12
Arthurmeade127mo ago
How are you starting the server
Yeeb
YeebOP7mo ago
No description
Yeeb
YeebOP7mo ago
i would click the server executable
1who¡ssus?
1who¡ssus?7mo ago
Lol
Arthurmeade12
Arthurmeade127mo ago
@Yeeb download here. Put the file you download where server.jar is now
1who¡ssus?
1who¡ssus?7mo ago
You usually use some sort of start.bat to tweak startup params
1who¡ssus?
1who¡ssus?7mo ago
flags.sh
flags.sh
A simple script generator to start your Minecraft servers with optimal flags.
Yeeb
YeebOP7mo ago
aw shoot so am i doing this all types of wrong?
Deer Jerky
Deer Jerky7mo ago
(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
Yeeb
YeebOP7mo ago
okie dokie, ill do that right now
Deer Jerky
Deer Jerky7mo ago
yeee
hjk321
hjk3217mo ago
But yes migrating vanilla -> paper is automatic
Deer Jerky
Deer Jerky7mo ago
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
Yeeb
YeebOP7mo ago
ooh gotcha. RAM isnt too big of a problem for me. I have 32 GB
Deer Jerky
Deer Jerky7mo ago
i see i see
Yeeb
YeebOP7mo ago
but that would be nice to manage at the same time
Deer Jerky
Deer Jerky7mo ago
yeah haha this is definitely a good tool for it default options other than the operating system and amount of memory are good
Yeeb
YeebOP7mo ago
so i should replace my server.jar with that?
Arthurmeade12
Arthurmeade127mo ago
No
Deer Jerky
Deer Jerky7mo ago
the papermc jar file you should but the flags.sh thing, nah that's the thing you open the jar with
Yeeb
YeebOP7mo ago
ah gotcha what website do i get papermc from?
Arthurmeade12
Arthurmeade127mo ago
Make a new file with the flags.sh website
Deer Jerky
Deer Jerky7mo ago
PaperMC
Downloads
Find downloads for our software – including Paper, Velocity, and Waterfall.
Arthurmeade12
Arthurmeade127mo ago
Papermc.io
Deer Jerky
Deer Jerky7mo ago
can be named anything, so long as it's a .bat file
Yeeb
YeebOP7mo ago
do i download 1.20.6 even if my server is running on 1.20.1?
Arthurmeade12
Arthurmeade127mo ago
You can download whatever version you want But btw, if you use paper, you can install plugins to allow lots of versions to join
Yeeb
YeebOP7mo ago
oh alright. so they dont correlate to each other in terms of versions?
Arthurmeade12
Arthurmeade127mo ago
No they do
Yeeb
YeebOP7mo ago
oooh i like the sound of that so get paper 1.20.1?
Arthurmeade12
Arthurmeade127mo ago
It doesn't really matter. If you want 1.20.6 features go for that but it shouldn't make a difference
Yeeb
YeebOP7mo ago
alright cool. Ill just do the 1.20.1 since the world orignated on that version
Arthurmeade12
Arthurmeade127mo ago
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
Yeeb
YeebOP7mo ago
ooh gotcha. I dont think that it will be too big of a problem since its just me and like 4 friends
Deer Jerky
Deer Jerky7mo ago
up to you yea
Yeeb
YeebOP7mo ago
I downloaded the paper.jar... so i just replace the server.jar with that. Correct?
Arthurmeade12
Arthurmeade127mo ago
Yes 👍
Deer Jerky
Deer Jerky7mo ago
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!
Yeeb
YeebOP7mo ago
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
Arthurmeade12
Arthurmeade127mo ago
Good plan 👍
Yeeb
YeebOP7mo ago
alright im booting it up right now
Deer Jerky
Deer Jerky7mo ago
i like that!
Yeeb
YeebOP7mo ago
it works!! so what plugin should i obtain for the multiple worlds?
Deer Jerky
Deer Jerky7mo ago
awesomeeee
Yeeb
YeebOP7mo ago
do you have a reccomendation?
Yeeb
YeebOP7mo ago
oh shoot sorry, forgot that was sent
Arthurmeade12
Arthurmeade127mo ago
Np that was a while back in this conversation
Yeeb
YeebOP7mo ago
will there be a way to make the inventories separate from both worlds?
Arthurmeade12
Arthurmeade127mo ago
Yes That's default
Yeeb
YeebOP7mo ago
oh shoot, that makes my life easier so download the 1.20.1 version and then download bkcommonlib?
Arthurmeade12
Arthurmeade127mo ago
Yes👍 Sorry I forgot to mention bkcommonlib but you got it anyway 😂
Yeeb
YeebOP7mo ago
all good! so i just throw them both into the plugins folder?
Arthurmeade12
Arthurmeade127mo ago
Exactly Then restart the server You should see some more messages in the logs after you restart
Yeeb
YeebOP7mo ago
oh shoot i saw something that said my_worlds!
Arthurmeade12
Arthurmeade127mo ago
That's fine
Yeeb
YeebOP7mo ago
oh buddy im excited to get this working
Arthurmeade12
Arthurmeade127mo ago
It's all the same thing
Yeeb
YeebOP7mo ago
do you know the command to create a world? oh wait i think i found it on google
Arthurmeade12
Arthurmeade127mo ago
@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.
Yeeb
YeebOP7mo ago
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!
Deer Jerky
Deer Jerky7mo ago
anytime! Glad to see things getting off to a good start, have fun!
Yeeb
YeebOP7mo ago
i shall!
Arthurmeade12
Arthurmeade127mo ago
👍
Torrent
Torrent7mo ago
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
Deer Jerky
Deer Jerky7mo ago
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
hjk321
hjk3217mo ago
The "bulletproof" solution would be run two separate server behind a proxy, but it's probably overkill for a private server
AeonRemnant
AeonRemnant7mo ago
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.
Torrent
Torrent7mo ago
^ 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
1who¡ssus?
1who¡ssus?7mo ago
I tried to do that with proxy fabric but it didn't work lol
Torrent
Torrent7mo ago
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
1who¡ssus?
1who¡ssus?7mo ago
did that ye

Did you find this page helpful?