Skip to main content

Configuration Options

This document details all available configuration options for the Teams for Linux application. These options can be set via command-line arguments or in a config.json file located in the application's configuration directory.

Example Usage

As an example, to disable persistence, you can run the following command:

teams-for-linux --partition nopersist

Alternatively, you can use a config.json file with your configuration options. Place this file in the appropriate location based on your installation type:

  • Vanilla: ~/.config/teams-for-linux/config.json
  • Snap: ~/snap/teams-for-linux/current/.config/teams-for-linux/config.json
  • Flatpak: ~/.var/app/com.github.IsmaelMartinez.teams_for_linux/config/teams-for-linux/config.json

yargs supports multiple configuration methods—refer to their documentation if you prefer using a configuration file over command-line arguments.

Example config.json:

{
"closeAppOnCross": true
}

System-wide Configuration

Teams for Linux supports system-wide configuration files for enterprise and multi-user environments. The system-wide configuration file should be placed at:

/etc/teams-for-linux/config.json

Configuration Precedence

The application loads configuration in the following order:

  1. System-wide config (if present): /etc/teams-for-linux/config.json
  2. User config (if present): User's config directory (e.g., ~/.config/teams-for-linux/config.json)
  3. Default values: Built-in application defaults

User configurations take precedence over system-wide configurations. This allows administrators to set organization-wide defaults while still allowing individual users to customize their settings.

Example System-wide Config

System administrators can create /etc/teams-for-linux/config.json to set organization-wide defaults:

{
"closeAppOnCross": false,
"disableNotifications": false,
"screenSharingThumbnail": {
"enabled": true
},
"customCSSName": "compactDark"
}

Users can then override specific settings in their personal config files while inheriting the system-wide defaults for other options.

Related GitHub Issues: Issue #1773

Electron CLI Flags

The configuration file can include Electron CLI flags that will be added when the application starts.

Example:

{
"electronCLIFlags": [
["ozone-platform", "wayland"],
"disable-software-rasterizer"
]
}
note

For options that require a value, provide them as an array where the first element is the flag and the second is its value. If no value is needed, you can use a simple string.

Incoming Call Command

To use the incoming call command feature a command or executable needs to be configured.

Example:

{
"incomingCallCommand": "/home/user/incomingCallScript.sh",
"incomingCallCommandArgs": ["-f", "1234"]
}

This will execute the following on an incoming call:

/home/user/incomingCallScript.sh -f 1234 NAME_OF_CALLER SUBTEXT IMAGE_OF_CALLER
note
  • Only the property incomingCallCommand is necessary, incomingCallCommandArgs is completely optional.
  • This feature has no connection to the incoming call toast feature. These two features can be used separately.

Cache Management

Important

The Cache Manager is enabled by default and prevents daily issues caused by cache overflow (issue #1756).

The cache management feature automatically cleans cache files when they grow too large and cause token corruption:

{
"cacheManagement": {
"enabled": true,
"maxCacheSizeMB": 300,
"cacheCheckIntervalMs": 3600000
}
}
OptionTypeDefaultDescription
enabledbooleantrueEnable/disable automatic cache management
maxCacheSizeMBnumber300Maximum cache size in MB before cleanup
cacheCheckIntervalMsnumber3600000How often to check cache size in milliseconds (1 hour)

What Gets Cleaned vs Preserved

Cleaned:

  • Cache directories (main Cache, GPUCache, Code Cache)
  • Partition-specific cached data for your configured partition (e.g. Partitions/teams-4-linux/{Cache,GPUCache,Code Cache})
  • Temporary WAL/journal files that are known to cause token corruption

Preserved:

  • IndexedDB and WebStorage for the Teams partition (these contain authentication tokens and session state)
  • Authentication tokens and login credentials
  • User preferences and settings
  • Other essential persistent storage

Monitoring and Manual Cleanup

Enable debug logging to monitor cache activities:

teams-for-linux --logConfig='{"level":"debug"}'

There are two options depending on your goal:

  1. Safe cleanup (won’t sign you out)

This mirrors what the app’s automatic cleaner does. It removes caches only and leaves IndexedDB/WebStorage intact so you stay signed in.

# Stop Teams for Linux first
pkill -f "teams-for-linux"

# Remove top-level caches
rm -rf ~/.config/teams-for-linux/Cache/*
rm -rf ~/.config/teams-for-linux/GPUCache/*
rm -rf ~/.config/teams-for-linux/"Code Cache"/*

# Remove partition-specific caches (default partition name is teams-4-linux)
rm -rf ~/.config/teams-for-linux/Partitions/teams-4-linux/Cache/*
rm -rf ~/.config/teams-for-linux/Partitions/teams-4-linux/GPUCache/*
rm -rf ~/.config/teams-for-linux/Partitions/teams-4-linux/"Code Cache"/*

# Remove problematic temporary files
rm -f ~/.config/teams-for-linux/DIPS-wal
rm -f ~/.config/teams-for-linux/SharedStorage-wal
rm -f ~/.config/teams-for-linux/Cookies-journal
  1. Full reset for Teams origin (will sign you out)

Use the in-app menu to clear storage for just the Teams website origin. This is the recommended way to perform a full reset:

  • Open the app menu → Debug → Reset Teams Cache

What it does:

  • Clears cookies, localStorage, IndexedDB, cacheStorage, service workers, and HTTP cache for https://teams.microsoft.com in the current partition.

Impact:

  • You’ll be logged out and will need to sign in again. Use this only if you suspect corrupted site data or repeated auth failures.

Note: If you’re using Snap or Flatpak, your config/cache paths differ. Adjust the paths accordingly (see the configuration paths at the top of this document).

General Options

Option NameTypeDefault ValueDescription
appActiveCheckIntervalnumber2A numeric value in seconds as poll interval to check if the system is active from being idle.
appIconstring""Teams app icon to show in the tray.
appIconTypestring"default"Type of tray icon to be used. Choices: default, light, dark.
appIdleTimeoutnumber300A numeric value in seconds as duration before app considers the system as idle.
appIdleTimeoutCheckIntervalnumber10A numeric value in seconds as poll interval to check if the appIdleTimeout is reached.
appTitlestring"Microsoft Teams"A text to be suffixed with page title.
authServerWhiteliststring"*"Set auth-server-whitelist value.
awayOnSystemIdlebooleanfalseSets the user status as away when system goes idle.
chromeUserAgentstringMozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${process.versions.chrome} Safari/537.36Google Chrome User Agent.
customBGServiceBaseUrlstring"http://localhost"Base URL of the server which provides custom background images.
customBGServiceConfigFetchIntervalnumber0A numeric value in seconds as poll interval to download background service config download.
customCACertsFingerprintsarray[]Array of custom CA Certs Fingerprints to allow SSL unrecognized signer or self signed certificate.
customCSSNamestring""Custom CSS name for the packaged available css files. Currently those are: "compactDark", "compactLight", "tweaks", "condensedDark" and "condensedLight".
customCSSLocationstring""Custom CSS styles file location.
disableTimestampOnCopybooleanfalseControls whether timestamps are included when copying messages in chats.
classstringnullA custom value for the WM_CLASS property.
cacheManagementobject{ enabled: true, maxCacheSizeMB: 300, cacheCheckIntervalMs: 3600000 }Cache management configuration to prevent daily logout issues.
clearStorageDatabooleannullFlag to clear storage data. Expects an object of the type https://www.electronjs.org/docs/latest/api/session#sesclearstoragedataoptions.
clientCertPathstring""Custom Client Certs for corporate authentication (certificate must be in pkcs12 format).
clientCertPasswordstring""Custom Client Certs password for corporate authentication (certificate must be in pkcs12 format).
closeAppOnCrossbooleanfalseClose the app when clicking the close (X) cross.
defaultNotificationUrgencystring"normal"Default urgency for new notifications (low/normal/critical). Choices: low, normal, critical.
defaultURLHandlerstring""Default application to be used to open the HTTP URLs.
disableGpubooleanfalseA flag to disable GPU and hardware acceleration (can be useful if the window remains blank).
disableNotificationsbooleanfalseA flag to disable all notifications.
disableNotificationSoundbooleanfalseDisable chat/meeting start notification sound.
disableNotificationSoundIfNotAvailablebooleanfalseDisables notification sound unless status is Available (e.g. while in a call, busy, etc.).
disableNotificationWindowFlashbooleanfalseA flag indicates whether to disable window flashing when there is a notification.
disableGlobalShortcutsarray[]Array of global shortcuts to disable while the app is in focus. See https://www.electronjs.org/docs/latest/api/accelerator for available accelerators to use.
electronCLIFlagsarray[]Electron CLI flags.
emulateWinChromiumPlatformbooleanfalseUse windows platform information in chromium. This is helpful if MFA app does not support Linux.
enableIncomingCallToastbooleanfalseEnable incoming call toast.
followSystemThemebooleanfalseFollow system theme.
framebooleantrueSpecify false to create a Frameless Window. Default is true.
incomingCallCommandstringnullCommand to execute on an incoming call. (caution: "~" in path is not supported).
incomingCallCommandArgsarray[]Arguments for the incoming call command.
isCustomBackgroundEnabledbooleanfalseA flag indicates whether to enable custom background or not.
logConfigobject{ transports: { console: { level: "info" }, file: { level: false } } }Electron-log configuration. See logger.js for configurable values. To disable it provide a Falsy value.
meetupJoinRegExstring^https://teams.(microsoft|live).com/.*(?:meetup-join|channel|chat)Meetup-join and channel regular expression.
menubarstring"auto"A value controls the menu bar behaviour. Choices: auto, visible, hidden.
minimizedbooleanfalseStart the application minimized.
notificationMethodstring"web"Notification method to be used by the application (web/electron). Choices: web, electron.
onNewWindowOpenMeetupJoinUrlInAppbooleantrueOpen meetupJoinRegEx URLs in the app instead of the default browser.
partitionstring"persist:teams-4-linux"BrowserWindow webpreferences partition.
proxyServerstringnullProxy Server with format address:port.
screenSharingThumbnailobject{ enabled: true, alwaysOnTop: true }Automatically show a thumbnail window when screen sharing is active.
screenLockInhibitionMethodstring"Electron"Screen lock inhibition method to be used (Electron/WakeLockSentinel). Choices: Electron, WakeLockSentinel.
spellCheckerLanguagesarray[]Array of languages to use with Electron's spell checker (experimental).
ssoBasicAuthUserstring""User to use for SSO basic auth.
ssoBasicAuthPasswordCommandstring""Command to execute to retrieve password for SSO basic auth.
ssoInTuneEnabledbooleanfalseEnable Single-Sign-On using Microsoft InTune.
ssoInTuneAuthUserstring""User (e-mail) to use for InTune SSO.
trayIconEnabledbooleantrueEnable tray icon.
msTeamsProtocolsobject{ v1: "^msteams:\/l\/(?:meetup-join|channel|chat|message)", v2: "^msteams:\/\/teams\.microsoft\.com\/l\/(?:meetup-join|channel|chat|message)" }Regular expressions for Microsoft Teams protocol links (v1 and v2).
urlstring"https://teams.microsoft.com/v2"Microsoft Teams URL.
useMutationTitleLogicbooleantrueUse MutationObserver to update counter from title.
watchConfigFilebooleanfalseWatch for changes in the config file and reload the app.
webDebugbooleanfalseEnable debug at start.
videoMenubooleanfalseEnable menu entry for controlling video elements.