Custom Server Environment
Deployment
Server Deployment
This guide covers deploying the application directly on your server. Make sure you have completed the database setup before proceeding.
To deploy the application on your server, follow these steps:
Install PM2 Process Manager
Install PM2 globally on your server:
npm install -g pm2Importing Codebase
In your SSH Terminal, type the following command to create a directory:
mkdir /var/www/nextjsNavigate to the above created directory via your server's File Manager. Upload the codebase to the directory.
Build the Application
Navigate to your application directory and build:
cd "/var/www/nextjs/source code"
npm install
npm run buildStart the Application
Start the application using PM2:
pm2 start npm --name "your-app" -- startSave PM2 Configuration
Save the PM2 configuration to survive server restarts:
pm2 save
pm2 startupMonitor the Application
You can monitor your application using:
pm2 monitorFramecast AI is ready and fully functional to use now.