# Mutilple Ghost instance in 1 VPS (MYSQL setup)

**URL:** <https://forum.ghost.org/t/mutilple-ghost-instance-in-1-vps-mysql-setup/23140>\
**Category:** Developer help\
**Created:** [May 31, 2021, 5:40am UTC](https://forum.ghost.org/t/mutilple-ghost-instance-in-1-vps-mysql-setup/23140 "2021-05-31T05:40:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yong](https://avatars.discourse-cdn.com/v4/letter/y/b487fb/32.png) [@yong](https://forum.ghost.org/u/yong)\
**Post date:** [May 31, 2021, 5:40am UTC](https://forum.ghost.org/t/mutilple-ghost-instance-in-1-vps-mysql-setup/23140/1 "2021-05-31T05:40:21Z")

</div>

My Site was running perfectly with [DigitalOcean Oneclick Ghost Hosting](https://marketplace.digitalocean.com/apps/ghost) it’s works perfectly, I’d like to have 2nd website for other domain, on issue on installation sinceI follow the instruction from website below.  
However, it seems both site are shared the same database with same login, any suggest on MySQL setup?

> **[How to install multiple Ghost instances on the same server](https://www.primates.dev/how-to-install-multiple-ghost-instances-on-the-same-server/)**
>
> Install a second Ghost Instance on your VPS in a few lines. Allowing you to save a lot of money on hosting.

---

<div class="post-metadata">

**Author:** ![ahmadajmi](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ahmadajmi/32/23173_2.png) [@ahmadajmi](https://forum.ghost.org/u/ahmadajmi)\
**Post date:** [May 31, 2021, 3:28pm UTC](https://forum.ghost.org/t/mutilple-ghost-instance-in-1-vps-mysql-setup/23140/2 "2021-05-31T15:28:31Z")

</div>

This is how I do it.

I assume:

- You are logged in to your droplet
- Your domain name is ready and connected to the droplet IP

* * *

## ➊

You need the current MySQL host, username, and password.

```auto
cd /var/www/ghost/

cat config.production.json

```

Take notes of them.

## ➋

Create a website directory, for example, `ubud`.

```auto
cd /var/www/

sudo mkdir ubud

sudo chown ghost-mgr:ghost-mgr ubud/

```

## ➌

Login to MySQL and create a new database.

```auto
sudo mysql -u root -p

CREATE DATABASE ubud;

GRANT ALL PRIVILEGES ON ubud.* to 'ghost'@'localhost' IDENTIFIED BY '7d150600c49e7c5860be7ce03d4f8df67259176738d926ec';

FLUSH PRIVILEGES;

exit

```

- `ghost` → database user
- `localhost` → database host
- `7d150600c49e7c5860be7ce03d4f8df67259176738d926ec` → database password

## ➍

Switch to the `ghost-mgr` user.

```auto
sudo -i -u ghost-mgr

```

## ➎

Install Ghost and follow the installation steps.

```auto
cd /var/www/ubud/

ghost install

```

That’s it.

**Make sure to have a droplet backup before doing anything.**

---

<div class="post-metadata">

**Author:** ![yong](https://avatars.discourse-cdn.com/v4/letter/y/b487fb/32.png) [@yong](https://forum.ghost.org/u/yong)\
**Post date:** [June 1, 2021, 2:58pm UTC](https://forum.ghost.org/t/mutilple-ghost-instance-in-1-vps-mysql-setup/23140/3 "2021-06-01T14:58:10Z")

</div>

> [@ahmadajmi](#):
>
> ➋

Thanks for the step by step guide, will try out `ghost install` with follow once I have droplet backup.

```auto
Enter your blog URL: https://<yourwebsitename>
? Enter your MySQL hostname: localhost
? Enter your MySQL username: ghost
? Enter your MySQL password: 7d150600c49e7c5860be7ce03d4f8df67259176738d926ec
? Enter your Ghost database name: ubud #Database

```
