Set Up and Secure a Dedicated Ubuntu Server for PostgreSQL, React/Next.js, and Production Deployment

Job ID: 39328198

Budget: $10 – $220 USD

I’m looking for a highly skilled server administrator / DevOps engineer to set up, optimize, and secure a dedicated server running Ubuntu 22.04 LTS, with the goal of hosting a large-scale PostgreSQL database (provided privately), and deploying a web application built with React and Next.js.

## The success of this project depends on the complete and verified import of the database and the secure, optimized setup of the entire stack.

####### Your Responsibilities: #######
1. PostgreSQL & Backend Setup
- Install the latest version of PostgreSQL
- Install and configure pgAdmin 4 for DB management
- Perform PostgreSQL hardening:
- Set strong DB passwords
- Listen only on localhost or VPN IP
- Use least-privilege DB users
-Set up regular backups (local or remote)
- Import the full 2TB database (provided privately)
- Ensure all data is accessible, indexed, and working

2. Frontend Environment
- Install Node.js (LTS version) and npm/yarn
- Install PM2 (or Docker if preferred) to run and manage the React/Next.js app
- Set up Nginx as a reverse proxy for the app
- Configure SSL via Let’s Encrypt (Certbot)

3. Web App Security (Node.js / Next.js)

- Enable HTTPS (Let’s Encrypt)
- Use Nginx to sandbox the app
- Run with PM2 for auto-restart and stability
- Set secure HTTP headers (XSS, CSP, HSTS, etc.)

4. OS-Level Security Hardening

- Change default SSH port (22 → custom port)
- Disable root SSH login & enforce SSH key access
- Install and configure UFW to allow only:
- SSH (custom port), HTTP (80), HTTPS (443)
- Install and configure Fail2Ban to block brute force
- Apply all pending updates and security patches
- Enable unattended-upgrades for future patching
- Remove unused packages and services

5. GUI and Tools for Ongoing Management

- Install and configure Webmin (latest) as a GUI panel for system management
- Optionally install Cockpit for a modern server dashboard
- Configure pgAdmin 4 for PostgreSQL access
- Suggest and install a terminal file manager (like mc)
- Ensure access via SFTP (FileZilla/WinSCP) is supported

Final Deliverables Checklist:

- PostgreSQL (latest) fully installed and configured
- pgAdmin 4 accessible via browser for database management
- Full 2TB database imported and validated
- Node.js (LTS) + PM2 installed and configured
- React/Next.js app environment set up and sandboxed
- Nginx configured as a reverse proxy
- SSL certificate installed via Let’s Encrypt (Certbot)
- Server prepared and configured to host a domain name (we will provide the domain)
- Domain setup fully working with HTTPS and DNS routing
- PostgreSQL and OS hardened (SSH, firewall, Fail2Ban, updates)
- UFW firewall configured to allow only essential services
- Monitoring, logging, and backup system in place
- Webmin installed and secured for server administration
- Server accessible via SFTP (FileZilla/WinSCP)
- Terminal-based file browser (like mc) installed
- Complete documentation provided (paths, ports, credentials, backup steps)
Related categories: Linux NoSQL Couch & Mongo Nginx Node.js