Skip to content

RetroDECK: Flatpak Directory Structure

RetroDECK is a Flatpak - a sandboxed bundle containing applications, configurations, and supporting files.


RetroDECK Flatpak: User-Accessible Directories

Directory Name Directory Path Comment
retrodeck/ (userdata) Directory <Dynamic Path>/retrodeck/ Read more: RetroDECK: Userdata Directory Structure
/.var/app/net.retrodeck.retrodeck Directory ~/.var/app/net.retrodeck.retrodeck Mapped as /var inside the Flatpak. Exposes configuration, cache, and system data from the Flatpak environment.
cache Directory ~/.var/app/net.retrodeck.retrodeck/cache/ Stores cache files and temporary data for components.
config Directory ~/.var/app/net.retrodeck.retrodeck/config/ Contains copied configuration files for components.
data Directory ~/.var/app/net.retrodeck.retrodeck/data/ Stores data structures for components.
config/retrodeck Directory ~/.var/app/net.retrodeck.retrodeck/config/retrodeck/ Main configuration file: retrodeck.cfg.

Flatpak: General Directories

Directory Name Local Path System Path Comment
Flatpak Runtimes ~/.local/share/flatpak/runtime/ /var/lib/flatpak/runtime/ Stores runtime libraries such as org.kde.Platform, org.freedesktop.Platform, org.gnome.Platform.
Flatpak Overrides ~/.local/share/flatpak/overrides/ /var/lib/flatpak/overrides/ Flatpak-specific overrides for sandboxed applications.

RetroDECK Flatpak Sandbox and Persistent Data

When accessing the Flatpak sandbox via the CLI in Debug Mode, internal directories such as /app and /var map to different locations on the host filesystem.

This is part of Flatpak's sandboxing model:

  • The application runtime under /app is read-only.
  • /var provides writable directories for persistent user data, such as configuration, cache, and application-specific files.
  • RetroDECK also creates a user-defined userdata directory retrodeck/, which can be placed wherever the user chooses.

When the application is updated, the runtime under /app changes, but the writable data under /var (for example config, cache, and data) remains mostly unchanged (depending on the update).

Because the retrodeck/ and /var directories are shared across versions and branches, regular backups are recommended, especially when testing beta or development builds that may modify configuration or data formats in both directories. Jumping from a bleeding-edge development build back to stable is not recommended.

See the RetroDECK Testing Guide for instructions on creating backups.

Internal Path Host Path Comment
/app ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/
or
/var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/
Read-only runtime environment provided by the Flatpak package. Contains: bin, lib, libexec, manifest-base-1.json, manifest.json, retrodeck, share, tools.
/var ~/.var/app/net.retrodeck.retrodeck/ Writable portion of the sandbox. Contains application state directories such as cache, config, and data.

XDG Base Directory Paths in Flatpak

The following table shows how XDG base directory variables map to their corresponding host paths.

These directories follow the XDG Base Directory Specification.

XDG Variable Host Path Comment
XDG_CACHE_HOME ~/.var/app/net.retrodeck.retrodeck/cache/ Cache directory. Corresponds to $HOME/.cache inside the Flatpak sandbox.
XDG_CONFIG_HOME ~/.var/app/net.retrodeck.retrodeck/config/ Configuration directory. Corresponds to $HOME/.config inside the Flatpak sandbox.
XDG_DATA_HOME ~/.var/app/net.retrodeck.retrodeck/data/ Application data directory. Corresponds to $HOME/.local/share inside the Flatpak sandbox.

Steam: Directory Structure

Directory Name Directory Path Comment
Steam Default Templates ~/.steam/steam/controller_base/templates/ RetroDECK injects Steam Input templates here.
Application Templates ~/.steam/steam/steamapps/common/Steam Controller Configs/<AppID>/config/retrodeck/ Temporary changes stored here if user modifies templates.
Steam Binding Icons ~/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/ RetroDECK injects Steam Input icons here.

RetroDECK Flatpak: Directory Structure

  • Directory Name: Name of the Directory
  • Path Local: If RetroDECK is installed as a local application.
  • Path System: If RetroDECK is installed as a system application.
  • Comment: Notes and descriptions of the Directory contents.

flatpak/app/net.retrodeck.retrodeck/ - Top Level

Directory Name Path Local Path System Comment
RetroDECK's Flatpak Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/ This is mapped as /app inside the Flatpak. Contains manifest.json.
bin Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/bin/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/bin/ Symlinked binaries, other executables, retrodeck.sh.
lib Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/lib/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/lib/ Freedesktop runtime libraries.
libexec Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/libexec/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/libexec/ Various scripts, e.g., post_update.sh.
retrodeck Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/ RetroDECK structure subdirectories and version file.
share Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/share/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/share/ Shared resources for RetroDECK.
tools Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/tools/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/tools/ Scripts like configurator.sh and retrodeck_function_wrapper.sh.

retrodeck/

Directory Name Path Local Path System Comment
binding_icons Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/binding_icons/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/binding_icons/ Steam radial icons.
components Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/components/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/components/ Components subdirectories.
config Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/config/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/config/ Exposed component config subdirectories.
graphics Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/graphics/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/graphics/ Graphical assets used by ES-DE and splash.svg.
steam_grid Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/steam_grid/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/steam_grid/ Grid art for Steam.

retrodeck/graphics/

Directory Name Path Local Path System Comment
extra_splashes Directory ~/.local/share/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/graphics/extra_splashes/ /var/lib/flatpak/app/net.retrodeck.retrodeck/current/active/files/retrodeck/graphics/extra_splashes/ Extra RetroDECK startup images (splashes).

retrodeck/components/

Each component resides in its own subDirectory containing binaries, libraries, and related files.

Clients

Directory Name Path Local Path System Comment
clientX .../retrodeck/components/ .../retrodeck/components/ clientX (no clients added yet).

Emulators

Directory Name Path Local Path System Comment
cemu .../retrodeck/components/cemu/ .../retrodeck/components/cemu/ Cemu emulator.
dolphin .../retrodeck/components/dolphin/ .../retrodeck/components/dolphin/ Dolphin emulator.
duckstation .../retrodeck/components/duckstation/ .../retrodeck/components/duckstation/ DuckStation (Legacy).
mame .../retrodeck/components/mame/ .../retrodeck/components/mame/ MAME emulator.
melonds .../retrodeck/components/melonds/ .../retrodeck/components/melonds/ MelonDS emulator.
pancakes .../retrodeck/components/pancakes/ .../retrodeck/components/pancakes/ Pancakes emulator.
pcsx2 .../retrodeck/components/pcsx2/ .../retrodeck/components/pcsx2/ PCSX2 emulator.
ppsspp .../retrodeck/components/ppsspp/ .../retrodeck/components/ppsspp/ PPSSPP emulator.
primehack .../retrodeck/components/primehack/ .../retrodeck/components/primehack/ PrimeHack emulator.
retroarch .../retrodeck/components/retroarch/ .../retrodeck/components/retroarch/ RetroArch frontend.
rpcs3 .../retrodeck/components/rpcs3/ .../retrodeck/components/rpcs3/ RPCS3 emulator.
ruffle .../retrodeck/components/ruffle/ .../retrodeck/components/ruffle/ Ruffle Flash emulator.
vita3k .../retrodeck/components/vita3k/ .../retrodeck/components/vita3k/ Vita3K emulator.
xemu .../retrodeck/components/xemu/ .../retrodeck/components/xemu/ Xemu emulator.

Engines

Directory Name Path Local Path System Comment
gzdoom .../retrodeck/components/gzdoom/ .../retrodeck/components/gzdoom/ GZDoom engine.
solarus .../retrodeck/components/solarus/ .../retrodeck/components/solarus/ Solarus engine.

Ports

Directory Name Path Local Path System Comment
portX .../retrodeck/components/ .../retrodeck/components/ PortX (no ports added yet).

Systems

Directory Name Path Local Path System Comment
es-de Main .../retrodeck/components/es-de/ .../retrodeck/components/es-de/ ES-DE main Directory.
es-de Linux .../share/retrodeck/components/es-de/share/es-de/resources/systems/linux/ .../share/retrodeck/components/es-de/share/es-de/resources/systems/linux/ es_find_rules.xml and es_systems.xml.
portmaster .../retrodeck/components/portmaster/ .../retrodeck/components/portmaster/ Portmaster.
steam-rom-manager .../retrodeck/components/steam-rom-manager/ .../retrodeck/components/steam-rom-manager/ Steam ROM Manager (SRM).

Other

Directory Name Path Local Path System Comment
shared-libs .../retrodeck/components/shared-libs/ .../retrodeck/components/shared-libs/ Shared libraries used by components.

retrodeck/config/

Each component's default configs and related files (wrappers, graphical assets, other component-specific files) are stored here.
The structure mirrors retrodeck/components/. Many files are later copied to ~/.var/app/net.retrodeck.retrodeck/config/ for end-user edits via RetroDECK.


Emulators

Directory Name Path Local Path System Comment
cemu .../retrodeck/config/cemu/ .../retrodeck/config/cemu/ Cemu config files.
dolphin .../retrodeck/config/dolphin/ .../retrodeck/config/dolphin/ Dolphin config files.
duckstation .../retrodeck/config/duckstation/ .../retrodeck/config/duckstation/ DuckStation (Legacy).
mame .../retrodeck/config/mame/ .../retrodeck/config/mame/ MAME config files.
melonds .../retrodeck/config/melonds/ .../retrodeck/config/melonds/ MelonDS config files.
pcsx2 .../retrodeck/config/pcsx2/ .../retrodeck/config/pcsx2/ PCSX2 config files.
ppsspp .../retrodeck/config/ppsspp/ .../retrodeck/config/ppsspp/ PPSSPP config files.
primehack .../retrodeck/config/primehack/ .../retrodeck/config/primehack/ PrimeHack config files.
retroarch .../retrodeck/config/retroarch/ .../retrodeck/config/retroarch/ RetroArch configs, borders, core overrides.
rpcs3 .../retrodeck/config/rpcs3/ .../retrodeck/config/rpcs3/ RPCS3 configs.
ruffle .../retrodeck/config/ruffle/ .../retrodeck/config/ruffle/ Ruffle configs.
ryujinx .../retrodeck/config/ryujinx/ .../retrodeck/config/ryujinx/ Archived Ryujinx config (binary removed).
vita3k .../retrodeck/config/vita3k/ .../retrodeck/config/vita3k/ Vita3K config files.
xemu .../retrodeck/config/xemu/ .../retrodeck/config/xemu/ Xemu config files.

Engines

Directory Name Path Local Path System Comment
gzdoom .../retrodeck/config/gzdoom/ .../retrodeck/config/gzdoom/ GZDoom wrapper configs.
solarus .../retrodeck/config/solarus/ .../retrodeck/config/solarus/ Solarus configs.
pico-8 .../retrodeck/config/pico-8/ .../retrodeck/config/pico-8/ Pico-8 wrapper configs.

Ports

Directory Name Path Local Path System Comment
portX .../retrodeck/config/ .../retrodeck/config/ PortX (no ports added yet).

Systems

Directory Name Path Local Path System Comment
es-de .../retrodeck/config/es-de/ .../retrodeck/config/es-de/ ES-DE configs.
portmaster .../retrodeck/config/portmaster/ .../retrodeck/config/portmaster/ Portmaster configs.
steam-rom-manager .../retrodeck/config/steam-rom-manager/ .../retrodeck/config/steam-rom-manager/ Steam ROM Manager (SRM) configs.

retrodeck/config/retrodeck

Directory Name Path Local Path System Comment
retrodeck .../retrodeck/config/retrodeck/ .../retrodeck/config/retrodeck/ Main RetroDECK configs: retrodeck.cfg, MIME files.
controller_configs .../controller_configs/ .../controller_configs/ Steam Input templates.
reference_lists .../reference_lists/ .../reference_lists/ Lists like bios.json, features.json.
helper_files .../helper_files/ .../helper_files/ Helper lists and support files.
presets .../presets/ .../presets/ Default preset configuration files.

share/

Directory Name Path Local Path System Comment
metainfo .../share/metainfo/ .../share/metainfo/ net.retrodeck.retrodeck.metainfo.xml
mime .../share/mime/ .../share/mime/ net.retrodeck.retrodeck.mime.xml
icons .../share/icons/hicolor/scalable/apps/ .../share/icons/hicolor/scalable/apps/ Scalable SVG icons.