Getting Started
Installation
Server Requirements
To run PortfoliX on a VPS, you need:
- OS: Ubuntu 20.04/22.04 LTS or Debian 11/12
- RAM: Minimum 1GB (2GB recommended)
- Storage: 10GB SSD
- Node.js: v20.0.0 or higher
- Database: PostgreSQL 14+
Option 1: Automated Installation (Recommended)
We provide an install.sh script that automatically sets up Node.js, PostgreSQL, Nginx (as a reverse proxy), and SSL certificates (Let's Encrypt).
1. Prepare your Domain (DNS)
Before starting, you must point your domain to your VPS IP address.
- Log in to your Domain Registrar (Namecheap, GoDaddy, Cloudflare, etc.).
- Go to DNS Management.
- Add an A Record:
- Name/Host:
@(orportfoliofor a subdomain) - Value/Target: Your VPS IP Address (e.g.,
192.168.1.1) - TTL: Automatic or 1 min
- Name/Host:
- (Optional) Add an AAAA Record if you have an IPv6 address.
2. Connect to your VPS
We recommend using Termius (free) for a better SSH experience, but you can use any terminal.
- Download Termius.
- Click "New Host".
- Address: Your VPS IP.
- Username:
root(or your sudo user). - Password: Your VPS password.
- Double-click to connect.
3. Run the Installer
Once connected, run these commands:
- Upload the files: You can use Termius SFTP or
scpto upload theportfolixfolder to/var/www/. - Navigate to the folder:
cd /var/www/portfolix - Run the script:
chmod +x install.sh sudo ./install.sh - Follow the prompts:
- Enter your domain name (e.g.,
yourdomain.com). - The script will install dependencies, setup the database, build the app, and configure Nginx.
- Enter your domain name (e.g.,
![Screenshot: Installation Script Running]
Option 2: Manual Installation
If you are developing locally or deploying to a PaaS like Vercel/Railway.
Local Development
- Install Dependencies:
npm install - Setup Environment:
- Copy
.env.exampleto.env. - Fill in your database credentials and other secrets (see Configuration).
- Copy
- Initialize Database:
Optional: Seed demo datanpm run setupnpm run db:seed:demo - Start Dev Server:
Visitnpm run devhttp://localhost:3000.
Vercel Deployment
- Push your code to a GitHub repository.
- Import the project into Vercel.
- Add your Environment Variables in the Vercel dashboard.
- Deploy!