{"id":17645574,"url":"https://github.com/sgaunet/httpfileserver","last_synced_at":"2026-03-04T23:04:30.897Z","repository":{"id":250502613,"uuid":"472854165","full_name":"sgaunet/httpfileserver","owner":"sgaunet","description":"Simple HTTP file server in Go with basic authentication support. Exposes directories via HTTP.","archived":false,"fork":false,"pushed_at":"2026-01-19T20:41:44.000Z","size":41,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-21T02:52:56.781Z","etag":null,"topics":["basic-auth","docker","file-server","go","golang","http-server","static-files","web-server"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgaunet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["sgaunet"]}},"created_at":"2022-03-22T16:51:17.000Z","updated_at":"2025-11-26T19:51:34.000Z","dependencies_parsed_at":"2025-09-06T20:28:04.920Z","dependency_job_id":"802fbb67-b355-484b-aa46-bc5c13972c48","html_url":"https://github.com/sgaunet/httpfileserver","commit_stats":null,"previous_names":["sgaunet/httpfileserver"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/sgaunet/httpfileserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgaunet%2Fhttpfileserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgaunet%2Fhttpfileserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgaunet%2Fhttpfileserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgaunet%2Fhttpfileserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgaunet","download_url":"https://codeload.github.com/sgaunet/httpfileserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgaunet%2Fhttpfileserver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30098118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T22:49:54.894Z","status":"ssl_error","status_checked_at":"2026-03-04T22:49:48.883Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["basic-auth","docker","file-server","go","golang","http-server","static-files","web-server"],"created_at":"2024-10-23T10:57:30.678Z","updated_at":"2026-03-04T23:04:30.889Z","avatar_url":"https://github.com/sgaunet.png","language":"Go","readme":"[![GitHub release](https://img.shields.io/github/release/sgaunet/httpfileserver.svg)](https://github.com/sgaunet/httpfileserver/releases/latest)\n[![Go Report Card](https://goreportcard.com/badge/github.com/sgaunet/httpfileserver)](https://goreportcard.com/report/github.com/sgaunet/httpfileserver)\n![GitHub Downloads](https://img.shields.io/github/downloads/sgaunet/httpfileserver/total)\n![Coverage](https://raw.githubusercontent.com/wiki/sgaunet/httpfileserver/coverage-badge.svg)\n[![coverage](https://github.com/sgaunet/httpfileserver/actions/workflows/coverage.yml/badge.svg)](https://github.com/sgaunet/httpfileserver/actions/workflows/coverage.yml)\n[![linter](https://github.com/sgaunet/httpfileserver/actions/workflows/linter.yml/badge.svg)](https://github.com/sgaunet/httpfileserver/actions/workflows/linter.yml)\n[![Snapshot Build](https://github.com/sgaunet/httpfileserver/actions/workflows/snapshot.yml/badge.svg)](https://github.com/sgaunet/httpfileserver/actions/workflows/snapshot.yml)\n[![Release Build](https://github.com/sgaunet/httpfileserver/actions/workflows/release.yml/badge.svg)](https://github.com/sgaunet/httpfileserver/actions/workflows/release.yml)\n[![License](https://img.shields.io/github/license/sgaunet/httpfileserver.svg)](LICENSE)\n\n\n# httpfileserver\n\nA simple webserver in Golang to expose a directory by http.\nYou can use the binary (releases) or the docker image (from scratch, it's a multi-arch image).\n\nThere is a possibility to add a basic auth by defining environment variable :\n\n* HTTP_USER\n* HTTP_PASSWORD\n\n## Configurable Timeouts\n\nHTTP server timeouts can be configured via command-line flags or environment variables:\n\n| Flag | Environment Variable | Default | Description |\n|------|---------------------|---------|-------------|\n| `--read-timeout` | `HTTP_READ_TIMEOUT` | `30s` | HTTP read timeout |\n| `--write-timeout` | `HTTP_WRITE_TIMEOUT` | `30s` | HTTP write timeout |\n| `--idle-timeout` | `HTTP_IDLE_TIMEOUT` | `120s` | HTTP idle timeout |\n\nValues accept Go duration strings (e.g., `30s`, `5m`, `1h30m`). Minimum is `1s`. Flags take priority over environment variables.\n\n```bash\n# Command-line flags\nhttpfileserver -d /data -p 8081 --read-timeout 60s --write-timeout 120s\n\n# Environment variables\nexport HTTP_WRITE_TIMEOUT=300s\nexport HTTP_IDLE_TIMEOUT=600s\nhttpfileserver -d /data\n```\n\n## Health Check Endpoint\n\nA `/health` endpoint is available for container orchestration and monitoring. It returns HTTP 200 with `{\"status\":\"ok\"}` and does not require authentication.\n\n```yaml\n# Kubernetes probe example\nlivenessProbe:\n  httpGet:\n    path: /health\n    port: 8081\n\n# Docker Compose example\nhealthcheck:\n  test: [\"CMD\", \"curl\", \"-f\", \"http://localhost:8081/health\"]\n  interval: 30s\n```\n\n## Project Disclaimer\n\nThis software project is released under the MIT License and was created primarily for fun and testing purposes. While it may offer some interesting functionalities, please note:\n\n* Intended Use\n* This project is experimental in nature\n* It serves as a playground for ideas and concepts\n* The code may not be optimized or production-ready\n\n## Recommendation\n\nIf you find the features provided by this project useful or intriguing, we strongly recommend exploring more mature and established solutions for your actual needs. This project is not intended to compete with or replace professional-grade software in its domain.\n\n## Contributions\n\nWhile we appreciate your interest, please understand that this project may not be actively maintained or developed further. Feel free to fork and experiment with the code as per the MIT License terms.\nThank you for your understanding and enjoy exploring!\n\n# Build\n\nThis project is using :\n\n* golang 1.17+\n* [task for development](https://taskfile.dev/#/)\n* docker\n* [docker buildx](https://github.com/docker/buildx)\n* docker manifest\n* [goreleaser](https://goreleaser.com/)\n\n\n## Binary\n\n```\ntask\n```\n\n## Docker Image\n\n```\ntask image\n```\n\n# Release\n\n## Snapshot\n\n```\ntask snapshot\n```\n\n## Release\n\n```\ntask release\n```\n\n","funding_links":["https://github.com/sponsors/sgaunet"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgaunet%2Fhttpfileserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgaunet%2Fhttpfileserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgaunet%2Fhttpfileserver/lists"}