I'm writing a bash script to manage a vanilla server install on my eeePC. Right now I've been using http://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar to get the minecraft_server jar. It seems to only be getting the 1.5.2 server version instead of the 1.6.2 server version.

Any ideas as to how I can grab the latest stable version through a similar url?

  • 6
    Mojang is shifting their infrastructure to allow multiple versions to be easily accessible in the new launcher, so it looks like their URL scheme is changing to support that while leaving the pre-1.6 URLs intact. You might have to parse an update-tracking URL now to find the latest stable release URL. (All just educated guessing until I can get back to my install and look at what the new launcher is doing to pull client updates and see if that translates to server jar URLs.) Commented Jul 8, 2013 at 18:30
  • Thanks for the info! I've been doing some poking around on my own, but nothing to show for it yet. I'll let you know if I find anything out. Commented Jul 8, 2013 at 22:22

14 Answers 14


Full Instructions

I recently decompiled the launcher for this very reason, to manage automatic updates for my server wrapper with their new naming convention.

I found the file they use to work out what the current version is and the URL to it:


This file includes the following (as of this answer):

"latest": {
    "snapshot": "1.9-pre3",
    "release": "1.8.9"
"versions": [
        "id": "1.13.1",
        "type": "release",
        "url": "https://launchermeta.mojang.com/v1/packages/c0f1e6239a16681ffbfa68fc469038643304d5a9/1.13.1.json",
        "time": "2018-08-30T09:49:34+00:00",
        "releaseTime": "2018-08-22T14:03:42+00:00"

That file also has a "versions" array. Loop through this to find the version you are looking for in the id field. It is also usually the first entry in this array, so you could address it versions[0]. Grab the url value and fetch that file which contains the following useful key:

"downloads": {
    "client": {
        "sha1": "8de235e5ec3a7fce168056ea395d21cbdec18d7c",
        "size": 16088559,
        "url": "https://launcher.mojang.com/v1/objects/8de235e5ec3a7fce168056ea395d21cbdec18d7c/client.jar"
    "server": {
        "sha1": "fe123682e9cb30031eae351764f653500b7396c9",
        "size": 33832589,
        "url": "https://launcher.mojang.com/v1/objects/fe123682e9cb30031eae351764f653500b7396c9/server.jar"

Therefore, the URL you need is contained in downloads.server.url.


Outdated instructions - for posterity only

Which you can then use to extrapolate the latest version for release and snapshots using this scheme:

https://s3.amazonaws.com/Minecraft.Download/versions/" + Ver + "/minecraft_server." + Ver + ".jar

Using this method you don't need to download the jar/exe file every time, just the json file and then if it's changed, you can grab the appropriate jar.

  • 1
    +64 for best possible answer! Commented Jul 10, 2013 at 17:32
  • 1
    This is exactly the sort of thing I expected to exist. Good job! Commented Jul 10, 2013 at 18:58
  • EXACTLY what I was looking for, thank you so much! Commented Jul 10, 2013 at 21:05
  • ERROR 403: Forbidden Commented Aug 29, 2018 at 17:02
  • 1
    @AaronFranke looks like it's recently changed and is somewhat more involved. I'll try and amend the answer. Commented Aug 30, 2018 at 14:34

You can use jsawk to pull the latest jar version number from the Minecraft version JSON:

VER=`curl -s https://launchermeta.mojang.com/mc/game/version_manifest.json | jsawk -n 'out(this.latest.release)'`
wget https://s3.amazonaws.com/Minecraft.Download/versions/$VER/minecraft_server.$VER.jar


  • 1
    What's SpiderMonkey required for? Commented Jul 11, 2013 at 3:42
  • 1
    jsawk uses SpiderMonkey (js interpreter) - here's more info: github.com/micha/jsawk
    – Jason Cox
    Commented Jul 11, 2013 at 3:52
  • jsawk looks cool, where can i get this for windows ?
    – Radon8472
    Commented Apr 7, 2017 at 8:51

I'll even throw my hat into the ring! Very similar to up above, with a few extras.


loc=$([[ -n $1 ]] && echo $1 || echo "/tmp/minecraft_server.jar")

if [[ -a $loc ]]; then
        echo "$loc exists -- moving to ${loc}.old"
        mv $loc ${loc}.old

echo "Grabbing minecraft download page..."

curl $downloadurl > $tmpfile

echo "Getting download URL for minecraft server..."

serverurl=`egrep -io 'https.*versions\/(.*)\/minecraft_server.\1.jar' $tmpfile`

echo "URL = "$serverurl

echo "Downloading server jar..."

wget -q -O $loc $serverurl



Here is a simple, lightweight way to get it in two lines of python:

from requests import get
open("minecraft_server.jar", "wb").write(get(get(get("https://launchermeta.mojang.com/mc/game/version_manifest.json").json()["versions"][0]["url"]).json()["downloads"]["server"]["url"]).content)
  1. Gets the newest version from mojang manifest
  2. Gets the version data from that request
  3. Gets the server download url from that request
  4. Writes to file called "minecraft_server.jar"
  • requests is preinstalled with Python 3 so there are no packages you have to download. Just paste into a python file (___.py) and run it.
    – Foster
    Commented Oct 25, 2020 at 19:14

I have a server setup which updates every night with a webget.exe command earlier on. The change got me to make a program that scrapes the download page after a *server.exe and downloads it as minecraft_server.exe.

I have modified it to take in a param "jar" so it gets *server.jar instead and downloads it as minecraft_server.jar.

The zipped exe is here: http://halsvik.net/downloads/GetLatestMinecraftServer.zip

If you download the program, run it without any params: GetLatestMinecraftServer.exe

If you want the jar server file instead use: GetLatestMinecraftServer.exe jar

Source code is this:

 static void Main(string[] args)
            var ext = ".exe";
            if (args.Length > 0)
                ext = "." + args[0];

            var wc = new System.Net.WebClient();
            var url = "http://minecraft.net/download";
            var data = wc.DownloadData(url);
            var page = Encoding.UTF8.GetString(data);
            var links = Misc.GetStringsBetween(page, "<a href=\"", "\""); //Custom method to get matches

            bool match = false;
            foreach (var item in links)
                if (item.ToLower().Contains("server") && item.ToLower().Contains(ext))
                    var filename = "minecraft_server" +ext;
                    var fn = Path.GetFullPath(filename);
                    while (File.Exists(filename + ".old")) File.Delete(filename + ".old");
                    if (File.Exists(fn)) File.Move(fn, fn + ".old");

                        var comp = false;
                        wc.DownloadProgressChanged += (o, e) =>
                            Console.Write("#"); //Indicate something is downloading
                        wc.DownloadFileCompleted += (o, e) =>
                            comp = true;
                        wc.DownloadFileAsync(new Uri(item), filename);

                        //Wait for download to complete
                        while (!comp)
                            Console.Write("."); //Indicate time is going

                    catch (Exception ex)
                        Console.WriteLine("Download of " + item + " failed. " +ex.Message);
                    Console.WriteLine("Download OK");
                    match = true;

            if (!match)
                Console.WriteLine("Could not find minecraft server on http://minecraft.net/download");
        catch (Exception ex)
            Console.WriteLine("Something failed. " + ex.ToString());

  • Unfortunately I'm running my server on a Linux box, but I've decided to approach it with a similar solution. Thanks so much for taking the time to write this up! Commented Jul 10, 2013 at 2:25

here's my horrible sed version.

less correct than Jason's version, above. but fewer dependencies.


wget -qN  https://launchermeta.mojang.com/mc/game/version_manifest.json
MCVER=`sed -n -e '/\"latest\"/,/}/ s/.*\"snapshot\": \"\([^\"]*\)\".*/\1/p' < version_manifest.json`

wget -N https://s3.amazonaws.com/Minecraft.Download/versions/$MCVER/minecraft_server.$MCVER.jar
  • This is the type of script I ended up writing! Thanks for taking the time to add this to my question, it's really useful. Commented Aug 20, 2013 at 12:02

For those looking at this, I've also found a way using grep instead of sed to pull out the version using the following:

grep -oP "\"release\":\"\K\d{1,2}\.\d{1,2}\.\d{1,2}" version_manifest.json

The file is pulled from the examples above.


Personally I found the using the above grep command a tad bit cleaner.


The following bash script uses jq & curl to:

  • download the manifest versions file
  • extract the url of the latest manifest
  • download the latest manifest
  • extract the url of the server jar
  • download the server.jar to minecraft_server.$version.jar
  • symbolically link server.jar to minecraft_server.$version.jar

Use it in combination with a minecraft start script that uses the server.jar symbolic link.

#!/usr/bin/env bash
set -o errexit

declare -r version_manifest_url="\
declare -r tmp="/tmp/version_manifest.json"

# Find download URL of latest release.
latest_version=$(curl -Ss -o "$tmp" "$version_manifest_url" \
    && jq .latest.release -r "$tmp")
latest_manifest_url=$(cat "$tmp" | jq -r ".versions[] \
    | select(contains({type: \"release\", id: \"$latest_version\"})) \
    | .url")

# Only download latest version if target filename does not exist.
declare -r manifest="/tmp/manifest.$latest_version.json"
curl -Ss -o "$manifest" "$latest_manifest_url"

declare -r jar_url=$(jq -r ".downloads.server.url" "$manifest")

echo "latest version: $latest_version"
echo "manifest url: $latest_manifest_url"
echo "download url: $jar_url"

declare -r jar="minecraft_server.$latest_version.jar"
curl -Ss -o "$jar" "$jar_url"

# Symbolically server.jar link to the latest version.
declare -r symlink="server.jar"
rm -f "$symlink"
ln -s "$jar" "$symlink"


My 50ct to this old thread. My objective:

  • avoid dependancies
  • keep it simple

My 3 lines to download the latest snapshot:

MC_VERSION_URLS=$(curl -s https://launchermeta.mojang.com/mc/game/version_manifest.json | python -c 'import json,sys,base64;obj=json.load(sys.stdin); print obj["versions"][0]["url"]') 

MC_LATEST_SNAPSHOT=$(curl -s $MC_VERSION_URLS | python -c 'import json,sys,base64;obj=json.load(sys.stdin); print obj["downloads"]["server"]["url"]')                         


This is my stab at it.


#Clean up old files

rm /minecraft/temp/*

# Get the version_manifest file from Mojang

wget -P /minecraft/temp https://launchermeta.mojang.com/mc/game/version_manifest.json

#Parse the version and version.json files into variables

URL=$(jq -r '.versions[0].url' /minecraft/temp/version_manifest.json)
VER=$(jq -r '.versions[0].id' /minecraft/temp/version_manifest.json)

#Get the version specific json file to parse

wget -P /minecraft/temp "$URL"

#Add .json on the end of the version to use to parse the json file


#Parse the version.json file to get server download url

SERVERURL=$(jq -r '.downloads.server.url' /minecraft/temp/$VER2)

#Download the server.jar file

wget -P /minecraft/temp $SERVERURL

#Backup the old minecraft_server.jar file

mv /minecraft/minecraft_server.jar /minecraft/minecraft_server.jar.old

#Move the downloaded server file to the minecraft_server.jar file in minecraft directory

mv /minecraft/temp/server.jar /minecraft/minecraft_server.jar

echo "Minecraft Upgraded to version $VER"

This works for bedrock, modify for Java Ed:

url=$(curl https://www.minecraft.net/en-us/download/server/bedrock/ | grep "linux/bedrock-server-" | egrep -o 'https?://[^" ]+')

echo $url 

It will output the url to the latest version.


Based off of the link in Richard Benson's answer, I wrote a bash oneliner that will parse the json and download the latest server.jar file.

Requires: jq & curl

echo 'curl -o server.jar $(jq -r ".downloads.server.url" <<< $(curl -s $(curl -s https://launchermeta.mojang.com/mc/game/version_manifest.json | jq -r ".versions[1].url")))' | bash

It's definitely ugly, but the following is vanilla node code, all standard library.

const http = require("https");

const version_manifest_url =

  .get(version_manifest_url, (outer_response) => {
    let outer_body = "";
    outer_response.on("data", (chunk) => {
      outer_body += chunk;
    outer_response.on("end", () => {
      try {
        let json = JSON.parse(outer_body);
        const target_version_manifest_url = json.versions[0].url;
          .get(target_version_manifest_url, (inner_response) => {
            let inner_body = "";
            inner_response.on("data", (chunk) => {
              inner_body += chunk;

            inner_response.on("end", () => {
              try {
                let json = JSON.parse(inner_body);
              } catch (error) {
          .on("error", (error) => {
      } catch (error) {
  .on("error", (error) => {

Took the brilliant answer from Richard Benson and ran wild. https://github.com/sc-perth/BashScripts/blob/master/minecraft_updater.sh Tested working on my DigitalOcean Ubuntu 16.04 instance. Thanks Richard!

Script will, by default, check to see if you are running the latest version, and let you know. It will also download it if you specify the -d|--download argument. It will also install the update, if you modify the script to fit your environment & enable this feature. It will also do the same thing for any version you specify, after validating the version. Does not work for snapshots, only for releases.


jq, wget These might need installed, the rest you probably have.

bash, (e)grep, basename, dirname, chown, chmod, tar w/ gzip, find, printf

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .