Turn your laptop or desktop into a personal local cloud to easily share files with other devices on the same Wi-Fi network.
Features:
- Personal Drive with configurable storage limit per user
- File upload and sharing
- Temporary Chats (TempChats)
- Audio/Video player
- User management (Authentication and Authorization)
- Dark Mode
Building blocks:
- Framework: Next.js
- UI: shadcn-ui
- Video: video.js
- Authentication and Authorization: next-auth
- Database: minivium
- Use Case
- Server Clients
- Minimum Requirements
- Getting Started
- First time setup
- Rerun setup
- Reset Admin Password
- Get Updates
- Folders
- License
- Donate
Imagine you’re at home or in an office:
- You can quickly share files like photos, documents, or videos between your phone and computer without using cloud services (e.g., Google Drive or Dropbox).
- Any device on the same Wi-Fi network can interact with the Local Box to upload files or retrieve hosted files.
The computer that is running this application will act like the server. A local IP address (like 192.168.0.151) will be displayed. Clients (other users) can connect to that IP address via browsers.
Make sure to add port number to the url.
If the server IP is 192.168.0.151 and is running at port 3001 then type http://192.168.0.151:3001
in the browser.
Software:
- Node.js (version 16 or higher)
- npm
- npx
Hardware:
- Any modern/older laptop or desktop should work.
My setup:
- Laptop: HP ProBook 6450b
- Year: 2010
- Storage: 320GB HDD
- Memory: 4GB
- OS: Ubuntu 20.04LTS
- Clone this repository from GitHub.
git clone https://github.com/yusufshakeel/localbox.git
- Go inside the cloned directory and install the dependencies
npm i
- Now, run the following command in the terminal to bootstrap the project.
This will create files and folders that are needed by the application.
npm run bootstrap
- Now, build the application by running the following command in the terminal.
This will build the application.
npm run build
- You are now ready to start your localbox server.
npm run start
Alternatively, run the following command if you want to run the application in dev mode.
npm run dev
-
You will see the url of the localbox application in the terminal after it starts running.
-
Open the url (example http://localhost:3000) in the browser.
Run the following command to run the application on another port.
PORT=9000 npm run start
- Go to Home page, and you will see localbox perform some setup operations.
- You will also get the admin account created.
- A
setup.lock
file will be created inside the/private
folder.
Default credentials
Username: admin
Password: root1234
Change the password of the admin account after logging in.
Important! Make sure to restart the server.
- Delete the
setup.lock
file from the/private
folder. - Run the server
npm run start
ornpm run dev
- Open the Home page.
- Setup will be performed again.
- Important! Make sure to restart the server.
- When pulling the latest code from the main branch from GitHub.
- When you re-install the npm packages by running the
npm i
command. - When you re-bootstrap.
Go to /private
folder and look for reset-admin-password.txt
file. Enter the new password like
the following and save the file.
NEW_PASSWORD=myNewAdminPassword
Points to note:
- Make sure to write the password after the
=
sign. - Do not add space before/after the password.
- Keep the password within one line.
- Password length must be between 8 and 32 characters.
Now, go to the home page and the admin password will be updated. Change the Admin password after logging in.
Pull the latest main branch changes to your local main branch.
git pull origin main
If you are pulling a newer version then run the install dependencies, bootstrap, build and the rerun setup steps again.
This directory contains private files. Don't change anything here.
This directory contains files and folders that can be viewed in browser when you are running localbox.
It's free 😃
MIT License Copyright (c) 2024 Yusuf Shakeel
Feeling generous 😃 Donate via PayPal