|
1 | 1 |  |
2 | 2 |
|
3 | | -# StreamFlow v2.0: Fresh From The Oven🔥 |
| 3 | +# StreamFlow v2.0: Fresh From The Oven 🔥 |
4 | 4 |
|
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. |
6 | 6 |
|
7 | 7 |  |
8 | 8 |
|
9 | | -## 🚀 Fitur Utama |
| 9 | +## ✨ Fitur Utama |
10 | 10 |
|
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 |
18 | 19 |
|
19 | | -## 📋 Requirements |
| 20 | +## 🛠️ System Requirements |
20 | 21 |
|
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)) |
26 | 27 |
|
27 | | -## 🛠️ Instalasi di VPS |
| 28 | +## 🚀 Quick Installation |
28 | 29 |
|
29 | | -### 1. Persiapan VPS |
30 | | - |
31 | | -Update sistem: |
| 30 | +Untuk instalasi otomatis, jalankan perintah berikut: |
32 | 31 |
|
33 | 32 | ```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 |
35 | 34 | ``` |
36 | 35 |
|
37 | | -Install Node.js: |
| 36 | +## 🔧 Manual Installation |
38 | 37 |
|
| 38 | +### 1. Persiapan Server |
| 39 | + |
| 40 | +Update sistem operasi: |
39 | 41 | ```bash |
40 | | -curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - |
| 42 | +sudo apt update && sudo apt upgrade -y |
41 | 43 | ``` |
42 | 44 |
|
| 45 | +Install Node.js: |
43 | 46 | ```bash |
| 47 | +curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - |
44 | 48 | sudo apt-get install -y nodejs |
45 | 49 | ``` |
46 | 50 |
|
47 | 51 | Verifikasi instalasi Node.js: |
48 | | - |
49 | 52 | ```bash |
50 | 53 | node --version |
51 | 54 | npm --version |
52 | 55 | ``` |
53 | 56 |
|
54 | 57 | Install FFmpeg: |
55 | | - |
56 | 58 | ```bash |
57 | 59 | sudo apt install ffmpeg -y |
58 | 60 | ``` |
59 | 61 |
|
60 | | -Verifikasi FFmpeg: |
| 62 | +Verifikasi instalasi FFmpeg: |
61 | 63 | ```bash |
62 | 64 | ffmpeg -version |
63 | 65 | ``` |
64 | 66 |
|
65 | 67 | Install Git: |
66 | | - |
67 | 68 | ```bash |
68 | 69 | sudo apt install git -y |
69 | 70 | ``` |
70 | 71 |
|
71 | | -### 2. Setup Projek StreamFlow |
72 | | - |
73 | | -Clone repository ke VPS: |
| 72 | +### 2. Setup Project StreamFlow |
74 | 73 |
|
| 74 | +Clone repository: |
75 | 75 | ```bash |
76 | 76 | git clone https://github.com/bangtutorial/streamflow |
77 | 77 | ``` |
78 | 78 |
|
79 | | -Masuk ke folder project: |
80 | | - |
| 79 | +Masuk ke direktori project: |
81 | 80 | ```bash |
82 | 81 | cd streamflow |
83 | 82 | ``` |
84 | 83 |
|
85 | 84 | Install dependencies: |
86 | | - |
87 | 85 | ```bash |
88 | 86 | npm install |
89 | 87 | ``` |
90 | 88 |
|
91 | 89 | Generate session secret: |
92 | | - |
93 | 90 | ```bash |
94 | 91 | npm run generate-secret |
95 | 92 | ``` |
96 | 93 |
|
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): |
101 | 95 | ```bash |
102 | 96 | nano .env |
103 | 97 | ``` |
104 | 98 |
|
105 | | -### 3. Setup Firewall |
106 | | - |
107 | | -Buka port sesuai dengan yang ada di .env (default: 7575): |
| 99 | +### 3. Konfigurasi Firewall |
108 | 100 |
|
| 101 | +Buka port aplikasi (default: 7575): |
109 | 102 | ```bash |
110 | 103 | sudo ufw allow 7575 |
111 | 104 | ``` |
112 | 105 |
|
113 | 106 | Aktifkan firewall: |
114 | | - |
115 | 107 | ```bash |
116 | 108 | sudo ufw enable |
117 | 109 | ``` |
118 | 110 |
|
119 | | -Cek status firewall: |
120 | | - |
| 111 | +Verifikasi status firewall: |
121 | 112 | ```bash |
122 | 113 | sudo ufw status |
123 | 114 | ``` |
124 | 115 |
|
125 | | -### 4. Install Process Manager (PM2) |
126 | | - |
127 | | -Install PM2: |
| 116 | +### 4. Install Process Manager |
128 | 117 |
|
| 118 | +Install PM2 untuk mengelola aplikasi: |
129 | 119 | ```bash |
130 | 120 | sudo npm install -g pm2 |
131 | 121 | ``` |
132 | 122 |
|
133 | | -### 5. Cara Jalankan Aplikasi StreamFlow |
134 | | - |
135 | | -Pastikan kamu masih berada di folder **streamflow**, jalankan perintah ini: |
| 123 | +### 5. Menjalankan Aplikasi |
136 | 124 |
|
| 125 | +Jalankan aplikasi dengan PM2: |
137 | 126 | ```bash |
138 | 127 | pm2 start app.js --name streamflow |
139 | 128 | ``` |
140 | 129 |
|
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 |
146 | 133 | ``` |
147 | 134 |
|
148 | | -Buat username dan password. Setelah masuk Dashboard, **Sign Out**. Lalu restart aplikasi dengan: |
| 135 | +Contoh: `http://88.12.34.56:7575` |
149 | 136 |
|
| 137 | +**Penting:** Setelah membuat akun admin pertama kali, lakukan **Sign Out** kemudian restart aplikasi: |
150 | 138 | ```bash |
151 | 139 | pm2 restart streamflow |
152 | 140 | ``` |
153 | 141 |
|
154 | | -## 📝 Informasi Tambahan |
| 142 | +## 🔐 Reset Password |
155 | 143 |
|
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: |
161 | 145 |
|
162 | 146 | ```bash |
163 | | -cd streamflow |
| 147 | +cd streamflow && node reset-password.js |
164 | 148 | ``` |
165 | 149 |
|
166 | | -Jalankan perintah reset password: |
| 150 | +## ⏰ Pengaturan Timezone Server |
167 | 151 |
|
| 152 | +Untuk memastikan scheduled streaming berjalan dengan waktu yang akurat: |
| 153 | + |
| 154 | +### Cek timezone saat ini: |
168 | 155 | ```bash |
169 | | -node reset-password.js |
| 156 | +timedatectl status |
170 | 157 | ``` |
171 | 158 |
|
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 | +``` |
177 | 163 |
|
178 | | -Lihat timezone aktif: |
| 164 | +### Set timezone ke WIB (Jakarta): |
| 165 | +```bash |
| 166 | +sudo timedatectl set-timezone Asia/Jakarta |
| 167 | +``` |
179 | 168 |
|
| 169 | +### Restart aplikasi setelah mengubah timezone: |
180 | 170 | ```bash |
181 | | -timedatectl status |
| 171 | +pm2 restart streamflow |
182 | 172 | ``` |
183 | 173 |
|
184 | | -#### 2. Lihat Daftar Timezone Yang Tersedia |
| 174 | +## 🐳 Docker Deployment |
185 | 175 |
|
186 | | -Cari timezone Indonesia: |
| 176 | +### 1. Persiapan Environment |
187 | 177 |
|
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 |
190 | 183 | ``` |
191 | 184 |
|
192 | | -Contoh set Timezone ke WIB (Jakarta): |
| 185 | +### 2. Build dan Jalankan |
193 | 186 |
|
194 | 187 | ```bash |
195 | | -sudo timedatectl set-timezone Asia/Jakarta |
| 188 | +docker-compose up --build |
196 | 189 | ``` |
197 | 190 |
|
198 | | -Verifikasi perubahan: |
| 191 | +Akses aplikasi: [http://localhost:7575](http://localhost:7575) |
199 | 192 |
|
200 | | -```bash |
201 | | -timedatectl status |
202 | | -``` |
| 193 | +### 3. Data Persistence |
203 | 194 |
|
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) |
205 | 201 |
|
206 | 202 | ```bash |
207 | | -pm2 restart streamflow |
| 203 | +docker-compose exec app node reset-password.js |
208 | 204 | ``` |
209 | 205 |
|
210 | | -## 🪛 Troubleshooting |
| 206 | +## 🔧 Troubleshooting |
211 | 207 |
|
212 | 208 | ### Permission Error |
213 | | - |
214 | | -Fix permission untuk folder uploads: |
215 | | - |
216 | 209 | ```bash |
217 | 210 | chmod -R 755 public/uploads/ |
218 | 211 | ``` |
219 | 212 |
|
220 | 213 | ### Port Already in Use |
221 | | - |
222 | | -Cek process yang menggunakan port: |
223 | | - |
224 | 214 | ```bash |
| 215 | +# Cek proses yang menggunakan port |
225 | 216 | sudo lsof -i :7575 |
226 | | -``` |
227 | | - |
228 | | -Kill process jika perlu: |
229 | 217 |
|
230 | | -```bash |
| 218 | +# Kill proses jika diperlukan |
231 | 219 | sudo kill -9 <PID> |
232 | 220 | ``` |
233 | 221 |
|
234 | 222 | ### Database Error |
235 | | - |
236 | | -Reset database (HATI-HATI: akan menghapus semua data): |
237 | | - |
238 | 223 | ```bash |
| 224 | +# Reset database (PERINGATAN: akan menghapus semua data) |
239 | 225 | rm db/*.db |
240 | | -``` |
241 | | - |
242 | | -Restart aplikasi untuk create database baru. |
243 | 226 |
|
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 |
253 | 229 | ``` |
254 | 230 |
|
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 |
259 | 232 |
|
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 |
263 | 240 |
|
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 |
265 | 244 |
|
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 |
274 | 246 |
|
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 | +[](https://github.com/bangtutorial/streamflow/graphs/contributors) |
286 | 248 |
|
287 | | -## Lisensi: |
| 249 | +## 📄 License |
288 | 250 |
|
289 | 251 | [](https://github.com/bangtutorial/streamflow/blob/main/LICENSE) |
290 | 252 |
|
291 | | -© 2025 - [Bang Tutorial](https://youtube.com/bangtutorial) |
| 253 | +--- |
| 254 | +© 2025 - [Bang Tutorial](https://youtube.com/bangtutorial) |
0 commit comments