Setup Nextjs on Ubuntu in Azure/AWS/GCP

Setup and install Next.js on Ubuntu 24.04 on Azure, AWS or Google GCP using the public marketplace image ready for fast deployment.  Create as many applications as needed. Next.js is a popular React framework that enables developers to build fast, scalable, and SEO-friendly web applications.

Cloud Next.js on Ubuntu 24.04

Nextjs on Azure

nextjs azure

Deploy Nextjs on Ubuntu 24.04 in Azure

Nextjs on AWS

Coming soon…

Nextjs on GCP

Coming soon…

Getting Started with Next.js

Once your Nextjs server has been deployed, the following links explain how to connect to a Linux VM:

 

 

Once connected and logged in, the following section explains how to start using Next.js and create your first project.

Create a new Next.js Application

Once logged in, you’re ready to create your Next.js application. First we will create a directory where your application will run from with the following command. In my example my app is called cisapp

				
					npx create-next-app cisapp
				
			

You will be presented with some installation questions. Select Yes or No depending on your requirements.

Once the setup has completed, lets open the new application and install any dependencies:

				
					cd cisapp
npm install
				
			

Now lets start the development server:

				
					npm run dev
				
			

This starts the Next.js development server on http://ServerIPAddress:3000.

 

Once the server is running, you should see a page saying “Welcome to Next.js!” when you visit the URL.

Build Nextjs for Production

Once your application is ready for production, you can build and export the static assets.

 

Run the following command to build the application:

				
					npm run build

				
			

After the build process is complete, start the server:

				
					npm start

				
			

Your Next.js application is now optimized and ready to run in production.

Documentation / Support

Further tutorials and support can be found on the following official link:

 

https://nextjs.org/docs

 

Any issues with deployment, please contact us for any support.

Nextjs Firewall Ports

Nextjs uses the following port.

 

  • TCP 3000

 

The links below explain how to modify / create firewall rules depending on which cloud platform you are using.

 

To setup AWS firewall rules refer to – AWS Security Groups

To setup Azure firewall rules refer to – Azure Network Security Groups

To setup Google GCP firewall rules refer to – Creating GCP Firewalls

Disclaimer: Next.js® is a registered trademark of Vercel and is released under the MIT License. The license comes with a “no warranty” clause, meaning the software is provided “as-is” without any guarantees or liability for issues that may arise.

Avatar for Andrew Fitzgerald
Andrew Fitzgerald

Cloud Solution Architect. Helping customers transform their business to the cloud. 20 years experience working in complex infrastructure environments and a Microsoft Certified Solutions Expert on everything Cloud.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x