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.

  1. Log in to your Domain Registrar (Namecheap, GoDaddy, Cloudflare, etc.).
  2. Go to DNS Management.
  3. Add an A Record:
    • Name/Host: @ (or portfolio for a subdomain)
    • Value/Target: Your VPS IP Address (e.g., 192.168.1.1)
    • TTL: Automatic or 1 min
  4. (Optional) Add an AAAA Record if you have an IPv6 address.

🔗 Guide: How to manage DNS records (Cloudflare)

2. Connect to your VPS

We recommend using Termius (free) for a better SSH experience, but you can use any terminal.

  1. Download Termius.
  2. Click "New Host".
  3. Address: Your VPS IP.
  4. Username: root (or your sudo user).
  5. Password: Your VPS password.
  6. Double-click to connect.

3. Run the Installer

Once connected, run these commands:

  1. Upload the files: You can use Termius SFTP or scp to upload the portfolix folder to /var/www/.
  2. Navigate to the folder:
    cd /var/www/portfolix
    
  3. Run the script:
    chmod +x install.sh
    sudo ./install.sh
    
  4. 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.

![Screenshot: Installation Script Running]

Option 2: Manual Installation

If you are developing locally or deploying to a PaaS like Vercel/Railway.

Local Development

  1. Install Dependencies:
    npm install
    
  2. Setup Environment:
    • Copy .env.example to .env.
    • Fill in your database credentials and other secrets (see Configuration).
  3. Initialize Database:
    npm run setup
    
    Optional: Seed demo data
    npm run db:seed:demo
    
  4. Start Dev Server:
    npm run dev
    
    Visit http://localhost:3000.

Vercel Deployment

  1. Push your code to a GitHub repository.
  2. Import the project into Vercel.
  3. Add your Environment Variables in the Vercel dashboard.
  4. Deploy!