For now, a YunoHost package must contain five Shell scripts: install, remove, upgrade, backup and restore. A 6th script change_url can also be added optionally. These scripts will be executed as root on the YunoHost instances.

Examples scripts are available in the example app


You have to put everything in the install script in order to get the app to install without issue. It means that you have to install dependencies, create required repositories, initialize potential databases, copy sources and configure everything in the single install script (and of course do the reverse process in the remove script).

It's possible to use helpers and import function library by example from a file.

Available variables for these scripts


This var contains the current working directory path of the executed script. It can be useful for find out the initial path if we have move of directory during the script execution. It is used by some helpers to be sure to use the good directory.


It contains the application's identifier without the instance's number.

Example: strut


It contains the instance name which will is used in a lot of situation to manage multiple setup of the same app.

Example: strut__3


It contains the instance's number. Warning, it's not the number of running instances because an old app might be deleted.

Example: 3

Variables specific to install


An environment variable is available for each question asked in the installation.

For example, if in the manifest we have a question like this

    "name": "domain",
    "type": "domain",
    "ask": {
        "en": "Choose a domain for OpenSondage",
        "fr": "Choisissez un nom de domaine pour OpenSondage",
        "de": "Wählen Sie bitte einen Domain für OpenSondage"
    "example": ""

The name of the question is domain so in the script we can access it with YNH_APP_ARG_DOMAIN. The usage is to create a shorter name in the script like this:


Variables specific to change_url


The old domain where the app was installed.


The old path where the app was installed.


The new domain where move the app.


The new path where move the app.

Found errors? Think you can improve this documentation? Simply click the Edit link at the top of the page, and then the icon on Github to suggest changes.