Setting up dev environment
AppAPI development requires a Nextcloud development environment setup. We highly recommend using the nextcloud-docker-dev setup (originally developed by Julius Knorr) for this. For an alternate environment without using Docker, please refer to the setup instructions in Getting started.
Suggested IDE: PhpStorm, though you can certainly use any IDE of your preference such as VS Code or Vim.
Install AppAPI
All ExApps require the AppAPI Nextcloud app as a dependency. As of Nextcloud version 30.0.1, AppAPI is automatically installed by default. If you prefer, you can also build the latest development version of AppAPI from the source code, in which case uninstall the release version of AppAPI and perform the following steps.
Clone the latest main branch:
git clone https://github.com/nextcloud/app_api.git && cd app_api
or clone a specific version by specifying the version tag:
git clone https://github.com/nextcloud/app_api.git --branch <version-tag> && cd app_api
where <version-tag> is the version you want to install.
Then, build frontend assets in development mode:
npm ci && npm run dev
Enable AppAPI from the directory where the occ command resides:
./occ app:enable --force app_api
Deploy daemons types
There are two types of Deploy daemons that can be used for development and testing of ExApps:
manual_install: This type of Deploy daemon is running manually in the host machine. This is useful for ExApp development as you can run your ExApp directly on the host.docker_install: This type of Deploy daemon deploys ExApps as Docker containers through HaRP.
You can register (create) these daemons in the AppAPI admin settings.
For the equivalent occ command or an explanation of the Deploy daemon parameters,
see DaemonConfig registration.
HaRP
For development and testing in Docker, register a docker-install deploy daemon with
HaRP, see
Setup deploy daemon.