Version: 1 (Draft)

In this section is described the recipe specification and all the components that affects its behaviour.


Environment variables

Environment variables can be placed anywhere in the configuration file; must have !ENV before them and specified in this format to be parsed: ${VAR_NAME}.

    version: !ENV ${APP_VERSION}
    exec: !ENV 'lib/${GNU_ARCH_TRIPLET}/qt5/bin/qmlscene'
  arch: !ENV '${TARGET_ARCH}'
  file_name: !ENV 'myapp-${APP_VERSION}_${TIMESTAMP}-${ARCH}.AppImage'

NOTE: To mix variables that must be parsed with other that not use the following syntax: !ENV '${PARSED_VAR}-"$NON_PARSED_VAR"'


The script section consists of a list of shell instructions. It should be used to deploy your application binaries and resources or other resources that cannot be resolved using the package manager.

Example of how to deploy a regular cmake application binaries.

  - cmake .
  - make DESTDIR=Appdir install

In the cases where you don’t use a build tool or it doesn’t have an install feature, you can run any type of command in this section. In the example below a QML file is deployed to be used as part of a pure QML application.

  - mkdir -p AppDir
  - cp -f main.qml AppDir/


The AppDir section is the heart of the recipe. It will contain information about the software being packed, its dependencies, the runtime configuration, and the tests.

The execution order is as follows: - bundle dependencies - configure runtime - run tests

Section scripts

It’s possible to insert scripts before and after the bundle and runtime steps. Those can be used to perform additional tweaks to the AppDir before proceeding with the tests.

The allowed keys are:

  • before_bundle
  • after_bundle
  • before_runtime
  • after_runtime

This is an example of how to use the after bundle to patch a configuration file.

  after_bundle: |
    echo "source /etc/timidity/freepats.cfg" | tee AppDir/etc/timidity/timidity.cfg


Path to the AppDir.

  path: ./AppDir


  • id: application id. Is a mandatory field and must match the application desktop entry name without the .desktop extensions. It’s recommended to used reverse domain notation like
  • name: Application name, feel free here.
  • icon: Application icon. It will be used as the bundle icon. The icon will be copied from $APPDIR/usr/share/icons or from your system folder /usr/share/icons.
  • version: application version.
  • exec: path to the application binary. In the case of interpreted programming languages such as Java, Python or QML, it should point to the interpreter binary.
  • exec_args: arguments to be passed when starting the application. You can make use of environment variables such as $APPDIR to refer to the bundle root and/or $@ to pass arguments to the binary.
  id: org.apppimagecrafters.hello_qml
  name: Hello QML
  icon: text-x-qml
  version: 1.0
  exec: usr/lib/qt5/bin/qmlscene
  exec_args: $@ ${APPDIR}/main.qml


The apt section is used to list the packages on which the app depends and the sources to fetch them.
  • arch: Binaries architecture. It must match the one used in the sources configuration.

  • sources: apt sources to be used to retrieve the packages.

    • sourceline: apt configuration source line. It’s recommended to include the Debian architecture on it to speed up builds.
    • key_url: apt key to validate the packages in the repository. An URL to the actual key is expected.
  • include: List of packages to be included in the bundle. Package dependencies will also be bundled. It’s also possible to include deb files their path.

  • exclude: List of packages to not bundle. Use it to exclude packages that aren’t required by the application.

 arch: i386
   - sourceline: 'deb [arch=i386] bionic main restricted universe multiverse'
     key_url: ''

   # downloaded file
   - ./libmms0_0.6.4-2_amd64.deb

   # package names
   - qmlscene
   - qml-module-qtquick2
   - qtchooser

The tool generates a cache where the downloaded packages and other auxiliary files are stored, it will be located in the current work dir with the name appimage-builder-cache. It’s safe to erase it and should not be included in your VCS tree.


This section can be used to instruct appimage-builder to deploy packages using the pacman package manager. It uses the pacman configuration from the host system by default but can be modified using the following keys:

  • Architecture: (Optional) define the architecture to be used by pacman
  • repositories: (Optional) define additional repositories
  • include: (Required) define packages to be deployed into the AppDir
  • exclude: (Optional) define packages to be excluded from deploying


  Architecture: x86_64
    - bash
    - perl


The files section is used to manipulate (include/exclude) files directly. Globing expressions can be used to match multiple files at once.

  • include: List of absolute paths to files. The file will be copied under the same name inside the AppDir. i.e.: /usr/bin/xrandr will end at $APPDIR/usr/bin/xrandr.
  • exclude: List of relative globing shell expressions to the files that will not be included in the AppDir. Expressions will be evaluated relative to the AppDir. Use it to exclude unrequired files such as man pages or development resources.
    - usr/share/man
    - usr/share/doc/*/README.*
    - usr/share/doc/*/changelog.*
    - usr/share/doc/*/NEWS.*
    - usr/share/doc/*/TODO.*


The test section is used to describe test cases for your final AppImage. The AppDir as it’s can be already executed. Therefore it can be placed inside a Docker container and executed. This section eases the process. Notice that you will have to test that the application is properly bundled and isolated, therefore it’s recommended to use minimal Docker images (i.e.: with no desktop environment installed).

IMPORTANT: Docker is required to be installed and running to execute the tests.

Each test case has a name, which could be any alphanumeric string and the following parameters:

  • image: Docker image to be used.
  • command: command to execute.
  • use_host_x: whether to share or not the host X11 session with the container. This feature may not be supported by some containers as it depends on X11.
  • env: list of environment variables to be passed to the Docker container.
    image: fedora:26
    command: "./AppRun main.qml"
    use_host_x: True
    image: ubuntu:xenial
    command: "./AppRun main.qml"
    use_host_x: True


Advanced runtime configuration.

  • env: Environment variables to be set at runtime.

  • path_mappings

    Setup path mappings to workaround binaries containing fixed paths. The mapping is performed at runtime by intercepting every system call that contains a file path and patching it. Environment variables are supported as part of the file path.

    Paths are specified as follows: <source>:<target>

    Use the $APPDIR environment variable to specify paths relative to it.

    - /etc/gimp/2.0/:$APPDIR/etc/gimp/2.0/
    PATH: '${APPDIR}/usr/bin:${PATH}'


The AppImage section refers to the final bundle creation. It’s basically a wrapper over appimagetool

  • arch: AppImage runtime architecture. Usually, it should match the embed binaries architecture, but a different —compatible one— could be used. For example, i386 binaries can be used in an AMD64 architecture.
  • update-info: AppImage update information. See Making AppImages updateable.
  • sign-key: The key to sign the AppImage. See Signing AppImage.
  • file_name: Use it to rename your final AppImage. By default it will be named as follows: ${}-${AppDir.app_info.version}-${AppImage.arch}.AppImage. Variables are not supported yet and are used only for illustrative purposes.