Skip to content

Deploy multi-language ghost on DigitalOcean

To support two languages, you’ll need to install two Ghost sites on the same server, setting up separate instances for each language.

  1. Default English - https://domain.com
  2. Korean Site - https://domain.com/kor/

Requirements

  1. DigitalOcean account (if have not one, register new DigitalOcean account here)
  2. Termius Software on your Desktop (Free download it here)

1. Generate SSH Key for Server Access

If you don’t already have an SSH key, follow these simple steps:

  1. Open Termius (which you downloaded earlier).
  2. Navigate to Settings > Keychain > Generate Key.
  3. Name your key label and select RSA as the key type.
  4. Click on Generate and Save.
Generate SSH key
Generate SSH key

Make sure to copy and securely store both the Private Key and Public Key. These keys will be essential for secure access to your server.

Public Key look like
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCUBJ2jKLbwL580TuD/+txGQpq7JuMVgz4ha5U097BhyU2q50GvzgKpipxxxx...

2. One-click install ghost

Refer to the official Ghost documentation for a step-by-step guide on installing Ghost.

However, make sure to create a new server with a minimum of 2GB RAM as per the requirements (2 ghosts).

One-click install will auto install all server requirements for ghost.

Play

Watch the video above as it guides you through the one-click installation of Ghost on DigitalOcean, providing easy-to-follow instructions.

type your domain
Type your domain

3. Install the second ghost

Refer to Aspire Themes tutorials for a step-by-step guide on installing sencond Ghost on DigitalOcean. Thanks Aspire Themes.

However, there are some differences.

Use Termius to access the DigitalOcean server.

Access DigitalOcean server
Access DigitalOcean server
  1. You need the current MySQL host, username, and password.

    Terminal window
    cd /var/www/ghost/
    cat config.production.json

    Take notes of them. You will use them later in steps 3 and 5.

  2. Create a website directory ghost-Korea

    Terminal window
    cd /var/www/
    sudo mkdir ghost-Korea
    sudo chown ghost-mgr:ghost-mgr ghost-Korea/
  3. Login to MySQL and create a new database

    Terminal window
    sudo mysql -u root -p
    CREATE DATABASE ghost-Korea;
    GRANT ALL PRIVILEGES ON ghost-Korea.* to 'ghost'@'localhost' IDENTIFIED BY '7d150600c49e7c5860be7ce03d4f8df67259176738d926ec';
    FLUSH PRIVILEGES;
    exit

    Note down:

    • MYSQL password: 7d150600c49e7c5860be7ce03d4f8df67259176738d926ec
    • Database name ghost-Korea You will need it for for step 5.
  4. Switch to the ghost-mgr user

    Terminal window
    sudo -i -u ghost-mgr
  5. Install Ghost and follow the installation steps

    Terminal window
    cd /var/www/ghost-Korea/
    ghost install

    At Blog URL question, you need to fill https://yourdomain.com/kor

    Check more ghost install with CLI


4. Config Nginx

Play
  1. Edit domain.com-ssl.conf

    Terminal window
    cd /etc/nginx/sites-availables
    ls
    nano domain.com-ssl.conf
  2. Add proxy block as below

    domain.com-ssl.conf
    ...
    location / {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $http_host;
    proxy_pass http://127.0.0.1:2368;
    }
    location /kor/ {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $http_host;
    proxy_pass http://127.0.0.1:2369;
    }
    ...
  3. Now you 2 ghosts and can access to ghost admin at:

    1. English site (primary language) — https://domain.com/ghost/
    2. Korean site (secondary language) — https://domain.com/kor/ghost/

Check the Ghost Config documentation for instructions on setting up SMTP and other configurations for each Ghost instance.