Installing the API
Installation will vary depending on your specific server and project goals. This guide with walk you through several of the most common installation methods.
Directus is quite flexible and can be installed on many different varieties of server/database setups. Learn more about the Directus Requirements.
- HTTP/Web Server
- MySQL 5.2+
- Database (empty or existing)
- Database User (with access to database)
- PHP 7.1+
xml(Only if you are installing PHPUnit)
The Directus API can be installed in three ways:
For instructions on how to setup a local development copy, checkout our dev install guide
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.
Web Server Setup
Directus API should work on any HTTP Server, but most testing has been done on Apache 2, NGINX, and Caddy.
- The root directory for Directus API should be set the
- Make sure the directory ownership is set to user the web server is running under. Usually the user is
sudo chown -R www-data:www-data /var/www/api
- The following files/folders should have write permission:
/public/uploads(or your configured upload directory)
Specific Server Setup
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.
If you followed the steps above 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.