How to: Install a Third-party App
This guide will show you how to install Apps created by other developers on your Datasite.
Apps are an essential component of the SyftBox ecosystem - they allow someone to propose for execution a specific code on one or more Datasites.
File Structure
The contents of an App shall be contained in a directory and are recognised by SyftBox based on the following conditions:
- they are placed under the
apps
directory - they contain a
run.sh
file (the runner script)
Essentially, this is an App - thus, it is very simple to install it, as you only need to copy the directory containing the App to the apps
directory.
Option 1: Install an App from a Github repository
The following commands assume you have a shell (terminal) open with the SyftBox directory as the current directory. You can check this by running:
pwd
and verify that the output matches the SyftBox directory
Navigate to the apps
directory:
cd apps
Then, clone the repository containing the third-party App you want to install:
git clone APP_REPO_URL
Example:
git clone git@github.com:OpenMined/inbox.git
The example above will install the inbox
App, developed by OpenMined.
Installing Apps by cloning repositories is recommended because it will make it easier to update them in the future, when the App's developer releases a new version.
Option 2: Install an App from a different local directory
Since SyftBox Apps are just directories containing the source code, you can install an App by copying its associated files in a directory under apps
:
cd apps
cp -r APP_SOURCE_DIR .
For example:
cp apps
cp -r /home/alice/syftbox_apps/my_app .
This method could be useful in case you have a monorepo of SyftBox Apps and want to install them individually.
Option 3: Receive an App proposal from another Datasite
This is possible via the inbox
App. Incoming App requests appear in your datasite's inbox/
folder.
To handle them, first notice that the inbox/
folder contains two symlinked subfolders:
approved
: Links to/SyftBox/apps/
, where approved Apps start executing automaticallyrejected
: Serves as a temporary bin. Rejected Apps remain here for 7 days before being deleted
In addition to those symlinked subfolders, you will see new directories that corespond to proposed Apps:
- Inspect the code of each App requests in the
inbox/
folder - After reviewing, move the App folder to either
approved
orrejected
, based on your decision