How to run Gatsby on Cloudways?

by ryan.murray , in category: Third Party Scripts , 5 months ago

How to run Gatsby on Cloudways?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer


by dana , 5 months ago


To run Gatsby on Cloudways, you can follow these steps:

  1. Sign up for a Cloudways account or log in to your existing account.
  2. Create a new server by selecting your desired cloud provider, server size, and location.
  3. Once your server is deployed, go to the Application Management section and click on the "Launch" button.
  4. Select "Custom Application" from the available options.
  5. Fill in the required fields, such as Application Name, Project Path, Public Web Root, and Application Engine (you can choose "Static/PHP" for Gatsby).
  6. Choose the PHP version you want to use (Gatsby requires Node.js, not PHP, so any version will work).
  7. Click on the "Launch Now" button to create your application.
  8. After the application is created, go to the Application Management section and click on your newly created app.
  9. In the Access Detail section, note down the SFTP/SSH credentials for future use.
  10. Connect to your server using an FTP/SFTP client (such as FileZilla) using the provided credentials.
  11. Upload your Gatsby project files to the project folder on the server.
  12. SSH into your server using an SSH client (such as PuTTY) and navigate to the project folder.
  13. Install the required dependencies by running the command npm install.
  14. Once the dependencies are installed, you can build your Gatsby site by running the command npm run build.
  15. After the build process is complete, your Gatsby site should be ready to be served.
  16. To configure your domain name, go to the Domain Management section in Cloudways, add your domain, and map it to your Gatsby application.
  17. You can also enable SSL for your domain by installing an SSL certificate from the SSL Certificate Management section.

That's it! Your Gatsby site should now be up and running on Cloudways. You can access it using your domain name or the provided server IP.