# Install Backend

Pixy Backend is build using Directus - is a open source real-time API and App dashboard for managing SQL database content.&#x20;

#### Directus & Demo Data installation using Docker

* Before start you need have installed Docker.&#x20;
* Open Terminal run command `docker -v` for check if it already installed. Download and install Docker on you environment you can from [official website](https://docs.docker.com/get-started/get-docker/).
* Open a new Terminal window and go to your Pixy Directus directory `command cd your_works_dir_path/pixy/directus`&#x20;
* Run directus container using command `docker compose up`&#x20;
* Pixy App Dashboard should now be available at [http://localhost:8055](http://localhost:8055/) or [http://127.0.0.1:8055](http://127.0.0.1:8055/).
* Default Administrator login: **<admin@example.com>**, password: **d1r3ctu5**

#### Directus & Demo Data installation using CLI

If for some reason you can't install/use Docker. You can install Directus using npx:

* Before start, you need have installed PostgreSQL server, please see here detailed [step-by-step guide](https://www.prisma.io/dataguide/postgresql/setting-up-a-local-postgresql-database).
* Create new directory `mkdir directus-cli` and open it `cd directus-cli`
* Run command `npx directus init` to start installing latest directus package
* Next step press "y" for submit,&#x20;
* Next step select database client "PostgreSQL",&#x20;
* Next confirm database name, user and password to your PostgreSQL server. Press "Enter"
* Create your first admin user (email, password)
* Launch Directus by running `npx directus start`.
* Access your Pixy App Dashboard at [http://localhost:8055](http://localhost:8055/).
* Now need copy/paste folders "*/pixy/directus/extensions/",* "*/pixy/directus/data/",* "*/pixy/directus/template/" and "/pixy/directus/uploads/"* from your project directory
* Using pgAdmin 4 or psql command line tool restore database from "*/pixy/directus/dump.sql"* for get all demo data
* Run `npx directus database migrate:latest`  for update current database to latest installed directus package version
* Restart directus-cli, ctrl+c and run `npx directus start`  again.
* Pixy App Dashboard should now be available at [http://localhost:8055](http://localhost:8055/) or [http://127.0.0.1:8055](http://127.0.0.1:8055/).
* Default Administrator login: **<admin@example.com>**, password: **d1r3ctu5**&#x20;

Check additional CLI commands on [official website](https://docs.directus.io/self-hosted/cli.html)
