Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

rahulkuzur3/python_file_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

8 Commits

Repository files navigation

Open Source Status Python

πŸ“‚ Python File Server with Auto-Restart Feature

This project is a lightweight file server built using Python’s built-in http.server module. It serves files from a files/ directory and features a sleek web interface with a refresh server button that restarts the server process on demand.


πŸš€ Features

  • πŸ“ Serves files from a local files/ folder
  • πŸ’» Clean and responsive HTML/CSS interface
  • πŸ”„ One-click server restart via web UI
  • βš™οΈ Built with Python standard libraries (no external dependencies)
  • 🧠 Automatically lists files in the UI with download links

πŸ“‚ Project Structure

your_project/
β”œβ”€β”€ server.py # Main server script
└── files/ # Directory to store and serve files

πŸ”§ Requirements

  • Python 3.x

βœ… No external packages are needed β€” everything runs using Python’s built-in modules.


▢️ How to Run

  1. Create a folder named files in the same directory as server.py.

  2. Place any files you want to share in the files folder.

  3. Run the server by executing:

    python server.py
  4. Open your browser and go to:

    http://localhost:8080
    

πŸ’‘ How It Works

  • server.py uses Python’s http.server module with a custom handler.
  • The server serves files from the files/ directory.
  • It generates an HTML interface with:
    • A welcome message
    • A list of downloadable files
    • A button to "Refresh Server"
  • The /refresh route restarts the server process via subprocess and os._exit.

πŸ›‘ Stopping the Server

To stop the server at any time, press:

Ctrl + C

πŸ“ƒ License

This project is open source and free to use. Feel free to modify or extend it.


✍️ Author

Rahul Kuzur β€” Made with ❀️ using Python.

About

A python file server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /