Allow Multiple Anki Instances with Separate -b Data Folders

I would like to run multiple Anki instances with separate data folders using the officially supported -b option.

For example:

/Applications/Anki.app/Contents/MacOS/Anki -b /Users/ighor/Downloads/323423423

This works correctly for separating the Anki data.

However, after recent updates, Anki no longer allows another instance to run at the same time. Even when each instance uses a completely separate base folder, launching the second instance is blocked.

Is there currently a command-line option or another supported way to allow multiple Anki instances when each one uses a different -b path?

If not, could this behavior please be reconsidered? When each instance has its own separate base folder and database, I would not expect one instance to lock out another unrelated instance.

That would help to fix this Cannot open simultaneous instances of Anki · Issue #27 · JulyIghor/Parall · GitHub

This has always been the behavior on all platforms (as far as I remember). I’m not sure how the bundle ID change is preventing Parall from bypassing that? Here’s the old info.plist: anki/qt/launcher/mac/Info.plist at 8ea145eb784588d2d4790851d7d51c2ac1ef824f · ankitects/anki · GitHub

previously it was /Applications/Anki.app/Contents/MacOS/launcher and now the binary is /Applications/Anki.app/Contents/MacOS/Anki
also bundle id changed net.ankiweb.launcher to net.ankiweb.anki

Anyway, you can reproduce it by opening two terminal windows, run in each one

/Applications/Anki.app/Contents/MacOS/Anki -b ~/Downloads/test1

/Applications/Anki.app/Contents/MacOS/Anki -b ~/Downloads/test2

I expect both instances to work, but the second instance preventing that. Is there any fix for that?

I don’t know what the previous behavior was or what the correct behavior is supposed to be. However, I note that I am able to reproduce the reported behavior by trying to launch 2 instances of Anki with different data folders.
/Applications/Anki.app/Contents/MacOS/Anki -b </path/to/dir1>
/Applications/Anki.app/Contents/MacOS/Anki -b </path/to/dir2>

The 2nd attempt results in a Already running; reusing existing instance message and no separate instance launched.

OP, are you saying that you were previously able to successfully run 2 Anki instances at the same time? What Anki version were you using when you saw that behavior?

I can’t say for sure. I tested it a long time ago. Sorry for taking your attention in this direction.

Most importantly, I would like those two commands to work at the same time, as Parall.app user requested that to happen. Can you please implement such a fix or argument which makes it possible?

I don’t think running multiple instances of the app was ever intentionally supported. If it worked during the brief time that we had that launcher-installer process, that was a coincidence. And we’re definitely not going back to that, because it made even just installing Anki more difficult or impossible for some other groups of users.

I can’t think of a situation where a user would need multiple instances of Anki open at the same time. They certainly can’t study in multiple windows at the same time. And any editing or management tasks could probably be better accomplished in another way.

I think before the devs would consider making a change that would allow this (if it’s even possible) – we’d need to hear from your user what their use case is for multiple instances, and why the current functionality is insufficient for it.

I see the following situations where it could be helpful:

  1. I have a second profile with an old deck and I have my main profile with the current deck. If I want to browse both decks and compare them side by side, then two instances could be helpful. I might do that e.g. to enter the notes from my old profile to the new one selectively, but editing the notes during the process.
  2. Same as above for cases where one restored an old backup into a different profile.
  3. Multiple instances help if I want to compare different card styles. E.g. on monitor 1 I could have design 1 and on monitor 2 I’d have design 2. That is much easier than having to screenshot the first design idea, then change it so that I have the second design idea, then change it back again in case I liked the first idea better. And screenshots don’t work well for interactive designs.
  4. Sometimes I’m currently editing my cards or I’m doing some other learning related task and don’t want to close the anki instance / windows just yet; but I’d like to test something, e.g. a javascript solution for a user here on the forums – for that, I’d love open a second profile. Multiple instances would help here, too.

Multiple instances might be more useful to power users than normal users. Personally on linux, at least 90 % of apps I use support multi-instances out of the box. It’s odd and feels somewhat restricting if multi-instances aren’t supported; and as OP pointed out, there should be no technical issue in this case (separate databases; ui can easily be duplicated in new instances with code).