How to Exclude Files and Sync Multiple Dropbox Accounts with Maestral

Updated

Maestral handles both tasks through its command line interface: you exclude local items by placing an .mignore file with gitignore-style patterns in your Dropbox root, or by using selective sync in the GUI and CLI, and you add extra Dropbox accounts by passing a new config name when linking. Both features work on macOS and Linux, and neither requires an official Dropbox app. Note that as of June 2026 Maestral is no longer actively maintained — the current version keeps working until certificates expire, so these workflows are stable but frozen.

Excluding files and folders

Maestral gives you two mechanisms, and they operate at different levels.

.mignore patterns

Place a file named .mignore in the root of your local Dropbox folder. Patterns inside it match any number of items, using gitignore-style syntax. This is the right tool when you want a rule-based, repeatable exclusion — for example, keeping build artifacts, node_modules, or large media directories out of sync without touching each file by hand.

The file lives in the Dropbox root, so the patterns apply from that point down.

Selective sync

Selective sync is the per-item control. The GUI and the command line interface both expose it, letting you exclude individual files rather than writing pattern rules. Use this when the exclusion is a one-off decision about a specific file or folder you can point at directly.

A practical split: use .mignore for anything you'd otherwise re-exclude on every new machine, and selective sync for the occasional item you decide against after seeing it.

Syncing multiple Dropbox accounts

The CLI allows configuring an unlimited number of Dropbox accounts. The mechanism is the config name: when you link a new account, you pass a new config name, and Maestral keeps that account's settings and sync state separate.

The linking flow itself is interactive. From the example in Maestral's own documentation, maestral start walks through:

  1. Linking a new account for a given config name.
  2. Retrieving an auth code from Dropbox — you open the Dropbox website and enter the code Maestral shows you.
  3. Confirming the linked account.
  4. Choosing a local Dropbox folder.
  5. Deciding whether to sync all folders.

That last step matters for multi-account setups: each account gets its own local folder, so pick distinct paths (the example uses ~/Dropbox (Work)) to keep them from colliding. The "sync all folders?" prompt is also where you can start narrow rather than pulling everything down first.

What the CLI gives you beyond syncing

Once accounts are configured, the CLI covers the operations you'd otherwise open a browser for:

  • View and restore previous file versions.
  • Create and revoke shared links.
  • See a live view of all sync activity.

maestral status reports the current state in one shot — account, usage percentage, sync status, and error count — which is useful when you're running several accounts and want to confirm which one is healthy.

One thing to know before you commit

Maestral is not an official Dropbox app, which is why it does not count toward the three-device limit on Basic Dropbox accounts. That's a real advantage for multi-device, multi-account use. The trade-off is maintenance: with active development ended, there will be no fixes for future Dropbox API or certificate changes. If your setup depends on it long term, treat the current version as the final one and plan accordingly.