-
Notifications
You must be signed in to change notification settings - Fork 0
INSTALL
Complete installation instructions for all platforms: Web, iOS, Android, and Desktop.
- Node.js 20.0.0 or higher
- pnpm 9.15.4 or higher
- Docker (optional, for backend services)
-
Clone the repository:
git clone https://github.com/nself-org/nchat.git cd nself-chat -
Install dependencies:
pnpm install
-
Configure environment variables:
cp .env.example .env.local
Edit
.env.localwith your configuration:# Backend URLs (if using nself CLI backend) NEXT_PUBLIC_GRAPHQL_URL=http://api.localhost/v1/graphql NEXT_PUBLIC_AUTH_URL=http://auth.localhost/v1/auth NEXT_PUBLIC_STORAGE_URL=http://storage.localhost/v1/storage # Development mode with test users NEXT_PUBLIC_USE_DEV_AUTH=true NEXT_PUBLIC_ENV=development # Optional: Sentry error tracking NEXT_PUBLIC_SENTRY_DSN=your-sentry-dsn
-
Start the development server:
pnpm dev
-
Open your browser: Navigate to http://localhost:3000
-
Complete the setup wizard: Follow the 12-step guided setup to configure your instance.
# Build for production
pnpm build
# Start production server
pnpm start# Build Docker image
docker build -t nself-chat:latest .
# Run container
docker run -p 3000:3000 nself-chat:latestSee DEPLOYMENT.md for detailed deployment guides.
General Requirements:
- Node.js 20.0.0+
- pnpm 9.15.4+
- Capacitor CLI 6.x
iOS Requirements:
- macOS (required for iOS development)
- Xcode 15.0 or later
- CocoaPods 1.10 or later
- iOS 14.0+ deployment target
- Apple Developer account (for device testing and App Store)
Android Requirements:
- Android Studio Hedgehog (2023.1.1) or later
- Android SDK API 34
- Java JDK 17
- Gradle 8.0+
-
Build the web application:
pnpm build
-
Navigate to Capacitor directory:
cd platforms/capacitor -
Install Capacitor dependencies:
pnpm install
cd platforms/capacitor
npx cap add ios-
Open the project in Xcode:
pnpm run open:ios
-
Configure signing:
- Select the
Apptarget - Go to "Signing & Capabilities"
- Select your development team
- Enable "Automatically manage signing"
- Select the
-
Set Bundle ID:
- Change Bundle Identifier to your unique ID (e.g.,
com.yourcompany.nchat) - Must match your Apple Developer account
- Change Bundle Identifier to your unique ID (e.g.,
In Xcode, add the following capabilities:
-
Push Notifications:
- Click "+ Capability"
- Add "Push Notifications"
-
Background Modes:
- Add "Background Modes"
- Enable:
- Remote notifications
- Background fetch
- Voice over IP (for calls)
- Audio (for voice messages)
-
Associated Domains (for deep linking):
- Add "Associated Domains"
- Add:
applinks:nchat.yourdomain.com
-
Create Firebase project:
- Go to Firebase Console
- Create a new project
-
Add iOS app:
- Bundle ID: Your iOS bundle identifier
- Download
GoogleService-Info.plist
-
Add to Xcode:
cp GoogleService-Info.plist platforms/capacitor/ios/App/App/
-
Install pods:
cd platforms/capacitor/ios/App pod install
-
Create APNs Key:
- Go to Apple Developer Portal
- Certificates, Identifiers & Profiles β Keys
- Create new key with "Apple Push Notifications service (APNs)"
- Download
.p8file - Note the Key ID and Team ID
-
Upload to Firebase:
- In Firebase Console, go to Project Settings β Cloud Messaging
- Upload APNs key (.p8 file)
- Enter Key ID and Team ID
cd platforms/capacitor
npx @capacitor/assets generate --iosOr manually add icons to ios/App/App/Assets.xcassets/AppIcon.appiconset/
Run on Simulator:
pnpm run run:iosRun on Device:
pnpm run run:ios -- --deviceBuild for Release:
pnpm run build:iosSee platforms/capacitor/fastlane/README.md for automated build and deployment with Fastlane.
cd platforms/capacitor
npx cap add android-
Open the project in Android Studio:
pnpm run open:android
-
Wait for Gradle sync to complete
-
Update package name (if needed):
- In
android/app/build.gradle:defaultConfig { applicationId "com.yourcompany.nchat" // ... }
- In
-
Create Firebase project (if not already done)
-
Add Android app:
- Package name:
com.yourcompany.nchat(or your package name) - Download
google-services.json
- Package name:
-
Add to project:
cp google-services.json platforms/capacitor/android/app/
-
Sync Gradle:
cd platforms/capacitor/android ./gradlew clean build
-
Create
assetlinks.jsonon your server:https://nchat.yourdomain.com/.well-known/assetlinks.jsonContent:
[ { "relation": ["delegate_permission/common.handle_all_urls"], "target": { "namespace": "android_app", "package_name": "com.yourcompany.nchat", "sha256_cert_fingerprints": ["YOUR_SHA256_FINGERPRINT"] } } ] -
Get SHA256 fingerprint:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
-
Generate keystore:
keytool -genkey -v -keystore nchat-release.keystore -alias nchat -keyalg RSA -keysize 2048 -validity 10000
-
Create
keystore.properties:cd platforms/capacitor/android nano keystore.propertiesContent:
storeFile=/path/to/nchat-release.keystore storePassword=YOUR_STORE_PASSWORD keyAlias=nchat keyPassword=YOUR_KEY_PASSWORD
cd platforms/capacitor
npx @capacitor/assets generate --androidOr manually add icons to android/app/src/main/res/mipmap-*/
Run on Emulator/Device:
pnpm run run:androidBuild Debug APK:
cd platforms/capacitor/android
./gradlew assembleDebugBuild Release APK:
./gradlew assembleReleaseBuild Release Bundle (for Play Store):
pnpm run build:android:bundleSee platforms/capacitor/fastlane/README.md for automated build and deployment with Fastlane.
Electron apps work on Windows, macOS, and Linux.
- Node.js 20.0.0+
- pnpm 9.15.4+
- Platform-specific build tools:
- Windows: Visual Studio Build Tools
- macOS: Xcode Command Line Tools
-
Linux:
build-essentialpackage
-
Install dependencies:
pnpm install
-
Build web assets:
pnpm build
-
Start Electron in development:
pnpm electron:dev
Build for current platform:
pnpm electron:buildBuild for all platforms:
pnpm build:electronBuild for specific platform:
# Windows
pnpm electron:build --win
# macOS
pnpm electron:build --mac
# Linux
pnpm electron:build --linuxBuilt apps will be in dist/electron/:
-
Windows:
.exeinstaller -
macOS:
.dmginstaller -
Linux:
.AppImage,.deb, or.rpm
Tauri is a lightweight alternative to Electron using Rust and native webviews.
- Node.js 20.0.0+
- pnpm 9.15.4+
- Rust 1.70+ (
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh) - Platform-specific build tools:
- Windows: Microsoft Visual Studio C++ Build Tools
- macOS: Xcode Command Line Tools
-
Linux:
libwebkit2gtk-4.0-dev,build-essential,curl,wget,libssl-dev,libgtk-3-dev
-
Install dependencies:
pnpm install
-
Build web assets:
pnpm build
-
Start Tauri in development:
pnpm tauri:dev
Build for current platform:
pnpm tauri:buildBuilt apps will be in src-tauri/target/release/bundle/:
-
Windows:
.msiinstaller -
macOS:
.dmgor.app -
Linux:
.deb,.AppImage
Ι³Chat requires a backend powered by nself CLI.
Set NEXT_PUBLIC_USE_DEV_AUTH=true in .env.local to use the built-in development authentication with 8 test users.
No backend required for basic testing!
-
Install nself CLI:
npm install -g @nself/cli
-
Initialize backend:
cd .backend nself init --demo -
Start services:
nself start
-
Verify services:
nself status nself urls
-
Update
.env.local:NEXT_PUBLIC_GRAPHQL_URL=http://api.localhost/v1/graphql NEXT_PUBLIC_AUTH_URL=http://auth.localhost/v1/auth NEXT_PUBLIC_STORAGE_URL=http://storage.localhost/v1/storage NEXT_PUBLIC_USE_DEV_AUTH=false
See nself CLI documentation for advanced configuration.
v1.0.9 requires bring-your-own LiveKit Server and coturn.
Video/voice calls use LiveKit SFU (Selective Forwarding Unit) and coturn TURN server. These are NOT bundled with the nSelf CLI at v1.0.9. You must deploy them separately and supply the URLs via env vars.
LiveKit Server setup:
- Official install guide: https://docs.livekit.io/home/self-hosting/deployment/
- Minimum recommended: 2-core VPS, ports 7880/7881 (TCP) + 50000β60000/UDP for WebRTC
coturn setup:
- Official repo and docs: https://github.com/coturn/coturn
- Install on the same server as LiveKit or a separate VPS
Once deployed, add to .backend/.env.local:
LIVEKIT_HOST=wss://livekit.yourdomain.com
LIVEKIT_API_KEY=your-api-key
LIVEKIT_API_SECRET=your-api-secret
NEXT_PUBLIC_LIVEKIT_URL=wss://livekit.yourdomain.comA LiveKit Server nSelf plugin is planned for v1.1.0 so this can be provisioned via
nself plugin install livekit-server without a separate VPS. Track progress:
https://github.com/nself-org/cli/issues
Issue: Port 3000 already in use
# Use a different port
pnpm dev -- -p 3001Issue: Module not found errors
# Clear cache and reinstall
rm -rf node_modules .next
pnpm installIssue: CocoaPods errors
cd platforms/capacitor/ios/App
pod deintegrate
pod install --repo-updateIssue: Build fails in Xcode
- Clean build folder: Product β Clean Build Folder
- Update signing certificates
- Check Xcode version (15.0+)
Issue: App crashes on launch
- Check Firebase configuration
- Verify GoogleService-Info.plist is added
- Check console logs in Xcode
Issue: Gradle sync failed
cd platforms/capacitor/android
./gradlew clean
./gradlew --stop
./gradlew buildIssue: Build fails
- Update Android SDK to API 34
- Check Java version (should be 17)
- Invalidate caches: File β Invalidate Caches / Restart
Issue: App crashes on launch
- Check Firebase configuration
- Verify google-services.json is added
- Check Logcat for errors
Issue: Electron fails to start
# Rebuild native modules
pnpm rebuildIssue: Build fails
- Check platform-specific build tools are installed
- Try building for current platform only first
Issue: Rust compilation errors
# Update Rust
rustup update
# Clean build
cd src-tauri
cargo cleanIssue: Missing system dependencies (Linux)
# Ubuntu/Debian
sudo apt-get install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
# Fedora
sudo dnf install webkit2gtk3-devel openssl-devel curl wget gtk3-devel libappindicator-gtk3-devel librsvg2-develIssue: Services won't start
# Check Docker is running
docker ps
# Check logs
nself logs
# Restart services
nself stop
nself startIssue: Port conflicts
- Check if ports 3000, 4000, 5432, 8080 are available
- Modify ports in
.backend/.env
- Minimum iOS version: 14.0
- Requires macOS: iOS development only possible on macOS
- Code signing: Required for device testing and App Store
- Push notifications: Requires APNs certificate and Firebase setup
- App Store review: Can take 1-3 days
- Minimum Android version: API 24 (Android 7.0)
- Works on all platforms: Windows, macOS, Linux
- Play Store review: Usually 1-7 days
- Testing: Use Firebase Test Lab for device testing
-
Electron:
- Larger app size (100-200MB)
- Includes Chromium
- Better compatibility
-
Tauri:
- Smaller app size (5-15MB)
- Uses system webview
- Faster startup
- Requires more setup
After installation:
- Web: Complete the setup wizard at http://localhost:3000
- Mobile: Test on simulators/emulators before devices
- Desktop: Test app on target platforms
- Backend: Configure production backend with nself CLI
- Deploy: Follow DEPLOYMENT.md for production deployment
Need help?
- Documentation: https://github.com/nself-org/nchat/tree/main/docs
- Issues: https://github.com/nself-org/nchat/issues
- Discussions: https://github.com/nself-org/nchat/discussions
- nself CLI Docs: https://nself.org/docs
Version: 0.8.0 Last Updated: February 1, 2026
nself-chat v0.3.0 | GitHub | Issues | Discussions | Demo
Edit this page | MIT License | Β© 2026
(See π Security section below for 2FA, PIN Lock, and security audits.)
(Search lives in π Reference below.)
- π¬ Advanced Messaging
- π E2EE Setup
- π Search Setup
- π Call Management
- πΊ Live Streaming
- π₯οΈ Screen Sharing
- πΉ Video Calling
- ποΈ Voice Calling
- π± Mobile Optimization
- π§ͺ Testing
- π i18n
- π API Overview
- π Complete Reference
- π» API Examples
- π€ Bot API
- π Auth API
- π GraphQL Schema
- π Deployment Overview
- π³ Docker
- βΈοΈ Kubernetes
- β Helm Charts
- β Production Checklist
- π Production Validation
- π’ Multi-Tenant
- ποΈ Architecture
- π Diagrams
- ποΈ Database Schema
- π Project Structure
- π TypeScript Types
- π SPORT Reference
- π 2FA
- π¬ Messaging
- π Call Management
- π Call State Machine
- π E2EE
- πΊ Live Streaming
- π± Mobile Calls
- π PIN Lock
- π Polls
- π₯οΈ Screen Sharing
- π Search
- π Social Media
- ποΈ Voice Calling
- π Security Overview
- π‘οΈ Security Audit
- β‘ Performance
- π Best Practices
- π 2FA
- π PIN Lock
- π E2EE
- π‘οΈ E2EE Audit
v1.0.0 β’ 2026