Local Cloud is a microservice-based system designed to allow users within the same Local Area Network (LAN) to download videos via shared URLs and watch them through a locally hosted web application.
The system efficiently handles video downloads, stores the data, and renders them on a user-friendly front-end.
-
Clone and configure:
git clone <repo> cd LocalCloud
-
Ensure
config.jsonis set up with Docker service names as hostnames (seeconfig.jsonexample below). -
Start all services:
docker-compose -f docker-compose-dev.yml up --build
-
Access the application:
- Frontend:
http://localhost:3034 - Backend API:
http://localhost:3033/api - MySQL will be ready after initial setup
- Frontend:
Example config.json for Docker:
{
"video-storage-path": "/videos/",
"mysql-conn": "admin:1010@tcp(mysql:3306)",
"mysql-db-name": "localcloud",
"mysql-table-name": "localcloud",
"downloader-socket": "downloader-server:3031",
"message-queue-socket": "message-queue:3032",
"webserver-backend-socket": "web-backend:3033",
"webserver-frontend-port": "3034"
}If you prefer not to use Docker, you can run services locally:
Dependencies:
- Go 1.26.0+
- Node.js + npm or bun
- MySQL 9.6.0+
yt-dlp:pip install yt-dlpffmpeg: Install via your package manager
Alternatively, use Nix:
nix flake developThen run each service (in separate terminals):
cd downloader-server && go run .
cd message-queue && go run .
cd web-app/backend && go run .
cd web-app/frontend && npm install && npm run devConfigure frontend: Ensure .env in web-app/frontend/ matches your backend URL:
VITE_API_BASE=http://localhost:3033
- Content Display: Shows a list of videos stored in the database with the following metadata:
- File name
- File path (MP4)
- Automatically generated thumbnail
- URL Submission: Users can submit video URLs through an input field on the interface.
- Download Management: Handles video download requests, saves the video files, and generates related metadata.
- Database Updates: After completing a download:
- Saves the video file to the dedicated folder.
- Generates and stores a thumbnail.
- Updates the database with file path and metadata.
- TCP/IP Communication: Maintains efficient communication with the Web Server and the Message Queue.
- Inter-Service Communication: Acts as an intermediary for asynchronous communication between the Web Server and the Downloader Server.
- Request Management: Ensures that multiple download requests are processed efficiently and sequentially.
- Metadata Storage: Stores relevant information about downloaded videos, including:
- File path (MP4)
- File name
- Thumbnail path
- Synchronization: Ensures the front-end remains up-to-date with the downloaded videos.
- Local Storage: All downloaded video files are saved in a designated directory accessible by the Downloader Server.
Below is an overview of the Local Cloud system architecture:
- Users access the Web Server through a browser and submit a video URL.
- The Backend of the Web Server sends the URL to the Message Queue over a TCP/IP connection.
- The Downloader Server listens for messages from the queue and processes the video request.
- Once downloaded, the Downloader Server generates a thumbnail, stores the video file in the Videos Folder, and updates the Database.
- The Web Server queries the database to fetch video metadata and displays the available videos on the front-end.
- Backend:
- Go (Golang) for the Web Server, Message Queue and Downloader Server.
- TCP/IP for inter-service communication.
- Frontend:
- React + Vite + Tailwind CSS for the user interface.
- Database:
- MySQL for metadata storage.
- Containerization:
- Docker and Docker Compose for development and deployment.
- Video Processing:
yt-dlpfor video downloading.ffmpegfor MP4 transcoding and thumbnail extraction.
- Frontend:
- React (Vite) and Tailwind for building the user interface.
- Database:
- MySQL (configurable).
- File Storage:
- Local file system for a simple folder.


