{"id":16656327,"url":"https://github.com/alisinabh/hostex","last_synced_at":"2025-07-06T21:07:29.220Z","repository":{"id":116194144,"uuid":"290346641","full_name":"alisinabh/hostex","owner":"alisinabh","description":"File upload/server service at its simplest and fastest form.","archived":false,"fork":false,"pushed_at":"2020-08-30T18:59:25.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-08T18:03:24.404Z","etag":null,"topics":["fileserver"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alisinabh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2020-08-25T23:34:12.000Z","updated_at":"2020-08-30T18:59:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"45ecdd9f-7f32-46d4-990f-4b7fd9467242","html_url":"https://github.com/alisinabh/hostex","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisinabh%2Fhostex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisinabh%2Fhostex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisinabh%2Fhostex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisinabh%2Fhostex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alisinabh","download_url":"https://codeload.github.com/alisinabh/hostex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243277488,"owners_count":20265350,"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":["fileserver"],"created_at":"2024-10-12T09:57:03.530Z","updated_at":"2025-03-12T18:47:36.564Z","avatar_url":"https://github.com/alisinabh.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hostex\n\nHostex is a simple storage solution for web. It simply handles uploads and downloads of files.\n\n## Installation\n\n### Docker\n\nSimply run a Hostex service with the following command.\n\n```\ndocker run -d \\\n           -p4001:4001 \\\n\t   -v /local/storage/path:/var/hostex \\\n\t   -e HOSTEX_UPLOAD_TOKEN=asecrettokenhere \\\n\t   alisinabh/hostex\n```\n\nPlease change `/local/storage/path` to a path on your system for the files to get stored. And choose a random string (You can probably just bang on your keyboard a few times) for `HOSTEX_UPLOAD_TOKEN`. This is later used when you try to upload files from your backend.\n\n#### Environment variables\n\n - `HOSTEX_UPLOAD_TOKEN`: A string token for use as a Authorization Bearer token when uploading files.\n - `HOSTEX_STORAGE_PATH`: The path which hostex will use to store its data. Defaults to `/var/hostex`.\n - `HOSTEX_URL_RAND_SIZE`: Byte size of the url random generated in HOSTEX. Increasing it will give you more space. Defaults to `8`(bytes). \n\n## Hostex API\n\n### Uploading a file [POST /]\n\nJust send a HTTP POST multipart request with your file and Authorization header. The Authorization header should be in the following format.\n\n  + Request (multipart/form-data)\n\n    + Headers\n\n\t        Authorization: Bearer HOSTEX_UPLOAD_TOKEN\n    \n\t+ Attributes\n\t  \n\t  - file: File to upload\n\n  + Response 200 (application/json)\n\n    + Attributes (object)\n\n\t  - url: /2020-08-03/asdf1234/filename.jpg (string) - Relative file path.\n\t  - mime: image/jpeg (string) MIME type of the uploaded file\n\n### Get a file [GET /{url}]\n\n\n  + Parameters\n\n    - url: /2020-08-03/asdf1234/filename.jpg (string) - The url which Hostex returned during upload request.\n\n  + Request\n    \n  + Response 200 (FILE_MIME)\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisinabh%2Fhostex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falisinabh%2Fhostex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisinabh%2Fhostex/lists"}