Can I change the Minecraft server path?

The Minecraft server simply uses the current working directory to store its files. Moving the data is as easy as actually moving it and starting the server with a different working directory.

How you do that is mostly up to you. Windows shortcuts allow you to set the working directory, as do batch files or Linux shell scripts. Since you mentioned you're using Ubuntu, this simple shell script should do the trick:

#!/bin/bash
cd /home/user/Dropbox/minecraft
java -Xmx1024M -Xms1024M -jar /home/user/minecraft_server.jar &

However, as BlaXpirit pointed out, Minecraft's server files are frequently written, and Dropbox does store all versions of synced files. Depending on the popularity of your server, this might put unnecessary strain on your network and Dropbox's service. If you just want a backup, scheduling a job to periodically move the server files to your Dropbox folder might be a better idea.


Please note that this is really not recommended as server files are probably constantly updated while the server is running, and you may get a real mess in Dropbox.

Linux and ext* file system allow us to create a "symbolic link". The files can physically be in the server's folder and linked to in Dropbox folder (or vice-versa).

I'm not sure how to create symbolic links in GNOME or Unity environment, but it seems to be so:
Right click on the original folder, select Make link, move and rename the new link any way you want.


It depends on what you're trying to accomplish. Are you going to just be reading the server data, or are you planning on editing the world on another system and having it update?

If the latter, you're out of luck (unless you want to do some in-depth management, and even then Minecraft might keep copies of chunks in RAM and overwrite your updated version).

If you just want to be able to copy the files elsewhere, the easiest way may be to write a simple cronjob to automatically copy your Minecraft data every ten minutes or so:

*/10 * * * * cp -r /home/user/.minecraft /your/dropbox/folder/

You may end up wanting to tweak the 10-minute timer though, maybe to 15 or higher depending on how tolerant Dropbox is of your Minecraft shenanigans.

The other option is, as stated, to make a symbolic link:

ln -s /your/dropbox/folder ~/.minecraft

...but as was stated above, this is a bad idea for a whole bunch of reasons.