How to Install Nhost on Ubuntu Server Latest
Nhost is a cloud backend platform that allows you to develop mobile and web applications with features such as database management, authentication, file storage, and GraphQL API. In this tutorial, we will guide you through the installation process of Nhost on an Ubuntu Server.
Prerequisites
- Ubuntu Server Latest.
- Sudo privileges on the server.
Step 1: Update and Upgrade your Server
Open your terminal and update your server to the latest version.
sudo apt update && sudo apt upgrade -y
Step 2: Install PostgreSQL
Nhost uses PostgreSQL as its default database. Therefore, we need to install it on our server.
sudo apt install postgresql postgresql-contrib -y
Once the install is complete, start the PostgreSQL service and enable it to start on boot.
sudo systemctl start postgresql && sudo systemctl enable postgresql
Step 3: Install Node.js and NPM
Nhost works with Node.js and NPM, so let's install them on our server.
sudo apt install nodejs npm -y
Verify that Node.js and NPM are installed with the following commands:
node --version
npm --version
Step 4: Install Nhost CLI
Nhost provides a Command Line Interface (CLI) that makes it easier to manage projects. We can install the CLI using the following command.
npm i -g nhost
Step 5: Install Hasura CLI
Nhost uses Hasura as its database management tool. We can install Hasura CLI using the following command.
curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash
Step 6: Initialize Nhost
We can now initialize Nhost by using the Nhost CLI.
nhost init
This command will create a nhost folder in the current directory and generate a nhost-backend folder inside it.
Step 7: Start Nhost
We can start Nhost using the following command.
nhost dev
Congratulations! Nhost is now installed and running on your Ubuntu Server. You can now access it from your browser at http://localhost:3000.
Conclusion
In this tutorial, we have shown you how to install Nhost on an Ubuntu Server Latest. You can now start developing your applications using Nhost. If you have any problems or questions, please refer to the Nhost documentation or contact their support team.