emqx/MQTTX

[Feature/Bug] On Linux follow XDG Base Directory Specification

Open

#2,013 opened on Dec 18, 2025

View on GitHub
 (4 comments) (0 reactions) (1 assignee)TypeScript (544 forks)auto 404
Linuxdesktopdiscussionhelp wanted

Repository metrics

Stars
 (5,003 stars)
PR merge metrics
 (PR metrics pending)

Description

Motivation

On linux MQTTX stores cache inside ~/.config (or $XDG_CONFIG_HOME). This is bad because users can't rely on configs being "light", they are polluted with caches and can't be just copied around. There is an existing solution that has been around for many years, XDG Base Directory Specification.

The specification: https://specifications.freedesktop.org/basedir/latest/

Detailed design

Convention is to store cache in $XDG_CACHE_HOME or at least ~/.cache. The same goes for data - XDG_DATA_HOME or at least ~.local/share.

Contributor guide