Delta Chat Desktop, but running inside of Firefox 🦊

May 22, 2025 by treefit, nojisan

As part of the project to port Delta Chat Desktop from Electron to Tauri1, we’ll showcase a setup where our Desktop app runs in Firefox and does not depend on Electron or Chromium anymore. This video and post walks through what works already, and what doesn’t and is generally aimed at developers and expert users.

Delta Chat Desktop UI running in the Firefox Browser
Delta Chat, running in the Firefox Browser

Features:

Here is a video that shows the Browser Version in action:

Though it is not standalone, it still needs a server component because Chatmail core2 can not yet be compiled into a WebAssembly to run fully in the browser, but more on that later.

Why we made a Browser Edition

So why did we make a Desktop version that works in a Browser? We had three reasons:

  1. Lots of people rightfully criticized depending on Google’s Chromium and resource-hungry Electron3.
  2. To give access to development tools and add-ons on all browsers.
  3. To bring back automated integration testing for Delta Chat Desktop.

Possible future use cases

There are many more ways this web version could be used besides the ones already mentioned:

Delta Chat Web inside of Home Assistant
Delta Chat Web inside of Home Assistant

Diving deeper into technical details

To make the Web UI of Delta Chat Desktop independent of Electron, we needed to make our code more modular:

Effectively, the web-based UI of the desktop client became independent of Electron or Chromium. To add a new Runtime you just need to implement the runtime interface and load it when you start the app.

The code of the runtime interface: https://github.com/deltachat/deltachat-desktop/blob/main/packages/runtime/runtime.ts#L29

Diagram visualizing the before and after

Downsides and Caveats of the Current Browser Version

The current approach has the following caveats that you should to keep in mind

  1. If you host the server component on a VPS, then the VPS will become the place where the messages are decrypted, so you break the premise of the end-to-end encryption: "end device to end device".
  2. You need to host the server component for each user, so you need to build management software if you want to use this for a SaaS project/product.
  3. Currently, only one client can connect to the Chatmail core at a time, because there is only a single event queue.
    If you would connect multiple clients right now, then they would steal events from each other.
  4. The current security could be improved: The WebSocket server does not perform origin validation and the login has no timeout/cooldown on wrong passwords. But those would be easy to add.

Also, some features are still missing in the browser version:

These missing features, and especially the webxdc app sandboxing, require more work. See Webxdc security blog post for a deep dive into the issues.

What comes next requires helping hands and contributions

Besides the issues noted, a Web version of Delta Chat that fully satisfies end-to-end encryption guarantees needs the Rust Chatmail core library to run in the browser. Rust in general compiles to WebAssembly (WASM). For example, the security-audited rPGP end-to-end encryption library is implemented fully in Rust and is continuously tested with WebAssembly targets. However, there are some key challenges to address for a “standalone” Web version:

See the Web version topic in the Delta Chat Forum for further discussion.

If you are not really into programming, it might be hard to understand how hard these issues are. But no worries, even if you are a programmer, or even with ourselves as matter experts, it’s hard to predict :)

Invitation to DIFF June 7-17th in Freiburg

The best way to discuss with many of us is by making it to an in-person community gathering. This crazy year of 2025 around we are inviting to the DIFF gathering starting in just a few weeks.

Donations needed

While some of our work is funded through public bodies, a lot of it is not. Please consider sending a monetary contribution if you can and appreciate our efforts and want to enable more. Thanks!

If you want to try the experimental browser version yourself, then you can find the instructions at https://github.com/deltachat/deltachat-desktop/blob/main/packages/target-browser/Readme.md.

  1. Tauri is an alternative to Electron that is smaller, because it uses the web view provided by the operating system instead of including a whole Chromium browser. It is also written in the memory-safe compiled language rust, which offers security and speed benefits. There will be another blog post going into more detail soon; in the meantime, you can learn more at https://tauri.app/ 2

  2. Formerly known as Delta Chat Core. It is the core library all our UI implementations use. 

  3. Though It should be said that despite it’s flaws, Electron has served us well over the years and we are grateful that it exists. But it is never good to be too dependent on a single framework, especially one that is so resource wasteful and hard for us to extend or contribute back to. 

  4. I’m thinking BSD flavors, Haiku, or other rare enthusiast operating systems here 


Show Comments


You can reply on any Fediverse (Mastodon, Pleroma, etc.) website or app by pasting this URL into the search field of your client:

https://chaos.social/@delta/114551763057700815