1FLATPAK METADATA(5) flatpak metadata FLATPAK METADATA(5)
2
3
4
6 flatpak-metadata - Information about an application or runtime
7
9 Flatpak uses metadata files to describe applications and runtimes. The
10 metadata file for a deployed application or runtime is placed in the
11 toplevel deploy directory. For example, the metadata for the locally
12 installed application org.gnome.Calculator is in
13 ~/.local/share/flatpak/app/org.gnome.Calculator/current/active/metadata.
14
15 Most aspects of the metadata configuration can be overridden when
16 launching applications, either temporarily via options of the flatpak
17 run command, or permanently with the flatpak override command.
18
19 A metadata file describing the effective configuration is available
20 inside the running sandbox at /.flatpak-info. For compatibility with
21 older Flatpak versions, /run/user/$UID/flatpak-info is a symbolic link
22 to the same file.
23
25 The metadata file is using the same .ini file format that is used for
26 systemd unit files or application .desktop files.
27
28 [Application] or [Runtime]
29 Metadata for applications starts with an [Application] group, metadata
30 for runtimes with a [Runtime] group.
31
32 The following keys can be present in these groups:
33
34 name (string)
35 The name of the application or runtime. This key is mandatory.
36
37 runtime (string)
38 The fully qualified name of the runtime that is used by the
39 application. This key is mandatory for applications.
40
41 sdk (string)
42 The fully qualified name of the sdk that matches the runtime.
43 Available since 0.1.
44
45 command (string)
46 The command to run. Only relevant for applications. Available since
47 0.1.
48
49 required-flatpak (string)
50 The required version of Flatpak to run this application or runtime.
51 For applications, this was available since 0.8.0. For runtimes,
52 this was available since 0.9.1, and backported to 0.8.3 for the
53 0.8.x branch.
54
55 tags (string list)
56 Tags to include in AppStream XML. Available since 0.4.12.
57
58 [Context]
59 This group determines various system resources that may be shared with
60 the application when it is run in a flatpak sandbox.
61
62 All keys in this group (and the group itself) are optional.
63
64 shared (list)
65 List of subsystems to share with the host system. Possible
66 subsystems: network, ipc. Available since 0.3.
67
68 sockets (list)
69 List of well-known sockets to make available in the sandbox.
70 Possible sockets: x11, wayland, fallback-x11, pulseaudio,
71 session-bus, system-bus, ssh-auth. When making a socket available,
72 flatpak also sets well-known environment variables like DISPLAY or
73 DBUS_SYSTEM_BUS_ADDRESS to let the application find sockets that
74 are not in a fixed location. Available since 0.3.
75
76 devices (list)
77 List of devices to make available in the sandbox. Possible values:
78
79 dri
80 Graphics direct rendering (/dev/dri). Available since 0.3.
81
82 kvm
83 Virtualization (/dev/kvm). Available since 0.6.12.
84
85 all
86 All device nodes in /dev. Available since 0.6.6.
87
88
89 filesystems (list)
90 List of filesystem subsets to make available to the application.
91 Possible values:
92
93 home
94 The entire home directory. Available since 0.3.
95
96 host
97 The entire host file system, except for directories that are
98 handled specially by Flatpak. In particular, this shares /home,
99 /media, /opt, /run/media and /srv if they exist.
100
101 /dev is not shared: use devices=all; instead.
102
103 Parts of /sys are always shared. This option does not make
104 additional files in /sys available.
105
106 These other reserved directories are currently excluded: /app,
107 /bin, /boot, /etc, /lib, /lib32, /lib64, /proc, /root, /run,
108 /sbin, /tmp, /usr, /var.
109
110 Available since 0.3.
111
112 xdg-desktop, xdg-documents, xdg-download, xdg-music, xdg-pictures,
113 xdg-public-share, xdg-videos, xdg-templates
114 freedesktop.org special directories[1]. Available since 0.3.
115
116 xdg-desktop/path, xdg-documents/path, etc.
117 Subdirectories of freedesktop.org special directories.
118 Available since 0.4.13.
119
120 xdg-cache, xdg-config, xdg-data
121 Directories defined by the freedesktop.org Base Directory
122 Specification[2]. Available since 0.6.14.
123
124 xdg-cache/path, xdg-config/path, xdg-data/path
125 Subdirectories of directories defined by the freedesktop.org
126 Base Directory Specification. Available since 0.6.14.
127
128 xdg-run/path
129 Subdirectories of the XDG_RUNTIME_DIR defined by the
130 freedesktop.org Base Directory Specification[2]. Note that
131 xdg-run on its own is not supported. Available since 0.4.13.
132
133 /path
134 An arbitrary absolute path. Available since 0.3.
135
136 ~/path
137 An arbitrary path relative to the home directory. Available
138 since 0.3.
139
140 One of the above followed by :ro
141 Make the given directory available read-only.
142
143 One of the above followed by :rw
144 Make the given directory available read/write. This is the
145 default.
146
147 One of the above followed by :create
148 Make the given directory available read/write, and create it if
149 it does not already exist.
150
151
152 persistent (list)
153 List of homedir-relative paths to make available at the
154 corresponding path in the per-application home directory, allowing
155 the locations to be used for persistent data when the application
156 does not have access to the real homedir. For instance making
157 ".myapp" persistent would make "~/.myapp" in the sandbox a bind
158 mount to "~/.var/app/org.my.App/.myapp", thus allowing an
159 unmodified application to save data in the per-application
160 location. Available since 0.3.
161
162 features (list)
163 List of features available or unavailable to the application,
164 currently from the following list:
165
166 devel
167 Allow system calls used by development-oriented tools such as
168 perf, strace and gdb. Available since 0.6.10.
169
170 multiarch
171 Allow running multilib/multiarch binaries, for example i386
172 binaries in an x86_64 environment. Available since 0.6.12.
173
174 bluetooth
175 Allow the application to use bluetooth (AF_BLUETOOTH) sockets.
176 Note, for bluetooth to fully work you must also have network
177 access. Available since 0.11.8.
178
179 A feature can be prefixed with ! to indicate the absence of that
180 feature, for example !devel if development and debugging are not
181 allowed.
182
183 [Instance]
184 This group only appears in /.flatpak-info for a running app, and not in
185 the metadata files written by application authors. It is filled in by
186 Flatpak itself.
187
188 instance-id (string)
189 The ID of the running instance. This number is used as the name of
190 the directory in XDG_RUNTIME_DIR/.flatpak where Flatpak stores
191 information about this instance.
192
193 instance-path (string)
194 The absolute path on the host system of the app's persistent
195 storage area in $HOME/.var.
196
197 app-path (string)
198 The absolute path on the host system of the app's app files, as
199 mounted at /app inside the container. Available since 0.6.10.
200
201 app-commit (string)
202 The commit ID or the application that is running.
203
204 app-extensions (list of strings)
205 A list of app extensions that are mounted into the running
206 instance. The format for each list item is EXTENSION_ID=COMMIT.
207
208 branch (string)
209 The branch of the app, for example stable. Available since 0.6.10.
210
211 arch (string)
212 The architecture of the running instance.
213
214 flatpak-version (string)
215 The version number of the Flatpak version that ran this app.
216 Available since 0.6.11.
217
218 runtime-path (string)
219 The absolute path on the host system of the app's runtime files, as
220 mounted at /usr inside the container. Available since 0.6.10.
221
222 runtime-commit (string)
223 The commit ID or the runtime that is used.
224
225 runtime-extensions (list of strings)
226 A list of runtime extensions that are mounted into the running
227 instance. The format for each list item is EXTENSION_ID=COMMIT.
228
229 extra-args (string)
230 Extra arguments that were passed to flatpak run.
231
232 sandbox (boolean)
233 Whether the --sandbox option was passed to flatpak run.
234
235 build (boolean)
236 Whether this instance was created by flatpak build.
237
238 session-bus-proxy (boolean)
239 True if this app cannot access the D-Bus session bus directly
240 (either it goes via a proxy, or it cannot access the session bus at
241 all). Available since 0.8.0.
242
243 system-bus-proxy (boolean)
244 True if this app cannot access the D-Bus system bus directly
245 (either it goes via a proxy, or it cannot access the system bus at
246 all). Available since 0.8.0.
247
248 [Session Bus Policy]
249 If the sockets key is not allowing full access to the D-Bus session
250 bus, then flatpak provides filtered access.
251
252 The default policy for the session bus only allows the application to
253 own its own application ID and subnames. For instance if the app is
254 called "org.my.App", it can only own "org.my.App" and "org.my.App.*".
255 Its also only allowed to talk to the bus itself (org.freedesktop.DBus)
256 and the portal APIs APIs (bus names of the form
257 org.freedesktop.portal.*).
258
259 Additionally the app is always allowed to reply to messages sent to it,
260 and emit broadcast signals (but these will not reach other sandboxed
261 apps unless they are allowed to talk to your app.
262
263 If the [Session Bus Policy] group is present, it provides policy for
264 session bus access.
265
266 Each key in this group has the form of a D-Bus bus name or prefix
267 thereof, for example org.gnome.SessionManager or
268 org.freedesktop.portal.*
269
270 The possible values for entry are, in increasing order or access:
271
272 none
273 The bus name or names in question is invisible to the application.
274 Available since 0.2.
275
276 see
277 The bus name or names can be enumerated by the application.
278 Available since 0.2.
279
280 talk
281 The application can send messages/ and receive replies and signals
282 from the bus name or names. Available since 0.2.
283
284 own
285 The application can own the bus name or names (as well as all the
286 above). Available since 0.2.
287
288 [System Bus Policy]
289 If the sockets key is not allowing full access to the D-Bus system bus,
290 then flatpak does not make the system bus available unless the [System
291 Bus Policy] group is present and provides a policy for filtered access.
292 Available since 0.2.
293
294 Entries in this group have the same form as for the [Session Bus
295 Policy] group. However, the app has no permissions by default.
296
297 [Environment]
298 The [Environment] group specifies environment variables to set when
299 running the application. Available since 0.3.
300
301 Entries in this group have the form VAR=VALUE where VAR is the name of
302 an environment variable to set.
303
304 [Extension NAME]
305 Runtimes and applications can define extension points, which allow
306 optional, additional runtimes to be mounted at a specified location
307 inside the sandbox when they are present on the system. Typical uses
308 for extension points include translations for applications, or
309 debuginfo for sdks. The name of the extension point is specified as
310 part of the group heading. Since 0.11.4, the name may optionally
311 include a tag in the NAME in the name@tag ref syntax if you wish to use
312 different configurations (eg, versions) of the same extension
313 concurrently. The "tag" is effectively ignored, but is necessary in
314 order to allow the same extension name to be specified more than once.
315
316 directory (string)
317 The relative path at which the extension will be mounted in the
318 sandbox. If the extension point is for an application, the path is
319 relative to /app, otherwise it is relative to /usr. This key is
320 mandatory. Available since 0.1.
321
322 version (string)
323 The branch to use when looking for the extension. If this is not
324 specified, it defaults to the branch of the application or runtime
325 that the extension point is for. Available since 0.4.1.
326
327 versions (string)
328 The branches to use when looking for the extension. If this is not
329 specified, it defaults to the branch of the application or runtime
330 that the extension point is for. Available since 0.9.1, and
331 backported to the 0.8.x branch in 0.8.4.
332
333 add-ld-path (string)
334 A path relative to the extension point directory that will be
335 appended to LD_LIBRARY_PATH. Available since 0.9.1, and backported
336 to the 0.8.x branch in 0.8.3.
337
338 merge-dirs (string)
339 A list of relative paths of directories below the extension point
340 directory that will be merged. Available since 0.9.1, and
341 backported to the 0.8.x branch in 0.8.3.
342
343 download-if (string)
344 A condition that must be true for the extension to be
345 auto-downloaded. The only currently recognized value is
346 active-gl-driver, which is true if the name of the active GL driver
347 matches the extension point basename. Available since 0.9.1, and
348 backported to the 0.8.x branch in 0.8.3.
349
350 autoprune-unless (string)
351 A condition that must be false for the extension to be considered
352 unused when pruning. For example, flatpak uninstall --unused uses
353 this information. The only currently recognized value is
354 active-gl-driver, which is true if the name of the active GL driver
355 matches the extension point basename. Available since 0.11.8.
356
357 enable-if (string)
358 A condition that must be true for the extension to be enabled. The
359 only currently recognized value is active-gl-driver, which is true
360 if the name of the active GL driver matches the extension point
361 basename. Available since 0.9.1, and backported to the 0.8.x branch
362 in 0.8.3.
363
364 subdirectory-suffix (string)
365 A suffix that gets appended to the directory name. This is very
366 useful when the extension point naming scheme is "reversed". For
367 example, an extension point for GTK+ themes would be
368 /usr/share/themes/$NAME/gtk-3.0, which could be achieved using
369 subdirectory-suffix=gtk-3.0. Available since 0.9.1, and backported
370 to the 0.8.x branch in 0.8.3.
371
372 subdirectories (boolean)
373 If this key is set to true, then flatpak will look for extensions
374 whose name is a prefix of the extension point name, and mount them
375 at the corresponding name below the subdirectory. Available since
376 0.1.
377
378 no-autodownload (boolean)
379 Whether to automatically download extensions matching this
380 extension point when updating or installing a 'related' application
381 or runtime. Available since 0.6.7.
382
383 locale-subset (boolean)
384 If set, then the extensions are partially downloaded by default,
385 based on the currently configured locales. This means that the
386 extension contents should be a set of directories with the language
387 code as name. Available since 0.9.13 (and 0.6.6 for any extensions
388 called *.Locale)
389
390 autodelete (boolean)
391 Whether to automatically delete extensions matching this extension
392 point when deleting a 'related' application or runtime. Available
393 since 0.6.7.
394
395 collection-id (string)
396 The ID of the collection that this extension point belongs to. If
397 this is unspecified, it defaults to the collection ID of the
398 application or runtime that the extension point is for. Currently,
399 extension points must be in the same collection as the application
400 or runtime that they are for. Available since 0.99.1.
401
402 [ExtensionOf]
403 This optional group may be present if the runtime is an extension.
404
405 ref (string)
406 The ref of the runtime or application that this extension belongs
407 to. Available since 0.9.1.
408
409 priority (integer)
410 The priority to give this extension when looking for the best
411 match. Default is 0. Available since 0.9.1, and backported to the
412 0.8.x branch in 0.8.3.
413
414 tag (string)
415 The tag name to use when searching for this extension's mount point
416 in the parent flatpak. Available since 0.11.4.
417
418 [Extra Data]
419 This optional group may be present if the runtime or application uses
420 extra data that gets downloaded separately. The data in this group gets
421 merged into the repository summary, with the xa.extra-data-sources key.
422
423 If multiple extra data sources are present, their uri, size and
424 checksum keys are grouped together by using the same suffix. If only
425 one extra data source is present, the suffix can be omitted.
426
427 NoRuntime (boolean)
428 Whether to mount the runtime while running the /app/bin/apply_extra
429 script. Defaults to true, i.e. not mounting the runtime. Available
430 since 0.9.1, and backported to the 0.8.x branch in 0.8.4.
431
432 uriX (string)
433 The uri for extra data source X. The only supported uri schemes are
434 http and https. Available since 0.6.13.
435
436 sizeX (integer)
437 The size for extra data source X. Available since 0.6.13.
438
439 checksumX (string)
440 The sha256 sum for extra data source X. Available since 0.6.13.
441
442 [Policy SUBSYSTEM]
443 Subsystems can define their own policies to be placed in a group whose
444 name has this form. Their values are treated as lists, in which items
445 can have their meaning negated by prepending ! to the value. They are
446 not otherwise parsed by Flatpak. Available since 0.6.13.
447
449 [Application]
450 name=org.gnome.Calculator
451 runtime=org.gnome.Platform/x86_64/3.20
452 sdk=org.gnome.Sdk/x86_64/3.20
453 command=gnome-calculator
454
455 [Context]
456 shared=network;ipc;
457 sockets=x11;wayland;
458 filesystems=xdg-run/dconf;~/.config/dconf:ro;
459
460 [Session Bus Policy]
461 ca.desrt.dconf=talk
462
463 [Environment]
464 DCONF_USER_CONFIG_DIR=.config/dconf
465
466 [Extension org.gnome.Calculator.Locale]
467 directory=share/runtime/locale
468 subdirectories=true
469
470 [Extension org.gnome.Calculator.Debug]
471 directory=lib/debug
472
474 flatpak(1), flatpak-run(1), flatpak-override(1)
475
477 1. freedesktop.org special directories
478 https://www.freedesktop.org/wiki/Software/xdg-user-dirs/
479
480 2. freedesktop.org Base Directory Specification
481 https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
482
483
484
485flatpak FLATPAK METADATA(5)