DEV Community

Weather Clock Dash
Weather Clock Dash

Posted on

Advanced Firefox Containers: Multi-Login, Developer Testing, Container Proxy, and Real Limitations

Firefox Multi-Account Containers is one of Firefox's most powerful features for managing multiple identities, web app testing, and privacy. Here's an advanced guide covering use cases most tutorials skip.

What Containers Actually Isolate

Containers provide isolated cookie and localStorage storage. Each container has its own:

  • Cookie jar (entirely separate from other containers)
  • localStorage and sessionStorage
  • IndexedDB
  • Cache

Containers do NOT isolate:

  • IP address (use VPN for that)
  • Browser fingerprint (canvas, fonts, etc.)
  • DNS queries (use DoH for that)
  • History (history is shared across containers by default)

Understanding this scope helps avoid misusing containers.

Container Per Service (The Classic Pattern)

Most guides start here: one container per identity.

Minimal useful setup:

  • Default (no container): general browsing
  • Work: Slack, work email, work tools
  • Personal: personal email, social accounts
  • Shopping: Amazon, retail sites

Why shopping gets its own container:
Retailer sites track browsing patterns to adjust prices and recommendations. Isolation in a Shopping container prevents these trackers from following you into other contexts.

Automatic container assignment:
With the Firefox Multi-Account Containers extension, you can assign domains to containers:

  • Settings → Container → assign domains
  • Every time you navigate to example.com, it automatically opens in your Work container

This is the key feature: you set it once and forget it. Gmail always opens in Personal, your company's Jira always opens in Work.

Multi-Login on Same Service

The most immediately useful pattern:

Multiple Google accounts:

  • Google account 1 (personal Gmail): Personal container
  • Google account 2 (work Google): Work container
  • Google account 3 (client Google): Client container

All three can be open simultaneously. Go to gmail.com in different containers = different Gmail accounts, no logout required.

Multiple AWS accounts:

  • AWS dev account: Dev container
  • AWS staging account: Staging container
  • AWS prod account: Prod container (use carefully)

Navigate to console.aws.amazon.com in each container = different AWS consoles open simultaneously.

Multiple Stripe/GitHub/Vercel accounts: Same pattern works everywhere.

Developer Testing With Containers

Test authenticated vs unauthenticated state simultaneously:

  • Container A: logged in as admin
  • Container B: logged in as regular user
  • Container C (or default): not logged in

Three browser tabs, three different authentication states. No incognito windows needed, no password manager dance.

Test A/B variants:

  • Container A gets cookie variant=control
  • Container B gets cookie variant=treatment
  • See both variants simultaneously

Test third-party integrations:
If your app uses OAuth (Login with Google, GitHub, etc.):

  • Container A: OAuth flow with test account
  • Container B: OAuth flow with different test account
  • Verify each account's permissions work correctly

Containers for CI/CD Dashboard Access

Common scenario: you have multiple cloud environments and each needs separate authentication.

Pattern:

  • GCP Production: dedicated container
  • GCP Staging: dedicated container
  • GCP Dev: dedicated container

The organizational benefit: when you navigate to console.cloud.google.com, the container determines which project you're authenticated for. No more accidentally deploying to prod because you were in the wrong terminal — you're visually in the "Staging" container.

Visual reminder: Each container has a color indicator in the address bar. If you're in the wrong container, the color tells you before you act.

Container-Based VPN Routing

With Firefox Multi-Account Containers + Container Proxy (a separate extension), you can route different containers through different proxies:

Setup: Install "Firefox Multi-Account Containers" + "Container Proxy" extensions.

Configuration in Container Proxy:

  • Work container: route through corporate VPN proxy (socks5://localhost:1080)
  • Personal container: direct connection
  • Research container: route through Tor (if tor is running locally)

This is advanced but powerful: different identities use different network paths.

Automatic Container Assignment in Practice

The "Assign this site to a container" feature (in the container selection popup when opening a new container tab):

Right-click on any tab → Reopen in Container → Choose container
→ A prompt asks "Always open this site in [container]?"
→ Click "Assign to [container]"
Enter fullscreen mode Exit fullscreen mode

After this:

  • That domain always opens in that container
  • When you click a link to that domain from any tab, it opens in the correct container
  • Firefox intercepts the navigation and redirects automatically

Practical example: You click a link to slack.com from your personal email. Firefox automatically opens it in the Work container (where you're logged into work Slack). Magic.

Containers and Firefox Sync

Important limitation: Container assignments do NOT sync via Firefox Sync.

This means:

  • Set up containers on desktop Firefox → need to reconfigure on mobile or other machines
  • Firefox Multi-Account Containers extension has export/import for assignments
  • Export JSON → import on another device to replicate your setup

The containers themselves (the named containers) also don't sync natively. The extension handles this separately via export/import.

Tab Coloring and Visual Organization

Each container gets a color and icon. Firefox shows the container color as:

  • A colored line under the tab
  • A colored dot in the address bar

Choosing effective colors:

  • Red for Prod (danger signal)
  • Blue for Staging
  • Green for Dev
  • Orange for personal accounts

The psychological benefit: you notice the color before acting. The Prod container's red tab is a subtle reminder to be careful.

Combining With Tab Manager

Containers and session managers complement each other:

Workflow:

  1. Each "project session" includes specific containers being used
  2. Save a session: "client project A - session 1" — saves tabs + their container assignments
  3. Restore the session → the correct containers are active

Note: Firefox's session restore preserves container assignments. When you save and restore a session with a container-aware session manager, the container information is preserved.

Security Limitations to Know

Containers provide isolation, not anonymity:

  1. Within a container, cross-site tracking still works: If you visit ad-network-tracker.com in your Personal container, and then visit another site that loads ad-network-tracker.com, the tracker sees you (same cookie jar).

  2. Containers don't block fingerprinting: Canvas fingerprint, user-agent, and system fonts are the same across all containers.

  3. History is shared: Your browser history shows URLs from all containers. Filter by container in History isn't built-in (though some extensions add this).

  4. Containers aren't profiles: All containers share the same extensions, the same about:config, and the same Firefox installation.

For true separation, use separate Firefox profiles (about:profiles). Containers are for isolation within a single browsing session.

Quick Reference: Container Setup for Developers

Container Sites Color
Default General browsing, news None
Work Work email, Slack, work tools Blue
Personal Personal Gmail, social Green
Shopping Amazon, retail Orange
Development (client) Work on client projects Purple
Staging Staging env dashboards Yellow
Production Prod dashboards (be careful!) Red
Research One-off research, no login Grey

Top comments (0)