forked from BioHapHazard/Freedify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathguide.html
More file actions
304 lines (266 loc) · 12.4 KB
/
Copy pathguide.html
File metadata and controls
304 lines (266 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Freedify Deployment Guide</title>
<style>
:root {
--bg-color: #0d1117;
--container-bg: #161b22;
--text-color: #c9d1d9;
--accent-color: #58a6ff;
--border-color: #30363d;
--code-bg: #22272e;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
background-color: var(--bg-color);
color: var(--text-color);
line-height: 1.6;
margin: 0;
padding: 0;
}
.container {
max-width: 900px;
margin: 0 auto;
padding: 2rem;
}
header {
text-align: center;
margin-bottom: 3rem;
}
.hero-image {
width: 100%;
max-height: 400px;
object-fit: cover;
border-radius: 12px;
box-shadow: 0 8px 30px rgba(0,0,0,0.5);
margin-bottom: 2rem;
border: 1px solid var(--border-color);
}
h1, h2, h3 {
color: #ffffff;
margin-top: 2rem;
}
h1 { font-size: 2.5rem; text-align: center; margin-bottom: 0.5rem; }
.card {
background: var(--container-bg);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 1.5rem;
margin-bottom: 2rem;
}
.card h2 { margin-top: 0; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
code {
background-color: rgba(110,118,129,0.4);
padding: 0.2em 0.4em;
border-radius: 6px;
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
font-size: 85%;
}
pre {
background-color: var(--code-bg);
padding: 1rem;
border-radius: 6px;
overflow-x: auto;
border: 1px solid var(--border-color);
}
pre code {
background-color: transparent;
padding: 0;
}
a { color: var(--accent-color); text-decoration: none; }
a:hover { text-decoration: underline; }
.note {
border-left: 4px solid var(--accent-color);
background: rgba(88, 166, 255, 0.1);
padding: 1rem;
border-radius: 0 6px 6px 0;
margin: 1rem 0;
}
table {
border-collapse: collapse;
width: 100%;
margin: 1rem 0;
}
th, td {
border: 1px solid var(--border-color);
padding: 0.75rem;
text-align: left;
}
th { background-color: var(--container-bg); }
</style>
</head>
<body>
<div class="container">
<!-- Header Image -->
<img src="freedify_deployment_guide_header_1768727342716.png" alt="Freedify Deployment Guide" class="hero-image">
<h1>Freedify Deployment Guide</h1>
<p style="text-align: center; font-size: 1.2rem; color: #8b949e;">Stream music anywhere. Host it yourself.</p>
<!-- Docker Quick Start -->
<div class="card" style="border-color: #1d63ed; background: linear-gradient(135deg, rgba(29, 99, 237, 0.1), var(--container-bg));">
<h2>🐳 Docker (Easiest - One Command!)</h2>
<p><strong>Best for:</strong> Anyone with Docker installed. No setup required.</p>
<p><strong>Prerequisite:</strong> Install <a href="https://www.docker.com/get-started/" target="_blank">Docker Desktop</a> first.</p>
<h3>Just run:</h3>
<pre><code>docker run -d -p 8000:8000 biohaphazard/freedify:latest</code></pre>
<p>Then open <a href="http://localhost:8000" target="_blank">http://localhost:8000</a> 🎵</p>
<div class="note">
<strong>🍓 ARM64 Supported:</strong> Works on Raspberry Pi, Apple Silicon (M1/M2/M3), and ARM servers!
</div>
</div>
<!-- Option 1: Localhost -->
<div class="card">
<h2>💻 Option 1: Localhost (Your Computer)</h2>
<p><strong>Best for:</strong> Fastest performance, local file access, no cost.</p>
<h3>Prerequisites</h3>
<ol>
<li><strong>Install Python 3.11</strong>: <a href="https://www.python.org/downloads/" target="_blank">Download Here</a> (Check "Add Python to PATH").</li>
<li><strong>Install FFmpeg</strong> (Required for transcoding):
<ul>
<li>Windows: <code>winget install ffmpeg</code> via PowerShell.</li>
<li>Mac: <code>brew install ffmpeg</code> via Terminal.</li>
</ul>
</li>
</ol>
<h3>Steps</h3>
<ol>
<li>Download the code (Clone or ZIP) from GitHub.</li>
<li>Open terminal in the folder and install dependencies:
<pre><code>pip install -r app/requirements.txt</code></pre>
</li>
<li>Start the server:
<pre><code>python -m uvicorn app.main:app --host 0.0.0.0 --port 8000</code></pre>
</li>
<li>Visit <a href="http://localhost:8000" target="_blank">http://localhost:8000</a> 🎵</li>
</ol>
</div>
<!-- Option: Termux (Android) -->
<div class="card">
<h2>📱 Termux (Android)</h2>
<p><strong>Best for:</strong> Running directly on your Android phone/tablet.</p>
<h3>Steps</h3>
<ol>
<li>Install <a href="https://termux.dev/" target="_blank">Termux</a> from F-Droid.</li>
<li>Install dependencies:
<pre><code>pkg install python ffmpeg git
pip install -r app/requirements.txt</code></pre>
</li>
<li>Clone and run:
<pre><code>git clone https://github.com/BioHapHazard/Freedify
cd Freedify
python -m uvicorn app.main:app --host 0.0.0.0 --port 8000</code></pre>
</li>
<li>Open <code>http://localhost:8000</code> in your phone's browser 🎵</li>
</ol>
<div class="note">
<strong>💡 Tip:</strong> Cache defaults to <code>~/.freedify_cache</code>. Use <code>CACHE_DIR=~/path</code> to customize.
</div>
</div>
<!-- Option 2: Railway -->
<div class="card">
<h2>🚂 Option 2: Railway (Recommended Cloud)</h2>
<p><strong>Best for:</strong> Mobile access, Hi-Res audio, zero maintenance.</p>
<div class="note">
<strong>✨ Plug and Play:</strong> We added auto-configuration so you don't need to mess with settings!
</div>
<h3>Steps</h3>
<ol>
<li><strong>Fork</strong> the Freedify repository to your GitHub.</li>
<li>Log in to <a href="https://railway.app" target="_blank">Railway.app</a>.</li>
<li>Click <strong>+ New Project</strong> → <strong>Deploy from GitHub repo</strong>.</li>
<li>Select your forked repo and click <strong>Deploy Now</strong>.</li>
<li>Wait for initialization, then go to <strong>Settings → Networking</strong> to get your public URL.</li>
</ol>
</div>
<!-- Option 3: Render -->
<div class="card">
<h2>☁️ Option 3: Render (Free Tier Alternative)</h2>
<p><strong>Best for:</strong> Free hosting, if you only need standard 16-bit FLAC.</p>
<div class="note" style="border-left-color: #ffcc00; background: rgba(255, 204, 0, 0.1);">
<strong>⚠️ Warning:</strong> Hi-Res (24-bit) audio often fails on Render due to IP blocking. You will get standard 16-bit CD quality.
</div>
<h3>Steps</h3>
<ol>
<li><strong>Fork</strong> the repo to your GitHub.</li>
<li>Sign up for <a href="https://render.com" target="_blank">Render.com</a>.</li>
<li>Click <strong>New +</strong> → <strong>Web Service</strong> → Select your fork.</li>
<li>Configure:
<ul>
<li><strong>Build Command:</strong> <code>pip install -r app/requirements.txt</code></li>
<li><strong>Start Command:</strong> <code>python -m uvicorn app.main:app --host 0.0.0.0 --port $PORT</code></li>
</ul>
</li>
<li>Click <strong>Create Web Service</strong>.</li>
</ol>
</div>
<!-- Secrets Section -->
<div class="card">
<h2>🔑 How to Find Your API Keys</h2>
<p>Unlock AI playlists, Drive sync, and Hi-Res audio by finding these keys.</p>
<table>
<tr>
<th>Variable Name</th>
<th>Purpose</th>
<th>How to find it</th>
</tr>
<tr>
<td><code>GEMINI_API_KEY</code></td>
<td>AI Features (DJ, Smart Playlists)</td>
<td><a href="https://aistudio.google.com/app/apikey" target="_blank">Google AI Studio</a> → Create API Key.</td>
</tr>
<tr>
<td><code>LISTENBRAINZ_TOKEN</code></td>
<td>Scrobbling (History)</td>
<td>Create account at <a href="https://listenbrainz.org/" target="_blank">ListenBrainz</a>. <strong>Check your email</strong> for the API Key after signing up.</td>
</tr>
<tr>
<td><code>DAB_SESSION</code></td>
<td>Hi-Res Audio (24-bit)</td>
<td>Log in to <a href="https://dabmusic.xyz" target="_blank">Dab Music</a>. F12 → Application → Cookies → Copy 'session' value.</td>
</tr>
<tr>
<td><code>DAB_VISITOR_ID</code></td>
<td>Hi-Res Audio (Required)</td>
<td>Same as above. Copy 'visitor_id' value from cookies.</td>
</tr>
<tr>
<td><code>GOOGLE_CLIENT_ID</code></td>
<td>Google Drive Sync</td>
<td>Google Cloud Console → Credentials → OAuth 2.0 Client ID.</td>
</tr>
</table>
<h3>Where to put them?</h3>
<ul>
<li><strong>Localhost:</strong> Create a file named <code>.env</code> in the folder and paste them like <code>KEY=VALUE</code>.</li>
<li><strong>Railway:</strong> Go to the <strong>Variables</strong> tab in your project dashboard.</li>
</ul>
</div>
<!-- Apple Music Tip -->
<div class="card">
<h2>🍎 Apple Music Users</h2>
<p>Freedify supports <strong>Spotify playlist URLs</strong>. To import your Apple Music playlists, use a free transfer tool:</p>
<table>
<tr>
<th>Tool</th>
<th>Free Limit</th>
</tr>
<tr>
<td><a href="https://soundiiz.com" target="_blank">Soundiiz</a></td>
<td>200 songs</td>
</tr>
<tr>
<td><a href="https://www.tunemymusic.com" target="_blank">TuneMyMusic</a></td>
<td>500 songs</td>
</tr>
<tr>
<td><a href="https://freeyourmusic.com" target="_blank">FreeYourMusic</a></td>
<td>Desktop app</td>
</tr>
</table>
<p><strong>Steps:</strong> Transfer playlist to Spotify (free account works!) → Copy Spotify URL → Paste in Freedify → Stream in lossless! 🎵</p>
</div>
</div>
</body>
</html>