# Install Gravity

Finally, time for the fun part – let's run your new application.

### 1. Clone The Repos

Create a new folder for your project and clone all the repos you were invited to into the project root, eg.

```bash
git clone https://github.com/.../server
git clone https://github.com/.../client-react-web
git clone https://github.com/.../mission-control
git clone https://github.com/.../website
git clone https://github.com/.../client-react-native 

```

You should now have a folder structure with a server subfolder, mission control (Node.js only) and at least one client folder, depending on which plan you purchased.

* server (or next)
* client-react-web
* client-react-native
* mission-control
* website

### 2. Install Packages

Open up a new terminal window and navigate to the folder where you saved Gravity, go into the server folder and run the following command:

```javascript
npm run setup
```

Gravity will also rename the client folders to **client** and **app** and install the packages for the server and client(s).

{% hint style="info" %}
If you experience any issues during this process, you can run a manual install using the following commands.&#x20;

```javascript
npm install
npm link
cd client (Node.js version only)
npm install (Node.js version only)

// optional for mobile app
cd app
npm install
```

{% endhint %}

### 3. Setup Wizard&#x20;

Once the installation has been completed, Gravity will start the server and client and open a new browser window with the homepage, please navigate to <http://localhost:3000/setup>.

You'll be presented with the Gravity welcome screen. Follow the instructions on screen to connect to your database and connect your [Stripe](https://docs.usegravity.app/gravity-server/installation/stripe-setup) and email accounts.

You can manually configure your application in the [/config](https://docs.usegravity.app/gravity-server/config) folder if you have any problems during setup.

{% hint style="warning" %}
If your server is running remotely and not localhost, you will need to update the `server_url` in client/src/setting.json&#x20;
{% endhint %}

{% hint style="warning" %}
If you're using MongoDB, you will need to run the seed file manually:&#x20;

**node seeds/mongo**
{% endhint %}

{% hint style="danger" %}
Once you have completed these steps, you **must restart your server.**
{% endhint %}

Use the following command to run both the server and the client. Use this from now on any time you want to run your application.

```
npm run dev
```

Your browser window will open automatically and you can click on signup and [create an account](https://docs.usegravity.app/gravity-server/installation/stripe-setup).

### 4. Clean Up

{% hint style="danger" %}
You **MUST** remove the setup files when you have completed the steps above. Failing to do so will let anyone access the setup process.
{% endhint %}

You can use the cleanup script to automate this for you:

```javascript
npm run cleanup
```

If you want to remove the files manually:

* /client/src/views/setup folder
* /server/controller/setupController
* /server/model/setup
* remove the setup import from /server/api/index.js
* the setup route import in /client/src/app.js

{% hint style="warning" %}
It's recommended that you run **npm audit** in each installation folder to ensure third-party packages are up-to-date and secure.
{% endhint %}
