Skip to content

Commit 8acc130

Browse files
authored
Merge pull request #45 from exyezed/main
Quick Installation
2 parents 5680c8e + 55e6048 commit 8acc130

2 files changed

Lines changed: 166 additions & 139 deletions

File tree

README.md

Lines changed: 102 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -1,291 +1,254 @@
11
![logo](https://github.com/user-attachments/assets/50231124-d546-43cb-9cf4-7a06a1dad5bd)
22

3-
# StreamFlow v2.0: Fresh From The Oven🔥
3+
# StreamFlow v2.0: Fresh From The Oven 🔥
44

5-
StreamFlow adalah aplikasi live streaming yang memungkinkan kamu untuk melakukan live streaming ke berbagai platform seperti YouTube, Facebook, dan platform lainnya menggunakan protokol RTMP. Aplikasi ini bisa berjalan di VPS (Virtual Private Server) dan mendukung streaming ke banyak platform sekaligus.
5+
StreamFlow adalah aplikasi live streaming yang memungkinkan Anda melakukan live streaming ke berbagai platform seperti YouTube, Facebook, dan platform lainnya menggunakan protokol RTMP. Aplikasi ini dapat berjalan di VPS (Virtual Private Server) dan mendukung streaming ke banyak platform secara bersamaan.
66

77
![Untitled-2](https://github.com/user-attachments/assets/3d7bb367-a1b2-43a5-839b-b6aa8dd5de90)
88

9-
## 🚀 Fitur Utama
9+
## Fitur Utama
1010

11-
- **Multi-Platform Streaming**: Mendukung streaming ke berbagai platform populer
12-
- **Video Gallery**: Kelola koleksi video dengan mudah
13-
- **Upload Video**: Upload video dari local atau import dari Google Drive
14-
- **Scheduled Streaming**: Jadwalkan streaming dengan waktu tertentu
15-
- **Advanced Settings**: Kontrol bitrate, resolution, FPS, dan orientasi
16-
- **Real-time Monitoring**: Monitor status streaming secara real-time
17-
- **Responsive UI**: Tampilan modern yang responsive di semua device
11+
- **Multi-Platform Streaming** - Streaming ke berbagai platform populer secara bersamaan
12+
- **Video Gallery** - Kelola koleksi video dengan antarmuka yang intuitif
13+
- **Upload Video** - Upload dari local storage atau import langsung dari Google Drive
14+
- **Scheduled Streaming** - Jadwalkan streaming dengan pengaturan waktu yang fleksibel
15+
- **Advanced Settings** - Kontrol penuh untuk bitrate, resolusi, FPS, dan orientasi video
16+
- **Real-time Monitoring** - Monitor status streaming dengan dashboard real-time
17+
- **Video Analytics** - Pantau statistik dan performa video langsung dari aplikasi
18+
- **Responsive UI** - Antarmuka modern yang responsif di semua perangkat
1819

19-
## 📋 Requirements
20+
## 🛠️ System Requirements
2021

21-
- **Node.js** v16 atau lebih baru
22-
- **FFmpeg**
23-
- **SQLite3** (sudah termasuk)
24-
- **VPS/Server** dengan minimal 1Core & 1GB RAM
25-
- **Port** 7575 (dapat diubah di [.env](.env))
22+
- **Node.js** v16 atau versi terbaru
23+
- **FFmpeg** untuk video processing
24+
- **SQLite3** (sudah termasuk dalam package)
25+
- **VPS/Server** dengan minimal 1 Core CPU & 1GB RAM
26+
- **Port** 7575 (dapat disesuaikan di file [.env](.env))
2627

27-
## 🛠️ Instalasi di VPS
28+
## 🚀 Quick Installation
2829

29-
### 1. Persiapan VPS
30-
31-
Update sistem:
30+
Untuk instalasi otomatis, jalankan perintah berikut:
3231

3332
```bash
34-
sudo apt update && sudo apt upgrade -y
33+
curl -o install.sh https://raw.githubusercontent.com/bangtutorial/streamflow/main/install.sh && chmod +x install.sh && ./install.sh
3534
```
3635

37-
Install Node.js:
36+
## 🔧 Manual Installation
3837

38+
### 1. Persiapan Server
39+
40+
Update sistem operasi:
3941
```bash
40-
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
42+
sudo apt update && sudo apt upgrade -y
4143
```
4244

45+
Install Node.js:
4346
```bash
47+
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
4448
sudo apt-get install -y nodejs
4549
```
4650

4751
Verifikasi instalasi Node.js:
48-
4952
```bash
5053
node --version
5154
npm --version
5255
```
5356

5457
Install FFmpeg:
55-
5658
```bash
5759
sudo apt install ffmpeg -y
5860
```
5961

60-
Verifikasi FFmpeg:
62+
Verifikasi instalasi FFmpeg:
6163
```bash
6264
ffmpeg -version
6365
```
6466

6567
Install Git:
66-
6768
```bash
6869
sudo apt install git -y
6970
```
7071

71-
### 2. Setup Projek StreamFlow
72-
73-
Clone repository ke VPS:
72+
### 2. Setup Project StreamFlow
7473

74+
Clone repository:
7575
```bash
7676
git clone https://github.com/bangtutorial/streamflow
7777
```
7878

79-
Masuk ke folder project:
80-
79+
Masuk ke direktori project:
8180
```bash
8281
cd streamflow
8382
```
8483

8584
Install dependencies:
86-
8785
```bash
8886
npm install
8987
```
9088

9189
Generate session secret:
92-
9390
```bash
9491
npm run generate-secret
9592
```
9693

97-
**Konfigurasi tambahan (opsional):**
98-
99-
Port default aplikasi adalah **7575**. Jika perlu ubah port, edit file [.env](.env) (contoh: 8080, 3300, dll):
100-
94+
Konfigurasi port (opsional):
10195
```bash
10296
nano .env
10397
```
10498

105-
### 3. Setup Firewall
106-
107-
Buka port sesuai dengan yang ada di .env (default: 7575):
99+
### 3. Konfigurasi Firewall
108100

101+
Buka port aplikasi (default: 7575):
109102
```bash
110103
sudo ufw allow 7575
111104
```
112105

113106
Aktifkan firewall:
114-
115107
```bash
116108
sudo ufw enable
117109
```
118110

119-
Cek status firewall:
120-
111+
Verifikasi status firewall:
121112
```bash
122113
sudo ufw status
123114
```
124115

125-
### 4. Install Process Manager (PM2)
126-
127-
Install PM2:
116+
### 4. Install Process Manager
128117

118+
Install PM2 untuk mengelola aplikasi:
129119
```bash
130120
sudo npm install -g pm2
131121
```
132122

133-
### 5. Cara Jalankan Aplikasi StreamFlow
134-
135-
Pastikan kamu masih berada di folder **streamflow**, jalankan perintah ini:
123+
### 5. Menjalankan Aplikasi
136124

125+
Jalankan aplikasi dengan PM2:
137126
```bash
138127
pm2 start app.js --name streamflow
139128
```
140129

141-
Akses aplikasi di <b>IP_SERVER:PORT</b><br>
142-
Contoh:
143-
144-
```bash
145-
88.12.34.56:7575
130+
Akses aplikasi melalui browser:
131+
```
132+
http://IP_SERVER:PORT
146133
```
147134

148-
Buat username dan password. Setelah masuk Dashboard, **Sign Out**. Lalu restart aplikasi dengan:
135+
Contoh: `http://88.12.34.56:7575`
149136

137+
**Penting:** Setelah membuat akun admin pertama kali, lakukan **Sign Out** kemudian restart aplikasi:
150138
```bash
151139
pm2 restart streamflow
152140
```
153141

154-
## 📝 Informasi Tambahan
142+
## 🔐 Reset Password
155143

156-
### Reset Password
157-
158-
Jika kamu lupa password atau ingin reset password, bisa ikutin cara berikut:
159-
160-
Masuk ke folder aplikasi:
144+
Jika lupa password atau perlu reset akun admin:
161145

162146
```bash
163-
cd streamflow
147+
cd streamflow && node reset-password.js
164148
```
165149

166-
Jalankan perintah reset password:
150+
## ⏰ Pengaturan Timezone Server
167151

152+
Untuk memastikan scheduled streaming berjalan dengan waktu yang akurat:
153+
154+
### Cek timezone saat ini:
168155
```bash
169-
node reset-password.js
156+
timedatectl status
170157
```
171158

172-
### Setup Waktu Server (Timezone)
173-
174-
Untuk memastikan scheduled streaming berjalan dengan waktu yang tepat, atur timezone server sesuai zona waktu kamu:
175-
176-
#### 1. Cek Timezone Saat Ini
159+
### Lihat daftar timezone tersedia:
160+
```bash
161+
timedatectl list-timezones | grep Asia
162+
```
177163

178-
Lihat timezone aktif:
164+
### Set timezone ke WIB (Jakarta):
165+
```bash
166+
sudo timedatectl set-timezone Asia/Jakarta
167+
```
179168

169+
### Restart aplikasi setelah mengubah timezone:
180170
```bash
181-
timedatectl status
171+
pm2 restart streamflow
182172
```
183173

184-
#### 2. Lihat Daftar Timezone Yang Tersedia
174+
## 🐳 Docker Deployment
185175

186-
Cari timezone Indonesia:
176+
### 1. Persiapan Environment
187177

188-
```bash
189-
timedatectl list-timezones | grep Asia
178+
Buat file `.env` di root project:
179+
```env
180+
PORT=7575
181+
SESSION_SECRET=your_random_secret_here
182+
NODE_ENV=development
190183
```
191184

192-
Contoh set Timezone ke WIB (Jakarta):
185+
### 2. Build dan Jalankan
193186

194187
```bash
195-
sudo timedatectl set-timezone Asia/Jakarta
188+
docker-compose up --build
196189
```
197190

198-
Verifikasi perubahan:
191+
Akses aplikasi: [http://localhost:7575](http://localhost:7575)
199192

200-
```bash
201-
timedatectl status
202-
```
193+
### 3. Data Persistence
203194

204-
Setelah mengubah timezone, restart aplikasi agar perubahan timezone berlaku:
195+
Data akan tersimpan secara otomatis di:
196+
- Database: `db/`
197+
- Logs: `logs/`
198+
- Upload files: `public/uploads/`
199+
200+
### 4. Reset Password (Docker)
205201

206202
```bash
207-
pm2 restart streamflow
203+
docker-compose exec app node reset-password.js
208204
```
209205

210-
## 🪛 Troubleshooting
206+
## 🔧 Troubleshooting
211207

212208
### Permission Error
213-
214-
Fix permission untuk folder uploads:
215-
216209
```bash
217210
chmod -R 755 public/uploads/
218211
```
219212

220213
### Port Already in Use
221-
222-
Cek process yang menggunakan port:
223-
224214
```bash
215+
# Cek proses yang menggunakan port
225216
sudo lsof -i :7575
226-
```
227-
228-
Kill process jika perlu:
229217

230-
```bash
218+
# Kill proses jika diperlukan
231219
sudo kill -9 <PID>
232220
```
233221

234222
### Database Error
235-
236-
Reset database (HATI-HATI: akan menghapus semua data):
237-
238223
```bash
224+
# Reset database (PERINGATAN: akan menghapus semua data)
239225
rm db/*.db
240-
```
241-
242-
Restart aplikasi untuk create database baru.
243226

244-
## 🚢 Deploy & Run with Docker
245-
246-
### 1. Persiapan .env
247-
Buat file `.env` di root project (jika belum ada), minimal berisi:
248-
249-
```
250-
PORT=7575
251-
SESSION_SECRET=isi_random_yang_tetap
252-
NODE_ENV=development
227+
# Restart aplikasi untuk membuat database baru
228+
pm2 restart streamflow
253229
```
254230

255-
- **SESSION_SECRET**: Gunakan string acak, dan JANGAN diubah-ubah setiap restart.
256-
- **NODE_ENV=development**: Untuk development/testing (agar cookie session tidak butuh https).
257-
258-
### 2. Build & Jalankan dengan Docker Compose
231+
### Docker Troubleshooting
259232

260-
```bash
261-
docker-compose up --build
262-
```
233+
**Tidak bisa login:**
234+
- Pastikan `NODE_ENV=development` untuk akses HTTP
235+
- Periksa permission folder:
236+
```bash
237+
sudo chmod -R 777 db/ logs/ public/uploads/
238+
```
239+
- Pastikan `SESSION_SECRET` tidak berubah
263240

264-
Akses aplikasi di: [http://localhost:7575](http://localhost:7575)
241+
**Production (HTTPS):**
242+
- Set `NODE_ENV=production`
243+
- Akses melalui HTTPS untuk cookie session
265244

266-
### 3. Volume Persistence
267-
- Data database, logs, dan file upload akan otomatis tersimpan di folder `db/`, `logs/`, dan `public/uploads/` di host.
268-
269-
### 4. Reset Password (dalam container)
270-
Jika lupa password admin:
271-
```bash
272-
docker-compose exec app node reset-password.js
273-
```
245+
## 👥 Contributors
274246

275-
### 5. Troubleshooting
276-
- **Tidak bisa login?**
277-
- Pastikan cookie session muncul di browser setelah login.
278-
- Pastikan `.env` berisi `NODE_ENV=development` jika akses via http.
279-
- Pastikan permission folder `db/`, `logs/`, dan `public/uploads/` sudah benar:
280-
```bash
281-
sudo chmod -R 777 db/ logs/ public/uploads/
282-
```
283-
- Pastikan file `.env` dan SESSION_SECRET tidak berubah-ubah.
284-
- **Production (https):**
285-
- Ubah `NODE_ENV=production` dan akses via https agar cookie session tetap dikirim.
247+
[![Contributors](https://contrib.rocks/image?repo=bangtutorial/streamflow)](https://github.com/bangtutorial/streamflow/graphs/contributors)
286248

287-
## Lisensi:
249+
## 📄 License
288250

289251
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/bangtutorial/streamflow/blob/main/LICENSE)
290252

291-
© 2025 - [Bang Tutorial](https://youtube.com/bangtutorial)
253+
---
254+
© 2025 - [Bang Tutorial](https://youtube.com/bangtutorial)

0 commit comments

Comments
 (0)