Running a mine craft server
(SOLVED)
Instead of placing a folder "MineCraft" into the user minecraft I just moved the files from "MineCraft" into "minecraft" and it now works however if anyone could tell me why the other way did not work I would like to know :)
Sorry for such a simple question I am very new and just cant figure this out any help is greatly appreciated I am trying to switch over a mine craft server that I was running on my local pc I got all of the files on the server and followed the mine craft guide in the documentation however I am stuck at the server start I run the file they said to create to run the server
"
!/bin/sh
BINDIR=$(dirname "$(readlink -fn "$0")")
cd "$BINDIR"
java -Xms1024M -Xmx1536M -jar server.jar -o true
"
and it keeps throwing errors no matter what I do
here are the errors it outputs
": not foundraft/MineCraft/StartMCServer.sh: 1: /home/minecraft/MineCraft/StartMCServer.sh:
/home/minecraft/MineCraft/StartMCServer.sh: 4: cd: can't cd to /home/minecraft/MineCraft
: not foundraft/MineCraft/StartMCServer.sh: 5: /home/minecraft/MineCraft/StartMCServer.sh:
Error: Unable to access jarfile server.jar
[screen is terminating]
"
(I did change the jar files name to server.jar it was working on my local pc though so I do not think that's the issue)
1 Reply
There's 2 things you'll want to check here:
That you are downloading the .jar file while logged in as the 'minecraft' user. This ensures that the 'minecraft' user has the appropriate permissions on the file, but this can be changed after the fact.
That you have changed the name of the jar file within the mincraft startup script, /home/minecraft/run.sh
Since you mentioned you renamed this file to 'server.jar', you'll want to change the last line of your run.sh script to the following:
java -Xms1024M -Xmx1536M -jar server.jar -o true