../

Installing Diablo II

└─ 2019-11-02 • Reading time: ~8 minutes
Diablo II banner

You might have heard the news: Diablo IV has been announced yesterday with a great cinematic. What better time to install Diablo III Diablo II again and have some fun while waiting for the latest iteration of the franchise?

But… it’s 2019 and it is not always easy to install a game first released back in June 2000 (yes, that’s 19 years ago. Yes, you’re old)! In this post I will show you how to install Diablo II with its extension Lord of Destruction on Windows, MacOS and Linux (Ubuntu in this case), using Wine as well as optional sandboxing using firejail! Let’s get to it…

If you are running MacOS or Windows, you’re in luck! The official game launcher already supports those platforms natively so you can install it and play straight away without extra hassle! Here are the links:

Get a License Key

First of, you will need a valid CD-Key for the game (both Diablo II and its extension LOD). You can get them on the official website for about 20 euros from Blizzard (yes, that’s a shame, the game used to cost 15.99 euros a few years ago!), or by registering your old keys if you still have the box version (which is what I did).

Get the Launcher

The second step is to download the Windows launcher of the game which we will use in conjunction with Wine to make it work on Linux. You can find the links on Blizzard’s website. Here they are if you want to save some time:

Installing Latest Wine

You could probably use the stock version of wine which ships with your Linux distribution but I always like to get the latest shiny version so here we go. If you use another distribution than Ubuntu, you can skip this section completely. From the official wiki:

If your system is 64 bit, enable 32 bit architecture (if you haven’t already):

sudo dpkg --add-architecture i386

Download and add the repository key:

wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key

Now you need to get the repository matching your release of Ubuntu. For me it was bionic (you can get yours using command lsb_release -cs), but check official instructions if that does not correspond to yours.

sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt install --install-recommends winehq-stable

Note that I could not install winehq-stable directly and had to first install one of its dependencies manually. If you encounter an error, then try to run the following command before installing winehq-stable again:

sudo apt install libasound2-plugins:i386

I am using version 4.0.2 of wine.

[Optional] Installing Firejail

Firejail has a special place in my heart. It allows to sandbox any program running on Linux using kernel capabilities (some of them you might already know from Docker world). From the official repository:

Firejail is a SUID sandbox program that reduces the risk of security breaches by restricting the running environment of untrusted applications using Linux namespaces, seccomp-bpf and Linux capabilities. It allows a process and all its descendants to have their own private view of the globally shared kernel resources, such as the network stack, process table, mount table. Firejail can work in a SELinux or AppArmor environment, and it is integrated with Linux Control Groups.

There is an extra benefit in my opinion. You can specify a different directory to be used as the ~/ (home) folder of each program you run in a sandbox instead of your real home. This is great because it allows to keep files and folders of each app nicely isolated. For example I run thunderbird, cliqz and other programs in sandboxes and assign them different homes like ~/.sandboxes/thunderbird, ~/.sandboxed/cliqz, etc. This means that I can clean-up all files for each program by simply deleting their respective folders! That’s super convenient.

Let’s get back to Diablo II! Install Firejail from your official Linux repositories (or compile it yourself if that’s your thing… that’s what I did). I am currently running version 0.9.61 but I assume this should work with other versions as well.

Firejail comes with a preset for sandboxing wine which you can find at /etc/firejail/wine.profile. That’s the one we will be using!

Preparing Wine Home Folder

Let’s now prepare the wine folder that we will use in our Firejail sandbox:

mkdir -p ~/.sandboxes/wine

Copy the two downloaders into ~/.sandboxes/wine/:

  • ~/.sandboxes/wine/Downloader_Diablo2_enUS.exe
  • ~/.sandboxes/wine/Downloader_Diablo2_Lord_of_Destruction_enUS.exe

Installing Diablo II

We can now proceed and install Diablo II base game:

firejail \
  --profile=/etc/firejail/wine.profile \
  --private=~/.sandboxes/wine \
  wine ~/Downloader_Diablo2_enUS.exe

Here are screenshots for each step of the installation process:

Press 'OK' to select default download folder.
Press 'OK' to select default download folder.
Enjoy the murloc view while downloading the game...
Enjoy the murloc view while downloading the game...
Press 'Install Diablo II'.
Press 'Install Diablo II'.
Accept license.
Accept license.
Enter you CD-Key.
Enter you CD-Key.
Press 'OK' to select default destination directory.
Press 'OK' to select default destination directory.
It's so fast that I don't know how I managed to make a screenshot!
It's so fast that I don't know how I managed to make a screenshot!

Press Back then Exit Installer. Time to install the extension!

Installing Lord of Destruction

firejail \
  --profile=/etc/firejail/wine.profile \
  --private=~/.sandboxes/wine \
  wine ~/Downloader_Diablo2_Lord_of_Destruction_enUS.exe

I will spare you all the screenshots since the procedure is identical to the base version of the game. When you are done, resist the damning temptation and exit the installer; there is one last thing we have to take care of…

Install Latest Patch

Before starting the game and finally start playing, you will want to install the latest patch for Diablo II: 1.14d. Usually it can be done by accessing Battle.net in-game but for some reason it failed in my case because of a corrupted file… Luckily, it’s possible to download and install the update manually. Get it from the following link:

Copy it into your wine home folder: ~/.sandboxes/wine/LODPatch_114d.exe. Then start the update with:

firejail \
  --profile=/etc/firejail/wine.profile \
  --private=~/.sandboxes/wine \
  wine ~/LODPatch_114d.exe

Let’s Play!

Finally, to launch the game you can use the following command:

firejail \
  --profile=/etc/firejail/wine.profile \
  --private=~/.sandboxes/wine \
  wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Diablo\ II/Diablo\ II.exe

Have fun!

There is no such thing as the 'Cow Level'.
There is no such thing as the 'Cow Level'.
Leave a comment on GitHub
28 comments
  • Just a note since I reinstalled it in this quarantine period :D After you install diablo 2 con windows pc, to play on battle.net you need to install the latest patch. This process is automatically handled by game, but you need to run as administrator to install this patch. So, install D2, then run it the first time as admin and connect to battle.net install latest patch

    HTH

  • I keep getting this error -

    Error: inaccessible profile file: /etc/firejail/wine.profile

    I am located in etc/firejail/ - I created the directory /sandboxes/wine and copied in the downloader. I navigate to the download files via terminal and run the prompt to install but get the above error.

  • GitHub avatar from user remusao remusao commented 4 years ago

    @Th3-Think3r could you maybe paste the exact commands you ran so that I can check? Also, can you check what you have in /etc/firejail as well as which version of firejail you have installed?

  • Alright I got it working - I got through my CD-key

    Now, when I click “Play Diablo” it will launch. When trying to patch through battle.net i get the following error.

    https://ibb.co/jLNHcfK

  • GitHub avatar from user remusao remusao commented 4 years ago

    @Th3-Think3r yes this is expected unfortunately and this can be solved by downloading the patch and installing manually before launching the game for the first time. There are a few more details in the last section of the article.

  • Battle Now I am getting this error - lol

    I have installed both d2 and d2lod - have them both patched up. I can play single player fine but when connecting to battlenet the game is crashing

    I really want to play this game lol - I see tons of other people posting about it crashing at Battle.net login screen but I haven’t really seen a solid fix.

    I dont want to buy windows just to play D2 lol

  • GitHub avatar from user remusao remusao commented 4 years ago

    @Th3-Think3r as far as I remember there is a way to get it working by deleting a specific file in D2 install folder. I will try to find this trick again tomorrow and update my comment.

  • I would really appreciate it. I’ve been trying to get this to work for hours. Only needing to do this because I didnt know newest iOS doesn’t work with D2 either…

  • @Th3-Think3r I’ve had this issue as well and what solved it for me is this: when launching D2 (via wine) it sort of matters which folder you’re in. An mpq file with a long name like 8F4AB75......mpg is created when you’re trying to connect to the battle.net (or maybe even earlier, I can’t recall). So before I started the game, I moved to ~/.wine/drive_c/Program Files (x86)/DiabloII/ (may be different depending on where/how you installed the game and wine - also I didn’t use firejail) and deleted the existing file. Now when I connect to battle.net a new file is created in the folder I’m in when I start diablo. Note that when you start the game from a different folder later on though, you might have trouble again. I just added an alias to .bash_aliases that switched to the folder and started the game from there`. Let me know if this helps please, I’ve stopped playing some time ago so this is from memory.

  • im using the apps wine and playonlinux. i was able to install Diablo II but trying to get the LOD i keep getting errors. it’s saying i need to download diablo 2. it sees as if its missing and its not. i was wondering if you guys could help me. if i have to delete it all and try with firejail i guess i could but it was pretty ticky getting the installers to get this far

  • joshua@AMD:~$ wine '/media/joshua/Game Disk/Games/Diablo II/Diablo II.exe'
    joshua@AMD:~$ wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    joshua@AMD:~$ wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    joshua@AMD:~$ '/home/joshua/Downloads/Downloader_Diablo2_Lord_of_Destruction_enUS.exe'
    bash: /home/joshua/Downloads/Downloader_Diablo2_Lord_of_Destruction_enUS.exe: Permission denied
    joshua@AMD:~$ wine '/home/joshua/Downloads/Downloader_Diablo2_Lord_of_Destruction_enUS.exe' 
    Could not find Wine Gecko. HTML rendering will be disabled.
    003b:err:mshtml:create_document_object Failed to init Gecko, returning CLASS_E_CLASSNOTAVAILABLE
    joshua@AMD:~$ 001f:err:appbar:appbar_wndproc couldn't open calling process
    001f:err:appbar:appbar_wndproc couldn't open calling process
    001f:err:appbar:appbar_wndproc couldn't open calling process
    001f:err:appbar:appbar_wndproc couldn't open calling process
    joshua@AMD:~$ 001f:err:appbar:appbar_wndproc couldn't open calling process
    001f:err:appbar:appbar_wndproc couldn't open calling process
    001f:err:appbar:appbar_wndproc couldn't open calling process
    001f:err:appbar:appbar_wndproc couldn't open calling process
    joshua@AMD:~$ 002b:err:d3d:wined3d_device_cleanup Device released with resources still bound.
    002b:err:d3d:wined3d_device_cleanup Leftover resource 0x42230d8 with type WINED3D_RTYPE_TEXTURE_2D (0x3).
    joshua@AMD:~$ wine '/home/joshua/Downloads/Downloader_Diablo2_Lord_of_Destruction_enUS.exe' 
    Could not find Wine Gecko. HTML rendering will be disabled.
    0009:err:mshtml:create_document_object Failed to init Gecko, returning CLASS_E_CLASSNOTAVAILABLE
    wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
    
  • GitHub avatar from user remusao remusao commented 4 years ago

    Hi @JoJohn86, I have had success in the past installing Diablo 2 using PlayOnLinux but it’s been a while. If you want to try with Wine only, you do not need to go the Firejail road (it’s more like a bonus). Can you maybe tell me which system you are working on and which version of wine you have?

  • i got it. the patch that downloads from battle.net is broken so i just flash drived the whole D2 LOD folder off my windows computer and moved it to here

  • GitHub avatar from user ghost ghost commented 4 years ago

    Hi @remusao, have you tried PlugY (https://www.youtube.com/watch?v=Ml9W6zezO_o, http://plugy.free.fr/en/index.html) with your Diablo II installation? People say this mod adds just Quality of Life features and that is so good they don’t want to go back to vanilla. What do you think?

  • GitHub avatar from user remusao remusao commented 4 years ago

    Hi @frbrz, I did not try Plugy personally but I heard good things about it as well. I usually prefer playing the vanilla Diablo 2 experience, though. Probably out of nostalgia :)

  • GitHub avatar from user ghost ghost commented 4 years ago

    I read somewhere that, if you run plugy inside the same wine bottle than diablo, it will work. I really don’t understand much about this topic. This link has some information, https://forum.winehq.org/viewtopic.php?t=30214&p=114654 Do you think is transferable to your instructions somehow?

  • GitHub avatar from user remusao remusao commented 4 years ago

    In theory it should work. But as far as I can see Plugy does not support the latest Diablo 2 patch. On the official page the latest release is compatible with Diablo 2 version 1.13, but the latest Diabloe 2 patch is 1.14. So one way to make it work would be to install Diablo 2 in Wine as usual, but only install updates (probably manually) up to 1.13. Then install Plugy in the same wine environment. I did not try but I assume it should work. Also keep in mind that you might not be able to play online either (so only solo mode or LAN).

  • GitHub avatar from user ghost ghost commented 4 years ago

    Uh… that’s very complicated for my abilities. I will need to run vanilla or search for another option. Thank you.

  • GitHub avatar from user remusao remusao commented 4 years ago

    @frbrz Were you able to install the base Diablo 2 game following the instructions in this article? Is so, I could try to add a dedicated section to install Plugy with similarly detailed explanations. Would that be helpful?

  • GitHub avatar from user ghost ghost commented 4 years ago

    I installed Diablo 2 using Wine 5.0. Wine was installed using your instructions but I skipped Firejail, because I didn’t see an advantage for gaming with legitimate files. The game ran perfectly. But I wanted to play the game in a higher resolution resolution, 800x600 is too low. I ran Median-XL, which includes higher resolutions, in a computer with Windows some days later because in Linux it’s a nightmare. It’s cool, but some changes to the interface are not. I know it sounds spoiled. People using higher resolutions are using D2 v1.14 and a Glide wrapper, but is a lot of work and I don’t have v1.14 files (https://www.youtube.com/watch?v=6fV7boMaM-s). I gave up. If you can run Median with your instructions it would be nice. I don’t know.

  • GitHub avatar from user ghost ghost commented 4 years ago

    i tried to do this using wine to run the .exe file from battle.net but when i click “install diablo 2” on the installer, nothing happens

  • GitHub avatar from user remusao remusao commented 4 years ago

    @degenerate36 Can you maybe share the operating system you are using as well as version of wine? Also maybe the exact command you ran locally and any stack trace you might have in the terminal?

  • GitHub avatar from user ghost ghost commented 4 years ago

    wine-3.6, Ubuntu 18.04 LTS(Bionic Beaver), i ran the command “wine Diablo.exe” I changed the name of the .exe file to Diablo for practicality (there’s probably some big thing im missing or don’t even know about)

  • @karsten-cliqz I tried to delete the file and ran from the correct folder but im still hanging at logging in to battle.net.

  • @Th3-Think3r I’ve had this issue as well and what solved it for me is this: when launching D2 (via wine) it sort of matters which folder you’re in. An mpq file with a long name like 8F4AB75......mpg is created when you’re trying to connect to the battle.net (or maybe even earlier, I can’t recall). So before I started the game, I moved to ~/.wine/drive_c/Program Files (x86)/DiabloII/ (may be different depending on where/how you installed the game and wine - also I didn’t use firejail) and deleted the existing file. Now when I connect to battle.net a new file is created in the folder I’m in when I start diablo. Note that when you start the game from a different folder later on though, you might have trouble again. I just added an alias to .bash_aliases that switched to the folder and started the game from there`. Let me know if this helps please, I’ve stopped playing some time ago so this is from memory.

    I have tried this again with not luck, do you know if you need to delete the original .mpg file or just the file in the folder you are launching from?

  • Hi everyone, I got a new error.

    firejail \
      --profile=/etc/firejail/wine.profile \
      --private=~/.sandboxes/wine \
      wine ~/Downloader_Diablo2_enUS.exe
    Reading profile /etc/firejail/wine.profile
    Reading profile /etc/firejail/disable-common.inc
    Reading profile /etc/firejail/disable-devel.inc
    Reading profile /etc/firejail/disable-interpreters.inc
    Reading profile /etc/firejail/disable-passwdmgr.inc
    Reading profile /etc/firejail/disable-programs.inc
    Warning: networking feature is disabled in Firejail configuration file
    Parent pid 9452, child pid 9453
    Child process initialized in 77.84 ms
    0009:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)
    0009:err:ole:CoGetClassObject class {cacaf262-9370-4615-a13b-9f5539da4c0a} not registered
    0009:err:ole:CoGetClassObject no class object {cacaf262-9370-4615-a13b-9f5539da4c0a} could be created for context 0x1
    0009:err:olepicture:OleLoadPicture IPersistStream_Load failed
    0017:err:wininet:open_http_connection create_netconn failed: 12029
    
    http error code = 12029
    

    Any ideas on how to proceed? Running on PopOS! 20.04 focal. I’m gonna try to figure out how to open the networking features to see if it solves this.

  • Not sure why, I had major issues with Battle.net - single player worked great. Did some hunting around (2+ hours) and this seemed to fix it: sudo apt-get install winehq-staging If you are having similar issues (everything works but crashes when you click battle.net) might be worth a try.

  • GitHub avatar from user m0h4x m0h4x commented 2 years ago

    Hi there, i always, for some years, used this method to install D2 LoD on Linuxes: https://www.youtube.com/watch?v=5moHwhTYGho but since the specter/meltdown and/or death of Linux Mint KDE edition, and/or booting some of the 32bit libs on modern linuxes it doesnt work anymore. Can only use it on outdated Linux Mint 18. Ill have to take a look at your method. Or use ReactOS. Since after i got fiber connection in my apartment i cant use/connect to internet / firefox/apt/battle.net on this system anymore. Tho ping works. And on a smartphone connection works too. So i dont know will have to check your instructions out. Cheers. :)