Our decoupled architecture allows you to install just the Directus API, without the admin App. This is useful if you want one App to manage multiple APIs.
Directus is quite flexible and can be installed on many different varieties of server/database setups. Learn more about the Directus Requirements.
xml(Only if you are installing PHPUnit)
Installation will vary depending on your specific server and project goals. This guide with walk you through three of the most common installation methods.
The easiest way of installing and updating the API is through Git. By using the build branch on our repo, you're assured to have the latest version pre-bundled and ready to go.
To install the pre-bundled build version through Git, run
git clone -b build https://github.com/directus/api.git
If you don't have access to the command line for your server, you can download the static bundle manually as a zip. Head over to the releases page to download a fresh copy of the latest version.
Directus API should work on any HTTP Server, but most testing has been done on Apache 2, NGINX, and Caddy.
sudo chown -R www-data:www-data /var/www/api
/public/uploads(or your configured upload directory)
For local development environments you can use WAMP, XAMP or MAMP
We appreciate any pull-requests outlining steps for new server-types. Just submit them to these Docs on GitHub.
Lastly, we need to generate a project config file and add the system boilerplate data to the database.
Once you've finished configuration then you have successfully installed the Directus API and can now access secure endpoints with your Admin credentials. To learn more about the many Directus API endpoints you can browse our API Reference.
With a versionless API, nothing is ever removed or changed—only added. This means that you never have to worry about breaking your integrations when upgrading to the latest version. We've thoroughly vetted every endpoint and parameter in our new decoupled API to ensure there is no need for deprecations in the foreseeable future. You'll also notice that our API URLs don't include a version number, but you can still reference the technical API version in code to know which new features are available.
If you're using a direct clone of the
build branch, all you need to do to update the API is run
$ git pull
Updating is basically the same as installing fresh. You can download a copy of the latest version from the releases page and overwrite the files you had before. Make sure not to override any uploads within
/public/uploads/, logs within
/logs, or config files within
After you update the Directus API code, there may be changes in the database, such as a new field, a field with a different interface or new options.