docs: Consolidate installation guide to external documentation
- Remove detailed installation and setup instructions from README - Remove prerequisites section covering Node.js, PostgreSQL, and domain requirements - Remove environment configuration examples and explanations - Remove database initialization and application startup instructions - Remove production deployment guidance for PM2 and Nginx - Remove update instructions for maintaining existing nodes - Add reference link to official documentation at docs.synapsis.social - Simplify README to focus on project overview rather than setup details - Reduce README length and maintenance burden by centralizing docs
This commit is contained in:
@@ -79,112 +79,11 @@ Synapsis is designed as a network of independent **Nodes** that communicate usin
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Installation & Setup
|
## Run Your Own Node
|
||||||
|
|
||||||
You can run Synapsis locally for development or deploy it to a VPS for production.
|
For complete setup instructions, visit the official documentation:
|
||||||
|
|
||||||
### Prerequisites
|
**📚 [docs.synapsis.social/run-your-own-node](https://docs.synapsis.social/run-your-own-node)**
|
||||||
|
|
||||||
- Node.js 18+
|
|
||||||
- PostgreSQL database (e.g., [Neon](https://neon.tech) or self-hosted)
|
|
||||||
- Domain name (for production)
|
|
||||||
|
|
||||||
### 1. Clone & Install
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/cyph3rasi/Synapsis.git
|
|
||||||
cd Synapsis
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Configure Environment
|
|
||||||
|
|
||||||
Copy the example configuration:
|
|
||||||
```bash
|
|
||||||
cp .env.example .env
|
|
||||||
```
|
|
||||||
|
|
||||||
Edit `.env` with your credentials:
|
|
||||||
```env
|
|
||||||
# Database
|
|
||||||
DATABASE_URL="postgresql://user:password@host/dbname..."
|
|
||||||
|
|
||||||
# Auth (Generate with: openssl rand -base64 33)
|
|
||||||
AUTH_SECRET="your-secret-key"
|
|
||||||
|
|
||||||
# Node Info
|
|
||||||
NEXT_PUBLIC_NODE_DOMAIN="localhost:3000" # Use your domain for production
|
|
||||||
NEXT_PUBLIC_NODE_NAME="My Synapsis Node"
|
|
||||||
|
|
||||||
# Admin Access
|
|
||||||
ADMIN_EMAILS="admin@example.com"
|
|
||||||
|
|
||||||
# Object Storage (Optional - for media uploads)
|
|
||||||
STORAGE_ENDPOINT=https://your-s3-endpoint.com
|
|
||||||
STORAGE_REGION=us-east-1
|
|
||||||
STORAGE_BUCKET=your-bucket-name
|
|
||||||
STORAGE_ACCESS_KEY=your-access-key
|
|
||||||
STORAGE_SECRET_KEY=your-secret-key
|
|
||||||
STORAGE_PUBLIC_BASE_URL=https://your-public-bucket-url.com
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. Initialize Database
|
|
||||||
```bash
|
|
||||||
npm run db:push
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4. Run the Application
|
|
||||||
|
|
||||||
**For Local Development:**
|
|
||||||
```bash
|
|
||||||
npm run dev
|
|
||||||
# Visit http://localhost:3000
|
|
||||||
```
|
|
||||||
|
|
||||||
**For Production (VPS):**
|
|
||||||
We recommend using **PM2** to run the app in the background.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Build the project
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
# Install PM2
|
|
||||||
sudo npm install -g pm2
|
|
||||||
|
|
||||||
# Start the app
|
|
||||||
pm2 start npm --name "synapsis" -- start
|
|
||||||
pm2 save
|
|
||||||
pm2 startup
|
|
||||||
```
|
|
||||||
|
|
||||||
### 5. Production Reverse Proxy (Optional)
|
|
||||||
For production, use Nginx to handle SSL and forward traffic to port 3000.
|
|
||||||
|
|
||||||
```nginx
|
|
||||||
server {
|
|
||||||
server_name your-domain.com;
|
|
||||||
location / {
|
|
||||||
proxy_pass http://localhost:3000;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection 'upgrade';
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Updates
|
|
||||||
|
|
||||||
To update your node:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git pull origin main
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
pm2 restart synapsis
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user