Skip to content

Latest commit

 

History

History
304 lines (198 loc) · 6.88 KB

File metadata and controls

304 lines (198 loc) · 6.88 KB

PC2 Quick Start Guide

Your sovereign personal cloud in minutes.

Choose Your Path

Path Time Best For
Local Testing 2 min Trying PC2 on your computer
VPS Deployment 15 min Always-on cloud server
ARM Devices 20 min Raspberry Pi, Jetson Nano

Local Testing

Perfect for: Developers, curious users, quick evaluation

One-Liner Start (Mac / Linux)

Open Terminal and paste this single command:

curl -fsSL https://raw.githubusercontent.com/Elacity/pc2.net/main/scripts/start-local.sh | bash

That's it! The script automatically:

  • Installs Node.js if needed (via nvm)
  • Installs PM2 process manager (enables auto-restart)
  • Downloads PC2
  • Installs all dependencies
  • Builds and starts the server with PM2

Windows Users (WSL2)

Windows runs PC2 via WSL2 (Windows Subsystem for Linux). We have a dedicated installer that handles WSL-specific setup (systemd, node-pty compilation, PM2 persistence).

Step 1: Install WSL2 (One-Time Only)

Open PowerShell as Administrator and run:

wsl --install

Restart your computer when prompted.

Step 2: Install PC2

Open Ubuntu from your Start menu, then paste:

curl -fsSL https://raw.githubusercontent.com/Elacity/pc2.net/main/scripts/install-wsl.sh | bash

The script validates your WSL environment, offers to enable systemd, installs all dependencies, and starts PC2.

Step 3: Open PC2

Open your Windows browser to http://localhost:4200

For detailed WSL configuration, troubleshooting, and systemd setup, see the WSL Guide.

What to Expect

  1. You'll see the ElastOS banner
  2. Dependencies install (2-5 minutes first time)
  3. Server starts and shows: PC2 Node running on http://localhost:4200

Next Steps

  1. Open your browser (Chrome, Safari, Firefox)
  2. Go to: http://localhost:4200
  3. Connect your wallet to claim your personal cloud
  4. Done! You're the owner of this PC2 node.

Useful Commands

PC2 runs with PM2 process manager, which keeps the server running in the background:

# View live logs
pm2 logs pc2

# Stop PC2
pm2 stop pc2

# Start PC2 (if stopped)
pm2 start pc2

# Restart PC2
pm2 restart pc2

# Check status
pm2 status

# Restart from scratch
pm2 delete pc2
rm -rf ~/pc2.net
# Then run the one-liner again

# Development mode (hot reload, without pm2)
cd ~/pc2.net/pc2-node && npm run dev

Note: You can also restart PC2 from the UI via the user dropdown menu (click your avatar > Restart PC2).


VPS Deployment

Perfect for: Always-on access, production use

Recommended VPS Providers

Provider Price RAM Link
Contabo $5.99/mo 4GB contabo.com
DigitalOcean $6/mo 1GB digitalocean.com
Vultr $6/mo 1GB vultr.com
Hetzner €4.15/mo 2GB hetzner.com

Requirements: Ubuntu 22.04, 2GB RAM, 20GB disk

Step 1: Connect to Your VPS

ssh root@your-server-ip

Step 2: Install PC2 (Docker)

curl -sSL https://raw.githubusercontent.com/Elacity/pc2.net/main/scripts/install-pc2.sh | bash

Step 3: Access Your PC2

Open in browser: http://your-server-ip:4100

Step 4: (Optional) Set Up Domain

Register a username for username.ela.city access:

  1. Open Settings → PC2
  2. Enter a username
  3. Click "Register"

Now accessible at: https://username.ela.city

Useful Commands

# View logs
cd ~/pc2 && docker compose logs -f

# Stop PC2
docker compose down

# Restart PC2
docker compose restart

# Update PC2
docker compose pull && docker compose up -d

ARM Devices

Perfect for: Raspberry Pi 4/5, Jetson Orin Nano, home servers

Prerequisites

  • Raspberry Pi 4/5 (4GB+ RAM) or Jetson Orin Nano
  • Raspberry Pi OS or Ubuntu 22.04
  • Internet connection

One-Liner Install

curl -sSL https://raw.githubusercontent.com/Elacity/pc2.net/main/scripts/install-arm.sh | bash

What Gets Installed

  1. Node.js 20 + PM2 process manager
  2. Build tools
  3. WireGuard (kernel module on Pi, wireguard-go on Jetson -- automatic)
  4. PC2 from source, built and running

That's it -- one command. The script handles everything including WireGuard setup. PC2 runs via PM2 (survives SSH disconnect and reboots).

What Happens Next

  1. Open http://<device-ip>:4200 in your browser (the IP is shown after install)
  2. Login with your wallet (MetaMask, WalletConnect, etc.)
  3. Choose your domain name in the setup wizard
  4. PC2 automatically activates WireGuard and your domain goes live at https://yourname.ela.city

Page loads are ~1.5 seconds from anywhere. If WireGuard isn't available, PC2 falls back to Boson relay (slower but works everywhere).

Useful Commands

# View logs
pm2 logs pc2

# Stop PC2
pm2 stop pc2

# Start PC2
pm2 start pc2

# Restart PC2
pm2 restart pc2

# Check status
pm2 status

# Check WireGuard tunnel
sudo wg show wg0

After Setup

First Login

  1. Click "Login with Wallet"
  2. Connect MetaMask, WalletConnect, or 50+ other methods
  3. You're now the owner of this PC2 node

Explore Features

  • Files: Upload, organize, and access your files
  • AI Assistant: Chat with AI (Settings → AI to configure)
  • Apps: Run web apps in your personal cloud
  • Settings: Customize your experience

Get Help


Troubleshooting

"Port 4200 already in use"

# Find and kill the process
lsof -ti:4200 | xargs kill -9

"Node.js version too old"

# Install Node.js 20
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt-get install -y nodejs

"Build failed"

# Clean and rebuild
cd pc2-node
npm run clean
npm run build

"Can't access from other devices"

  1. Check firewall: sudo ufw allow 4200
  2. Use your local IP, not localhost
  3. For remote access, enable Active Proxy in Settings

Updates

PC2 checks for updates automatically. When available:

  1. Click your avatar in the top-right corner
  2. You'll see "Update Available" in the dropdown (or go to Settings → System)
  3. Click "Update Now" to see version details and release notes
  4. Click "Install Update" to apply

PC2 restarts automatically after updates (when running with PM2 or systemctl).

Your data is always safe during updates.

Restart PC2

To restart the server from the UI:

  1. Click your avatar in the top-right corner
  2. Click "Restart PC2"
  3. Confirm in the dialog

If running with PM2 (local install script) or systemctl (VPS), the server restarts automatically. If running directly via npm start (dev mode), you'll see instructions to restart manually.