mirror of
https://github.com/directus/directus.git
synced 2026-02-17 13:01:21 -05:00
This slightly nicer syntax was introduced back in "npm@6.1.0". "node@12.20.0", which is the minimum version we require, ships with "npm@6.14.8". "npm@6" versions below "6.1.0" were never actually shipped with any node version, so it should be very safe to use this syntax.
85 lines
2.4 KiB
Markdown
85 lines
2.4 KiB
Markdown
# Installing from CLI
|
|
|
|
## 1. Confirm Minimum Requirements
|
|
|
|
Directus requires two things to run: [Node.js](https://nodejs.dev) and a Database. For both these system requirements,
|
|
we aim to support the current LTS release (and newer).
|
|
|
|
To run Directus, you currently need Node 12.20 or newer, and one of the following databases:
|
|
|
|
| Database | Version |
|
|
| --------------------- | ------- |
|
|
| PostgreSQL | 10+ |
|
|
| MySQL | 5.7.8+ |
|
|
| SQLite | 3+ |
|
|
| MS-SQL Server | 13.0+ |
|
|
| OracleDB<sup>\*</sup> | 19+ |
|
|
| MariaDB | 10.2+ |
|
|
|
|
<sup>\*</sup> Make sure to install `node-oracledb` and it's system dependencies when using OracleDB
|
|
|
|
::: tip Variants
|
|
|
|
In addition to the databases above, other variants are also supported, including **AWS Aurora** (MySQL), **AWS
|
|
Redshift** (PostgreSQL), and **MariaDB**.
|
|
|
|
:::
|
|
|
|
::: tip Apple Silicon
|
|
|
|
When installing Directus on an Apple-made ARM CPU, make sure you have `libvips` installed. See
|
|
[Apple M1](https://sharp.pixelplumbing.com/install#apple-m1).
|
|
|
|
:::
|
|
|
|
## 2. Create a Project
|
|
|
|
Navigate to the directory where you wish to create a new Directus project. The new project and directory will be created
|
|
inside the current directory. Create a new Directus project by running the following npm command.
|
|
|
|
```bash
|
|
npm init directus-project my-project
|
|
```
|
|
|
|
::: warning
|
|
|
|
Except for SQLite, the database must already be running before creating your Directus project.
|
|
|
|
:::
|
|
|
|
## 3. Start your Project
|
|
|
|
To start Directus, navigate to the project directory, _my-project_.
|
|
|
|
```bash
|
|
cd my-project
|
|
```
|
|
|
|
Run the following command in your project directory.
|
|
|
|
```bash
|
|
npx directus start
|
|
```
|
|
|
|
## 4. View your Project
|
|
|
|
The default port used by Directus is 8055. To view your project locally, go to
|
|
[http://localhost:8055](http://localhost:8055) in your browser.
|
|
|
|
::: tip Changing Port
|
|
|
|
If you want to use a different port, use [the `PORT` environment variable](/reference/environment-variables/#general).
|
|
|
|
:::
|
|
|
|
::: tip .env Permissions
|
|
|
|
By default, the `create-directus-project` tool will set the file permissions of the generated `.env` to `-rw-r-----`
|
|
(0640). If you run Directus from a separate user on your machine, make sure these permissions are correct.
|
|
|
|
:::
|
|
|
|
## Configure / Update / Upgrade your Project
|
|
|
|
See the [Project Guide](/guides/projects/#upgrading-updating-a-project) to learn how to maintain your project further.
|