# Create an app on your cloud server

Each website or web application you host on your own server is a separate app. For each app, you can use different settings such as different PHP versions.

## Create an app

To create an app using the ServerPilot dashboard:

1. Go to the [Apps](https://manage.serverpilot.io/apps) page in the dashboard and click **Create App**.
2. Choose a **Name** for the app. You’ll see this name in ServerPilot and file paths.
3. For the **Domain**, use your server’s IP address. You can add your real domain later. For now, we’ll use the server’s IP address to preview the app.
4. If you’re creating a WordPress app, select **WordPress** and choose a **Site Title**, **Admin User**, **Password**, and **Email** for the WordPress admin account that will be created.
5. Select the **Server** that the app will be created on.
6. Select the **PHP Version** the app will use.
7. Leave the default option **Create a new system user** selected. ServerPilot will create a system user with the same name as your app.
8. Choose a **System User Password**. This will be the password you use to access the app’s files by SSH or SFTP.
9. Click on **Create App**.

## Preview your app using the server’s IP address

Because you used your server’s IP address as the app’s **Domain** when you created the app, you can preview the app at `http://IP_ADDRESS/`.

## Use a domain name

To access your app using a domain name, update DNS so your domain resolves to your server’s IP address and then add the domain to your app.

### Update DNS

To update your domain’s DNS:

1. Log in to the service where you manage your domain’s DNS. This is often your domain registrar or cloud provider.
2. Edit your domain’s DNS `A` record and set the value to your server’s IP address.

Depending on the DNS TTL value for your domain’s `A` record, it may take a few minutes to a few hours before your domain begins resolving to your server’s IP address.

### Add your domain

To add your domain to an app in ServerPilot:

1. Go to the [Apps](https://manage.serverpilot.io/apps) page in the dashboard and click on the name of the app.
2. Click on **Domains**.
3. Enter the domain in the **Add Domain** form.
4. Click on **Add Domain**.

When your server receives requests for this domain name, those requests will now be served by this app.

## Enable AutoSSL

You can enable AutoSSL as soon as you’ve updated your domain’s DNS and you’ve added the domain to your app.

To enable AutoSSL for your app:

1. Go to the [Apps](https://manage.serverpilot.io/apps) page in the dashboard and click on the name of the app.
2. Click on **SSL**.
3. Click on **Enable AutoSSL**.

With AutoSSL enabled, you can now access your app at `https://DOMAIN/`. ServerPilot will automatically keep your app’s SSL certificate updated.

## Create a database

If you need to create a MySQL database for your app:

1. Go to the [Apps](https://manage.serverpilot.io/apps) page in the dashboard and click on the name of the app.
2. Click on **Databases**.
3. Click on **Create Database**.
4. Enter a **Name**, **Username**, and **Password** for the database.
5. Click on **Create Database**.

## SSH and SFTP access

You can access your app’s files by SSH or SFTP with the following credentials:

- **Username**: the name of the app  
- **Password**: the system user password you chose when creating the app  
- **Web root directory**: `apps/APPNAME/public`
