Introduction to packaging

This documentation is here to provide all the basic concepts and vocabulary needed to understand app packaging. eg: shell, parsing, system administration...

We will detail what a YunoHost application package is, how it works, how to make your own package and how to find help if you need it.

What is a YunoHost application package

Before we continue, we need to define what is exactly an application package.

To be able to do that, we need to remember that YunoHost at its core is a server operating system whose mission is to simplify selfhosting of internet services. To accomplish that, YunoHost provides, among other things, an administration panel allowing application installation in a few clicks.

If you have ever installed a web application manually, you already know that the process is in reality far more complex, usually involving a lot of steps and discipline.

This is what application packaging is: a series of scripts that automate the installation of a web application and its configuration in order to provide the final user with a few clicks installation process.

How it works

From the final user perspective, it is as simple as it can be:

  1. Pick an application
  2. Fill a form
  3. Wait
  4. Application is ready to use

There is more to see backstage:

First, when the application is selected, YunoHost will retrieve the corresponding package from github. eg: Custom Webapp.

Then, YunoHost will read the manifest.json file to know what questions to ask the user through the form.

These seemingly trivial questions are very important. Usually you would need to ask for the domain on which to install, the path to access, the user that will be designated administrator and the default language for the application.

These are critical to appropriately configure the web application during the installation process. To do so, YunoHost will retrieve the answers given by the user and send them to the installation script located in the package "scripts" folder.

The install script will handle the user answers to complete the process as you would have done manually.

If the user wants to delete the application, YunoHost will use the remove script from the "scripts" folder. It will handle the cleaning process for the user and delete all folders and configuration files that was previsouly installed by the application.

What is a script?

Scripts used during application packaging are simply a series of bash commands.

... bash command?

A bash command is a line of text that will be interpreted by the computer and will produce a result. This is commonly refered to as a command line.

You can ony interact with your server through the command line as it does not provide a graphical interface. Usual access is through ssh.

Package scripts are therefore a series of bash commands as if you had typed them directly in the ssh console.

To learn what you can write in a bash script, you should start reading this simple tutorial or this more advanced one.

Okay, I'm good! Where do I start?

Before starting the packaging process, you need to successfully install the application. The script will only perform what you instruct it to do.

Once completed, you need to read a little bit more documentation about application packaging. This one is more technical but now you should understand all the wizardry.


Fortunately, you are not alone in this!

There are other packagers like you and you can meet them on the forum or the chat.

Feel free to join in and ask your questions, there always will be someone to help.

Soon enough you'll see for yourself that packaging applications is not that hard after all.

Fehler gefunden? Möchten Sie diese Seite verbessern? Simply click the Edit link at the top of the page, and then the icon on Github to suggest changes.