Minecraft Wiki
Advertisement
Lava Bucket
Script Warning 
Since this is a wiki and anyone may modify any page at any time, This may cause the script to be rewritten by a malicious user into a dangerous script. it is suggested that you do not actually use this script but instead simply use it as a guideline for writing your own.

This tutorial explains how to run Minecraft on a portable (Thumb, Flash, or USB) drive . This is useful if you want to keep your game data (worlds, saves data, resource packs, server list, etc.) when switching computers, as the game data will stay on the portable drive.

Prerequisites

You will need:

  • A portable (Thumb/Flash/USB) drive with at least 512MB of space. You may need more space as Minecraft saves more data to your portable drive.
  • A computer that runs Windows, OS X, or any Linux distribution that meets the Minecraft system requirements and has Java installed.

Procedures

Instructions for Windows

Preparation

As Minecraft requires more than the single one file to be installed, we will collect all the files needed to run and sort them onto the portable drive for easy access. Please note that if you do not do this correctly, Minecraft may crash or fail to start. All folder and file names in the Windows guide are case sensitive.

  • Insert your portable drive into your computer, and open it.
  • Create a folder, name it Minecraft Portable (or any name you choose) and enter the folder.
  • In that folder, create two new folders and name them Launcher and Data
    • Note: It is strongly recommended to use the exact names as outlined in this tutorial to get the best results.
    • There are now three folders on the portable drive, Launcher and Data, both within Minecraft Portable.

Launcher

Add the launcher/client to the portable drive:

  • Download the Minecraft launcher.
    • You can download it from this direct link or by visiting the Minecraft Downloads page.
    • Make sure you use the "Minecraft for Windows (alternative)" version. This can be found by clicking on "Show all platforms" on the page.
  • Copy the Minecraft.exe to the Launcher folder that you have created on the portable drive.

Data Files

This section will guide you on copying your game data (worlds, saves data, resource packs, server list, etc.) onto the portable drive. If you do not want to copy your game data, you may skip this section.

The .minecraft folder contains all of your current game data.

  • Press ⊞ Windows + R
    • Enter %APPDATA% and click OK.
  • Locate your .minecraft folder and copy it
  • Copy the .minecraft folder and paste it into the Data folder

Setting Up

Now that all the data files are there, we need to tell Windows to point Minecraft to the files on the portable drive. To do this, we will create a batch file.

  • Open Notepad or a similar text editor.
    • Press ⊞ Windows + R
    • Enter notepad and click OK.
  • Copy and paste the following into the text editor.:
set APPDATA=%CD%\Data
Launcher\Minecraft.exe
  • If you would like to use Minecraft.jar, copy and paste this instead:
set APPDATA=%CD%\Data
java -jar Launcher\Minecraft.jar
  • Now click File > Save As ...
  • Navigate into your Minecraft Portable folder (not Data).
  • Name this file "StartMinecraft.bat"
    • Note: Make sure to include the quotation marks (""), or else Notepad will try correct it to StartMinecraft.bat.txt and it will not work.

Playing

  • Once you have completed Setting Up, you can now launch Minecraft portable by running the StartMinecraft.bat file you have created.
  • When the launcher appears, click Play to begin.

Instructions for Linux

Warning 
The following instructions may require administrative or superuser privileges, and can possibly cause damage to your system. Proceed with caution.

Assume that the portable drive is at /dev/sdb1 and that Minecraft is installed at ~/games/.minecraft.

  • Note: You may need to use a different directory name depending on your distribution and set-up.

Run the following in a terminal:

  • Note: The following commands require may require superuser privileges. Make sure you are running these as root or are using sudo.
  • Note: Text following the # symbol are comments, and can be omitted for that line.
umount /dev/sdb1
mkdir /media/minecraft
mount /dev/sdb1 /media/minecraft
mkdir /media/minecraft/games # If there is a folder called games in your portable drive, skip this command
cp - rn ~/games/.minecraft /media/minecraft/ # This might take a while
cd
umount /dev/sdb1
rm /media/minecraft # Check to make sure that your portable drive in not mounted!

After that, to launch Minecraft, enter the following in the terminal with superuser privileges.

umount /dev/sdb1
mkdir ~/games # If there is a folder called games in your home directory, skip this command
mount /dev/sdb1 ~/games # You will not be able to play any games that are saved in the ~/games directory

Run the Minecraft launcher to start playing.

Instructions for OS X

Notice 
This guide does not make Minecraft truly portable, as it requires you to copy the game data from and to the portable drive each time you play.

Setting Up

    • Locate your Minecraft files. Press Command+Shift+G while in finder and then paste ~/Library/application support/minecraft into the dialog.
    • Copy that minecraft folder in your application support folder.
    • Insert in your portable drive and make 2 folders in it:
      • data and launcher
    • Paste your minecraft folder into the "data" folder in the portable drive.
    • Drag your launcher into the "launcher" folder
    • Remove your portable drive

Playing

Once you are done setting up, you can test if your Minecraft can start on another Mac.

    • Insert your portable drive into another Mac to test
    • Open the launcher folder and move the Minecraft launcher into your Applications folder.
    • Double click the launcher to run it. Then after Minecraft loads, exit it.
    • Again, go to Users/USERNAME/Library/Application Support
    • In "Application Support", delete the minecraft folder.
    • Move the minecraft folder in your data folder on your portable drive to the desktop.
    • Then drag it from your desktop into application support.
    • Run Minecraft again.

Additional Notes

  • To install resource packs or mods onto the portable drive, use the .minecraft folder of that portable drive.
  • For Windows, if you would like to have multiple .minecraft ("Data") folders, say, in order to quickly switch to an older version of Minecraft, or perhaps play with mods, make multiple "Data" folders, with different names ("1.6.4", "Modded", and so forth) and a batch file for each one. You may have to make a second "Drive" folder if you want to use 1.5.2 or before, as that uses an older launcher. This is not required.

Source

If you have any trouble understanding, the original guide can be found in this thread.


Alternative Methods

Cryshal's Method

Doesn't work, minecraft still runs from the appdata folder, Minecraft Profile Manager is useless, and java will not run from the flash drive.

What you need:

  • A flash drive. (I'd suggest around 2GB, but varies depending on how many worlds/texture packs you have)
  • Windows


  • First, create a folder named, say, "Flash MC". Then, go on over to get jPortable which lets you run Java right on your flash drive, without it being installed on the computer.
  • You will want to install that onto your flash drive in a directory like \Flash MC\jPortable.
  • Then, go to Minecraft Profile Manager's thread, and download it.
  • Put it into your Portable MC folder. Follow the instructions. (Put minecraft.exe into the same folder that it is in)
  • You should now be able to launch MPM, make a profile and download all the needed Minecraft files to play.

Note

  • MPM runs using JAVA, meaning you must have java running in order for it to work.
  • Computers that are running windows should work just fine, unless they haven't been using Microsoft update.

I hope this helps you!

HiWiki's Method

WARNING 
Please follow the steps CAREFULLY to avoid minecraft crashing!
This part was made by HiWiki!

WARNING - Do it in your own risk!
Only Works in WINDOWS!

  • In this method you will need:
    • USB (Minimum Space is 2.5GB or more if you have mods and/or texturepacks (You will also need Additional space for worlds))
    • Notepad
    • Minecraft Client
    • And .minecraft folder

Steps

  • First things first! You need to make two folders named bin and data
  • Then you place minecraft client inside bin folder
    • If you use a jar (or anything else that run minecraft) will still be placed in the bin folder
  • But the data of minecraft isn't in the data folder yet,
    • So you will need to Press ⊞ Windows + R to open run and type in the dialog box %appdata% then copy .minecraft folder (Also include other folders that also included in minecraft such as .aether)
      • Select those folders then press Ctrl + C (or Ctrl + X if you want to move the files rather than copy it)
  • Then after that Press ⊞ Windows + R to open run again and type notepad then paste the following code in it:
SET APPDATA=%CD%\data
bin\minecraft.exe
  • But if you use a Jar, put this instead:
SET APPDATA=%CD%\data
bin\minecraft.jar
  • And if you use a Jar/Exe with a different name such as Minecraft-launcher put this
SET APPDATA=%CD%\data
bin\<name of launcher>.<jar/exe>
  • Then you are all done!

Note!

  • You will need Java for this, but if you also want java in your Flash/Thumb/USB drive, see the section titled Add Portable Java below.
  • Any data you have in your .minecraft in appdata will also be in your Flash/Thumb/USB drive

Add Portable Java Method

You will need an extra 0.5 GB in your Drive for this to work!

  • Now you have done the above
  • Time to add portable java! (YAY!)
  • 1st, Click this link
  • Then on the page that redirected you, click Download Now or this link
  • Then open PortableApps.com_Platform_Setup_11.2.exe then wait until you see the add apps section
    • Make sure you place the setup in the Flash/Thumb/USB drive!
  • Then in utilities find and tick the boxes jPortable,jPortable Launcher,jPortable Browser switch then press install
  • Then wait for it to install then after that, your done!

How to open jPortable

  • First, find the folder PortableApps in your Flash/Thumb/USB drive
  • Then double click start, Then press jPortable Launcher
  • A window will open, then find the jar (Don't worry if it shows jar can be opened only change it to all files then find your exe)
  • Then after that press open then your minecraft will open

Issues and how to fix them

  • The minecraft directory is not there, if that happens then press edit profile then find and locate your data folder in file explorer then right click it then press properties
    • Also in the edit profile window tick the Game directory box
    • Now a window should open, so you will Select the text by dragging in the Location Line then paste it in the Game directory box then include this \.minecraft or paste it in the Game directory box
  • Then you are done!

Credits

This part was made by HiWiki! If there is information that is not here, then I did not made it, then also PM so I can restore it If there's any problem PM me and i'll help you (But not all the time) The original source can be found in this thread.

I hope this part helps you!

Changing the launcher file to use an autorun.inf

If you are using an autorun.inf instead of using

set APPDATA=%CD%\data
bin\minecraft.exe

or

set APPDATA=%CD%\data
bin\minecraft.jar

change the file to this:

set APPDATA="Minecraft portable\data"
cd "Minecraft portable\drive\"
Minecraft.jar

Video Tutorial

A video tutorial showing the step-by-step procedure on how to make Minecraft portable and run it from a USB thumb drive without Java installed


Advertisement