ESP32 Netowrk Attached Storage (NAS)

This project* is a Network Attached Storage (NAS) device I built using a ESP32 development board as the server with a SD card module for file storage. It currently has the following functionalities and features:

  • Upload files
  • Download files
  • Open files directly online1
  • Delete files2
  • Independent of your home Wi-Fi network3
  • Supports Over-the-Air (OTA) updates4

In addition, the project also comes with a webpage for diaplsying information and taking user inputs. However, should anyone want to make their own webpage or application to integrate with the sketch, they may find reading the source code helpful. The exchange of information between the client and server is mainly done via JSON strings, which are easy to parse and construct using JavaScript.

For any issues, questions, and suggestions, please feel free to mention them on GitHub or reply to this topic directly. You may also make improvements to the code on GitHub. Thank you for checking out this project.

Footnotes:
*Original project proposal can be found here.
1Currently only supports a limited number of formats.
2Currently only supports the deletion of indevidual files.
3The NAS operates as an Access Point (AP).
4Both the webpage and sketch can be updated via OTA.

Status Update (11/30/2022):
I am planning to add an account management system to my project.
This system aims to enable my project to:

  1. Support multiple users with different accounts.
  2. Separate files belonging to different accounts.
  3. Provide different levels of access to contents (e.g., admins can access system files, other users can only access their uploaded files).
    ...

To support these functionalities, a server-side session management module is now in development. This module can:

  1. Track user login status (i.e., whether the user is logged in and which account is used).
  2. Remove users if they are idle for a prolonged period of time (optional).
    ...

For more information and recent updates, please refer to my repo

Status Update (1/3/2023, Happy New Year!):
I have updated my session management library to increase the compatibility with different webserver libraries. The code is organised in a library-fashion now, making it usable for all.

All past changes have now been merged into the master branch, please feel free to check it out.

In the foreseeable future, I am planning to:

  1. Rewrite certain functions with std::optional when C++20 is supported*.
  2. Enable saving sessions information to SD card filesystem to save RAM.**
  3. Implement built-in session timeout/expiration mechanism.
  4. Documentation.

*Expected in Q1-Q2 this year (2023), according to official response.
**Still under evaluation, not sure about performance tradeoff, etc.

Please do reply under this topic or create an issue in GitHub for feature suggestions, improvements, etc. They are very welcomed.

Status Update (1/16/2023)
I started a new project, which is a continuation of the NAS project.

This project aims to not only act as a storage device, but also a hub to connect IoT nodes and interact with online services in an extendable manner using flexible API.
The new project, while retaining all the features of its predecessor, makes improvements in terms of code organisation and extends its functionalities.

Compared to its predecessor, this project:

  1. Retains all previous features and functionality.1
  2. Better code orgainsation.
  3. Integrates a session manager.
  4. More user-friendly webpage design.
  5. Doubled storage.2
  6. Multi-user design.3

This project is planned to gradually replace and surpass its predecessor as features and functionalities are being ported. The predecessor will no longer be actively maintained or developed but will still be available for to the public for reference.

Advice and opinions are very welcomed!

1Still in progress, but all essential ones are already available.
2Uses 2 SD cards, each on a separate SPI bus, they will not interfere with each other, and should allow concurrent access from different threads.
3Uses session manager as a base, highly customisable.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.