Create server from command line

I want to create server from command line (, but i can’t set profile.
What I tried: -s test create -> {create} completed successfully. -s test set profile spigot -> RuntimeError: Server must be running to perform this action. -s test start -> RuntimeError: Server is not assigned a valid profile.

Also, -s test change_sp server-port 25566 -> RuntimeError: Server must be running to perform this action.
I can’t start it (I set profile manually just to test this), because there is another server running on that port.

Is create accepting some arguments so I can put port and profile there?


I’m not sure set profile spigot was meant to work; there’s no ‘set profile’ or change_sp commands that ./ accepts.

I haven’t worked with the python codebase in a long time, but what I think should work for this is: -s test create -s test profile spigot -s test start -s test modify_config server-port 25566

Where did you get your commands from?

From wiki:

But thanks,
It is working now :smile:

Great catch, thanks for letting me know. Over time, the wiki definitely fell behind the codebase…

Also, how I can modify java_xmx and java_xms from command line? -s test modify_config java java_xmx 2048

I think this should work.

It is not working :frowning:
/usr/games/minecraft/ -s test modify_config java java_xmx 2048
Traceback (most recent call last):
File “/usr/games/minecraft/”, line 67, in
retval = getattr(instance, args.cmd)(*arguments)
File “/usr/games/minecraft/”, line 43, in wrapper
fn(self, *args, **kwargs)
File “/usr/games/minecraft/”, line 323, in modify_config
sc[section:option] = value
File “/usr/games/minecraft/”, line 146, in __ setitem __
raise KeyError(‘No section called %s’ % option.start)
KeyError: ‘No section called 2048’

Oh, then I think I just got them reversed: -s test modify_config java_xmx 2048 java

Section last, which I forgot was the case because section missing ==, section present == server.config.