Running a 24/7 Lo-Fi Radio Stream from a VPS in 2026
The lo-fi hip hop radio format has proven remarkably durable — relaxed music combined with an animated loop visual generates passive viewership that accumulates to significant channel growth over months. The catch: manual 24/7 Twitch or YouTube streaming is impractical. This entire setup runs unattended on a VPS.
What You Need
- A VPS (2 vCores, 2 GB RAM minimum for streaming)
- DMCA-safe music library (see below)
- A looping visual (animated .mp4 or generated frames)
- ffmpeg (software encoding)
ffmpeg-Based Stream Loop
The simplest possible approach — no OBS required:
#!/bin/bash
# stream_loop.sh
RTMP_KEY="your_twitch_or_youtube_stream_key"
RTMP_URL="rtmp://live.twitch.tv/live"
# Loop the video indefinitely and stream
ffmpeg -re \
-stream_loop -1 \ # Loop video infinitely
-i /home/stream/lofi_visual.mp4 \ # Your animated visual
-stream_loop -1 \
-i /home/stream/music_concat.mp3 \ # Your music concatenated
-c:v libx264 -preset veryfast -b:v 6000k \
-c:a aac -b:a 160k \
-f flv "$RTMP_URL/$RTMP_KEY"
Run with PM2:
pm2 start stream_loop.sh --name lofi-stream
pm2 save
Building Your Music Library
DMCA-safe music options:
- Chillhop Music — Explicit permission for streams under their specific terms
- StreamBeats (Harris Heller) — Royalty-free, created specifically for streams
- Monstercat Gold — Licence covers streaming with monthly subscription
- Artlist.io — Annual licence covering streaming rights
- Your own music — Commission tracks from royalty-free composers
Avoid: any playlist or library that doesn't explicitly state streaming rights. YouTube's Content ID and Twitch's automated DMCA detection will mute VoDs.
Concatenating Your Music Library
# Create a file list for ffmpeg:
ls /home/stream/music/*.mp3 > /tmp/music_list.txt
# Prepend 'file' to each line:
sed -i "s/^/file '/" /tmp/music_list.txt
sed -i "s/$/'/" /tmp/music_list.txt
# Concatenate all files into one:
ffmpeg -f concat -safe 0 -i /tmp/music_list.txt \
-c copy /home/stream/music_concat.mp3
Playlist Randomiser
For variety, shuffle the track order each stream cycle:
# Random shuffle with shuf:
ls /home/stream/music/*.mp3 | shuf | \
sed "s/^/file '/" | sed "s/$/'/" > /tmp/music_list.txt
Space-Node VPS plans include 2 vCores suitable for ffmpeg x264 encoding at 6 Mbps bitrate with CPU headroom for additional processes.