Skip to content

Instantly share code, notes, and snippets.

Last active June 25, 2024 04:10
Show Gist options
  • Save Nachtalb/ec590dc974f6ba4674972d4937b230be to your computer and use it in GitHub Desktop.
Save Nachtalb/ec590dc974f6ba4674972d4937b230be to your computer and use it in GitHub Desktop.
Add multiple accounts in Telegram Desktop [Linux | MacOSX | Windows]

How to add multiple accounts to Telegram Desktop

‼️‼️ As of version 2.1.14 Telegram Desktop supports up to 3 multiple accounts inbuilt ‼️‼️

If you have more you can still use this method (3 accounts per instance)

⚠ This guide is for the app available here: not the one in the Mac/Windows App Store. For the Mac App Store app this should work:

ATM of writing this, there is no way inside the Telegram Client to switch accounts (event though this feature exists in the offical mobile clients and there is a long running issue here: telegramdesktop/tdesktop#4261).

The Official Telegram Desktop client however has the feature to set the working directory with a command line argument -workdir. This enables the use of multiple accounts.

In this guide I will show you a way to use this feature on MacOSX, Linux and Windows. We will be working with the -workdir argument to create multiple instances for each Telegram account.

❗ Replace {{...}} thing with what is written in there. So eg. for me and my TG account @Nachtalb I replace {{MyUsername}} with Nachtalb.

  • Create a folder here ~/.local/share/TelegramDesktop/{{MyUsername}}
  • Create a new .desktop file here ~/.local/share/applications/telegramdesktop-{{myusername}}.desktop.
  • Put in your data in here

⚠️ In this example the Telegram binary resides in /opt/Telegram/Telegrm. This might be different in your case. If so then you have to adjust the path to the binary on the lines TryExec and Exec. ⚠️

[Desktop Entry]
Name=Telegram {{MyUsername}}
Comment=Official desktop version of Telegram messaging service
Exec=/opt/Telegram/Telegram -workdir /home/{{your_user}}/.local/share/TelegramDesktop/{{MyUsername}} -- %u
  • Create a folder here: ~/.local/share/TelegramDesktop/{{MyUsername}}

  • Open Automator

  • Create a new Application
  • Add an apple script by drag & drop from the left-hand side

  • Add the following text:

do shell script "Applications/ -workdir '/Users/{{your_user}}/.local/share/TelegramDesktop/{{MyUsername}}'"

  • Save to /Applications/Telegram {{MyUsername}}.app
  • Now lastly if you want the have the same icon for your new app, open the file info of both apps (the original telegram and yours) with CMD + I and click on the icon in the top left of the original application. Hit copy CMD + C, click on yours and hit past CMD + V.
  • Create a folder here: C:\Users\{{your_user}}\AppData\Roaming\Telegram Desktop\{{MyUsername}}
  • Rightclick on your desktop and create a new shortcut
  • Put this in the location field
"C:\Users\{{your_user}}\AppData\Roaming\Telegram Desktop\Telegram.exe" -workdir "C:\Users\{{your_user}}\AppData\Roaming\Telegram Desktop\{{MyUsername}}"
  • Click next and type in a name for the shortcut, usually something like Telegram {{MyUsername}}
  • Lastly to find the application via the start menu you have to copy the link in here
Copy link

AJackTi commented Dec 10, 2021

I had a crash before when adding too many accounts (more than 20 accounts), I still don't understand why I got such a crash? And how to fix this situation? @Nachtalb @DebugNewWorld

Copy link


I don't use the swift app myself nor do I have access to a MacBook anymore. The main topic of the instructions on this page is the official desktop app: /

For more in-depth questions for the Swift app about the max number of accounts, crashes etc. please refer to its repository here:

Copy link

I cant seem to find the specific file path on mac for creating the file, what could I be doing wrong?

Copy link

I cant seem to find the specific file path on mac for creating the file, what could I be doing wrong?

There are two different Telegram Apps for the Mac. One from the App Store and one from the website linked at the top of the instructions. If you don't have the folders as described in these instructions I guess you have the App Store one installed. I don't know if it's even possible with that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment