Tag Archives: minecraft

How to Make a Portable Minecraft Installation

I love the idea of having a portable Minecraft installation. Syncing between machines or even giving your worlds and mod-setup to a friend. Before Minecraft’s updated launcher, the only way to change the data storage location away from “%APPDATA%\Roaming\.minecraft” was to create a .bat script and set the system’s APPDATA variable.
The updated launcher is about a year old now, but the concept of a portable installation might not be familiar to everyone. The whole process is now much less complicated and can be done mostly through the Profile settings. Here’s how it goes.

  1. Visit https://minecraft.net/download and download Minecraft.exe.
  2. Create a folder wherever you’d like your installation to go. It will be simplest if the location can be the same on any computer you go to. Using a top-level domain such as right in the C:\ drive or in Program Files would be great. If you’re doing it on a flash drive for ease of carrying it around, I suggest copying it to a hard drive while playing and back to the flash when done. Minecraft saves constantly and this will wear out a flash drive pretty fast.
  3. Move Minecraft.exe to the new folder.
  4. Now, to keep your top-level installation folder uncluttered, create a folder inside called data. This will be the replacement for the standard “.minecraft” folder.
  5. Launch Minecraft and login.
  6. Click New Profile and in the new window that pops up check the box Game Directory right below Profile Name.
  7. In the Game Directory text box, put the full path to your portable installation. (Go into your data folder and click the address bar on top to be able to copy that full path, otherwise just type it in)mcportable_settings
  8. Click save profile and that’s it!


The key to keeping this working is that Minecraft always knows where you want to save all the data. It will go looking here when trying to load, including your world saves and mods. Just make sure to remember this when transferring to a new computer.
If I’ve over-complicated anything or you have any questions please let me know in the comments!

Making a Minecraft Server Batch File

Here’s a quick demo on launching a Minecraft server in Windows using a .bat file.

  1. Right click in your folder and go to New > Text Document.
  2. Name it start_server.bat
  3. Hit Yes when windows asks if you’re sure about changing the extension.
  4. Now right click the file and hit Edit.
  5. Paste in the following text, and change it to match your situation. I’ll explain each part to better help you make the necessary changes.
  • The first bit is a call to your system’s Java installation. It needs to be in quotes because of the space in Program Files (x86). To find yours, look in either your Program Files or Program Files (x86) to find Java.
  • Next are two options that tell Java how much RAM it can use. -Xmx is the maximum, and -Xms is how much it’ll start with. You can specify in Megabytes or Gigabytes.
  • Here’s the -jar option along with the name of your .jar file. Here you can just put the name of the .jar file you want to launch as long as it’s in the same directory as your .bat script.
  • nogui tells the Minecraft server not to start the GUI part of the application. Opening the server through a script means it’ll be running in a console window. There’s no need for a GUI when you have a much better looking terminal to view.
  • PAUSE simply makes the window wait for you to “hit any key to continue…” after you “stop” the server. I like doing this out of habit in certain situations, you can take it or leave it.

By simply changing the .jar file called by this script, you can use it to launch either a vanilla server or a modified server like Forge. I’m not a Windows script pro by any means (I’m usually using Linux), but if you have any questions please feel free to ask in the comments below!