{"id":13566879,"url":"https://github.com/pageauc/webserver","last_synced_at":"2025-07-30T23:37:03.191Z","repository":{"id":74954781,"uuid":"91620375","full_name":"pageauc/webserver","owner":"pageauc","description":"A Raspberry Pi Simple python Stand Alone Local Network Web Server.  Automatically reads folder and file entries into a right pane selection list. Selected folder opens a new browser tab and Selected file displays content in browser left pane iframe.  Right pane list can be ordered by date/time or alphabetic ascending or descending via settings.py file.  A menubox.sh makes it easier to operate and change the webserver settings.","archived":false,"fork":false,"pushed_at":"2021-01-11T17:42:16.000Z","size":1837,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T12:45:30.364Z","etag":null,"topics":["automatic","directories-scanner","easy-to-use","files","iframes","menu","menu-navigation","python","raspberry-pi","reads","single-file-component","webserver"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pageauc.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-05-17T21:10:13.000Z","updated_at":"2023-10-07T21:51:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"bbae55c2-8b97-4ba6-a9a2-04612cb3ab91","html_url":"https://github.com/pageauc/webserver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageauc%2Fwebserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageauc%2Fwebserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageauc%2Fwebserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageauc%2Fwebserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pageauc","download_url":"https://codeload.github.com/pageauc/webserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238614553,"owners_count":19501479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automatic","directories-scanner","easy-to-use","files","iframes","menu","menu-navigation","python","raspberry-pi","reads","single-file-component","webserver"],"created_at":"2024-08-01T13:02:18.737Z","updated_at":"2025-02-13T07:31:11.352Z","avatar_url":"https://github.com/pageauc.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# webserver.py\n### Simple python Stand Alone Local Network Web Server\n#### Dynamically Reads folder and file entries into a right pane list. Selected folder opens in current browser tab\nwith back arrow for navigation back. File links selected in right pane display contents in left pane. Refresh button\nre-reads directory structure for right pane link display. \n\n## Quick Install\nLog into destination computer using Putty SSH or open a computer terminal session on the destination computer.\nThis can be a Raspberry Pi, Debian or similar unix system that supports apt-get.     \n***Step 1*** Highlight curl command in code box below using mouse left button. Right click mouse in highlighted area and Copy.   \n***Step 2*** On RPI putty SSH or terminal session right click, select paste then Enter to download and run script.   \n\n    curl -L https://raw.github.com/pageauc/webserver/master/webserver-install.sh | bash\n\nThe command will download and execute the GitHub ***webserver-install.sh*** bash script.\nAlternatively you can git clone the repository to the local system\n\n    cd ~\n    git clone https://raw.github.com/pageauc/webserver\n\nScreen shot of web interface\n![menubox main menu](https://github.com/pageauc/webserver/blob/master/webpage.png)   \n\n## Description\nThis is a single file stand alone python webserver that needs minimal or no setup.\nThis webserver can be used to remotely view images, video, documents, html, java, Etc.\nfiles from your (LAN) local area network connected computers using a web browser. \nDirectory links to files and subfolders are dynamically created and displayed\nin a right side listing that can be arranged and sorted via variables. \nVariables are contained in the settings.py file and allow customization of\nwebserver display and configuration settings.\n\nI use webserver.py in my [pi-timolo](https://github.com/pageauc/pi-timolo),\n[speed-camera](https://github.com/pageauc/speed-camera) and other projects\nto allow easy browsing of image, video or other project files.\n\nIf a folder is selected on the right pane listing\nthe folder contents will appear in the existing browser tab.\nSelect \u003c BACK link to navigate back through folder structure.   \nNOTE: \u003c BACK link will not display in web root folder.\n\nThis web server can display other types of content\nlike javascript, css Etc will run. A sample calculator program is\ninclude in the calculator folder of the www web root.\nIf a folder has an index.html it will take over\nthe browser tab. html files will be displayed full screen in browser tab.\n\nThis browser can only access local raspberry pi files.\nIt cannot access internet web pages.\n\n***Please Note***\nYou will need at least two entries in a folder\nbefore the web server will display content.\n\n***Change Web Root***\nEdit the settings.py to change the default www folder web root to\nanother folder location of your choice.\n\n    cd ~/webserver\n    nano settings.py\n\n## Manual Install\nFrom logged in RPI SSH session or console terminal perform the following. You can review\nthe webserver-install.sh script code before executing.\n\n    cd ~\n    wget https://raw.github.com/pageauc/webserver/master/webserver-install.sh\n    chmod +x webserver-install.sh\n    ./webserver-install.sh\n\n## How to Run webserver.py\n\nScreen shot of menubox.sh whiptail Menu   \n![menubox main menu](https://github.com/pageauc/webserver/blob/master/menubox.png)    \n\nUse menubox.sh for an easy way to manage the webserver\n\n    cd ~/webserver\n    ./menubox.sh\n\nor to manually start webserver.py in the foreground (ctl-c to stop)\nNote if you exit the terminal session the webserver will exit.  See below\nfor manually running webserver.py in background using webserver.sh\n\n    cd ~/webserver\n    ./webserver.py\n\nA message will be displayed indicating the ip address:port to enter in\na browser url bar.  This will access the webserver files in the server web root.\n\nIf you want to run the webserver.py as a background daemon then use webserver.sh\nIf no parameter is specified it will display the PID or indicate webserver.py is\nnot running.\n\nTo Start webserver.py as a background daemon\n\n    cd ~/webserver\n    ./webserver.sh start\n\nTo Stop webserver.py\n\n    cd ~/webserver\n    ./webserver.sh stop\n\n## Run webserver.py on Boot\n\nTo auto launch webserver.py on boot-up of raspberry pi perform the following\n\n    sudo nano /etc/rc.local\n\nIn nano add the following command to the rc.local file just before the exit 0 command.\nThis will launch webserver and the webserver in the background running under the pi user (not root).\nNote the webserver startup is optional.\n\n    su pi -c \"/home/pi/webserver/webserver.sh start \u003e /dev/null\"\n\nctrl-x y to save and exit nano editor\n\nReboot RPI and test operation by triggering motion and checking images are successfully saved to your motion or timelapse folder.\n\n    sudo reboot\n\nuse menubox.sh to verify that webserver.py is running after reboot\n\n## Customize Settings\n\nThe webserver.py variables are stored in the settings.py file.  These can be\nedited using the nano editor to customize for your particular needs if required\n\nEdit settings.py file using nano editor per the following commands\n\n    cd ~/webserver\n    nano settings.py\n\nctrl-x y to exit nano editor and save changes\n\nYou can also use menubox.sh to edit/view the webserver settings\n\n    cd ~/webserver\n    ./menubox.sh\n\n## Reference Links\nwebserver wiki - https://github.com/pageauc/pi-timolo/wiki/Access-images-via-webserver   \ngithub webserver repo - https://github.com/pageauc/webserver\n\n\nGood Luck\nClaude Pageau\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpageauc%2Fwebserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpageauc%2Fwebserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpageauc%2Fwebserver/lists"}