No description https://drive.swo.moe
Find a file
renovate[bot] a0ca8cb235
Some checks are pending
Docker Build and Publish / build (push) Waiting to run
chore(deps): update dependency i18next to v25.8.14 (#383)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-04 13:33:58 +00:00
.github/workflows chore(deps): update docker/build-push-action action to v6.19.2 (#361) 2026-02-12 13:11:58 +00:00
config refactor(config): update storage configuration, remove unnecessary properties 2025-05-28 14:45:07 +07:00
public feat(i18n): add Vietnamese localization support 2025-05-31 13:35:29 +07:00
src chore: update raw file handling to preserve original filename and change JSX setting in tsconfig 2026-01-24 14:31:05 +07:00
.dockerignore feat(docker): implement Docker support 2025-05-25 16:44:14 +07:00
.env.example refactor(config): update storage configuration, remove unnecessary properties 2025-05-28 14:45:07 +07:00
.gitignore chore(config): update storage directory config and adjust Docker to use new folder 2025-05-25 20:39:26 +07:00
docker-compose.yml refactor(docker): update Docker configuration for GitHub Actions process 2025-05-28 14:48:26 +07:00
Dockerfile refactor(docker): update Docker configuration for GitHub Actions process 2025-05-28 14:48:26 +07:00
i18next-parser.config.js fix double plurals with context 2022-02-06 20:09:59 +08:00
i18next.d.ts feat: upgrade next and i18n 2023-01-26 13:35:41 +08:00
LICENSE create license 2021-06-30 12:01:13 +01:00
next-env.d.ts chore: update raw file handling to preserve original filename and change JSX setting in tsconfig 2026-01-24 14:31:05 +07:00
next-i18next.config.js feat(i18n): add Vietnamese localization support 2025-05-31 13:35:29 +07:00
next.config.js refactor(i18n): replace localStorage with cookie-based state and improve language switching 2025-05-30 01:11:12 +07:00
package.json chore(deps): update dependency @types/node to v24.11.0 (#381) 2026-02-28 09:43:22 +00:00
pnpm-lock.yaml chore(deps): update dependency i18next to v25.8.14 (#383) 2026-03-04 13:33:58 +00:00
pnpm-workspace.yaml fix(deps): resolve compatibility issues for tailwindcss 2025-05-29 23:07:20 +07:00
postcss.config.js chore(deps): update react-reader, headlessui, tailwindcss and fix related compatibility issues (#19, #20, #27) 2025-05-29 16:46:12 +07:00
README.md chore(deps): remove unnecessary dependencies and add CookiesProvider for SSR support 2025-05-29 14:26:48 +07:00
renovate.json ci: update renovate 2023-01-26 15:43:13 +08:00
tailwind.config.js feat(theme): add theme toggle functionality and localization support for light/dark modes 2025-05-30 21:27:40 +07:00
tsconfig.json chore: update raw file handling to preserve original filename and change JSX setting in tsconfig 2026-01-24 14:31:05 +07:00

file-storage-index

file-storage-index

Get started · What's available · Docker

Local file storage directory listing, powered by Next.js and React

Node.js Next.js React Docker GitHub Discussions

📖 Introduction

file-storage-index is a fork of onedrive-vercel-index, reimagined for local file systems instead of Microsoft OneDrive cloud storage. This lightweight web application lets you browse, preview, and share files from your local storage with a modern, responsive interface.

  • 🚀 Simple deployment with Docker or Node.js
  • 🔍 Built-in search and file preview capabilities
  • 🔒 Password protection at folder level
  • 📱 Modern responsive design for all devices
  • 🎬 Rich media support (video/audio streaming, office docs, PDFs)
  • 💯 Zero cloud dependencies - runs entirely on your machine

Perfect for home media servers, personal file sharing, or any scenario where you need a beautiful interface to your local files.

🎮 Demo

demo

Features

👀 File preview 💠 List / Grid layouts 🎥 Video and audio
PDF, EPUB, markdown, code, plain text For previewing images and documents with thumbnails mp4, mp3, m4a, ..., play online with subtitles support!
📄 Office preview 📝 README.md preview 📑 Pagination
docx, pptx, xlsx, ... Also renders code blocks, images with relative links, ... For folders with many files
🔒 Protected folders 🔎 Native Search 🐳 Docker Support
Password protected routes and files Searching through your local files Easy deployment with Docker and Docker Compose

... and more:

  • Direct file serving and hosting
  • Full dark mode support
  • Style and website customizations
  • Mobile responsive design

Note

: This project is focused on showcasing and providing a way for others to download files from your local file system. Emphasis on simple setup and easy customization.

🚀 Quickstart Guide

Local Installation

  1. Clone repository:
git clone https://github.com/doandat943/file-storage-index.git
cd file-storage-index
  1. Install dependencies:
pnpm install
  1. Configuration: Copy .env.example file to .env and edit environment variables:
cp .env.example .env

Required environment variables:

  • STORAGE_ROOT: File storage directory (default is './data')
  1. Run the application in development mode:
pnpm dev

🐳 Docker Guide

This section covers all aspects of using file-storage-index with Docker.

Building from Source

If you prefer to build the Docker image from source:

  1. Clone repository:
git clone https://github.com/doandat943/file-storage-index.git
cd file-storage-index
  1. Configure environment:
cp .env.example .env

Edit .env file to set up your environment variables.

  1. Build and run with Docker Compose:
docker-compose up --build -d

Quick Deployment

The fastest way to get started with these images:

  1. Create a docker-compose.yml file with the following content:
version: '3'

services:
  file-storage-index:
    image: doandat943/file-storage-index:latest
    container_name: file-storage-index
    restart: unless-stopped
    environment:
      - NODE_ENV=production
    volumes:
      - file-storage-data:/app/data
    ports:
      - "3000:3000"

volumes:
  file-storage-data:
  1. Run the container:
docker-compose up -d

The application will be available at http://localhost:3000.

Updating Docker Containers

To update your container to the latest image version:

  1. Pull the latest image:
docker pull doandat943/file-storage-index:latest
  1. Stop and remove the current container (your data will be preserved):
docker-compose down
  1. Start the container with the new image:
docker-compose up -d
  1. Verify that the new container is running:
docker ps

Note: Your data will remain intact as long as you've properly configured volumes in your docker-compose.yml file.

Common Docker Commands

Here are the most frequently used commands for managing your container:

# View logs
docker logs file-storage-index

# Stop container
docker-compose stop

# Start container
docker-compose start

# Remove container (preserves data volume)
docker-compose down

# Access container shell
docker exec -it file-storage-index /bin/sh

CI/CD Pipeline

This project uses GitHub Actions for continuous integration and deployment:

  • Every commit triggers automatic builds and pushes to GitHub Container Registry and Docker Hub
  • The workflow file .github/workflows/docker-publish.yml handles building, pushing, and signing images
  • Images are signed with Cosign for security verification

If you fork this project and want to use the CI/CD pipeline, set up these repository secrets:

  • DOCKERHUB_USERNAME: Your Docker Hub username
  • DOCKERHUB_TOKEN: Your Docker Hub access token

⚙️ Configuration Options

Storage Configuration

Edit config/api.config.js to set up:

  • File storage directory path
  • Cache configuration

Website Configuration

Edit config/site.config.js to set up:

  • Website name and icon
  • Root shared directory
  • Password-protected paths
  • Contact information and social links

Folder Protection

To protect a folder with a password:

  1. Create a .password file in the folder you want to protect
  2. Add the folder path to protectedRoutes in config/site.config.js

🔌 API Reference

Available Endpoints

  • GET /api?path={path}: Get file or folder information
  • GET /api/item?id={id}: Get item information by ID
  • GET /api/raw?path={path}: Get raw file content
  • GET /api/search?q={query}: Search for files and folders
  • GET /api/thumbnail?path={path}: Get file thumbnail

📄 License

MIT

👨‍💻 Author

Created and maintained by doandat943

made with ❤️ by doandat943