Installing Directus on Ubuntu Server
Directus is an open-source headless CMS built using Node.js, Vue.js, and GraphQL. In this tutorial, we'll walk you through the steps to install Directus on Ubuntu Server.
Prerequisites
Before we begin, make sure you have the following installed on your Ubuntu Server:
- Node.js version 10 or later
- NPM version 6 or later
- MySQL or MariaDB database server with a user account
Step 1: Install Directus
Open the terminal on your Ubuntu Server and run the following command to install Directus globally.
sudo npm install -g directusAfter the installation is complete, create a new Directus project with the following command, replacing
my-projectwith your project name.directus create my-projectWhen prompted, select the database driver you want to use with Directus, then provide the database connection details, such as database host, port, username, and password.
After the project is created, navigate to the project root directory:
cd my-projectStart the Directus server with the following command:
directus startYour Directus project should now be running on http://localhost:8055.
Step 2: Configure Directus
Open your web browser and navigate to http://localhost:8055/admin to access the Directus admin interface.
Log in using the default username and password:
- Username:
[email protected] - Password:
pass123
- Username:
Once you are logged in, you can modify the database schema, add data, manage users, and customize the UI.
Conclusion
That's it! You've successfully installed Directus on your Ubuntu Server and configured it. You can now use Directus to manage your content and build your headless application.