{"id":36967717,"url":"https://github.com/alexthemaster/sharex-server","last_synced_at":"2026-01-13T20:40:49.726Z","repository":{"id":35090408,"uuid":"169874711","full_name":"alexthemaster/sharex-server","owner":"alexthemaster","description":"ShareX file hosting done with Node.js","archived":false,"fork":false,"pushed_at":"2025-12-18T23:20:56.000Z","size":204,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-21T05:50:50.723Z","etag":null,"topics":["nodejs","sharex","sharex-server","sharex-upload","sharexserver"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/alexthemaster.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-02-09T14:24:26.000Z","updated_at":"2025-12-18T23:21:00.000Z","dependencies_parsed_at":"2023-01-15T13:38:19.389Z","dependency_job_id":"c003724c-8e9c-4d97-b963-f711305aa35d","html_url":"https://github.com/alexthemaster/sharex-server","commit_stats":null,"previous_names":["alexthemaster/sharex-server"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/alexthemaster/sharex-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexthemaster%2Fsharex-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexthemaster%2Fsharex-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexthemaster%2Fsharex-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexthemaster%2Fsharex-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexthemaster","download_url":"https://codeload.github.com/alexthemaster/sharex-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexthemaster%2Fsharex-server/sbom","scorecard":{"id":217047,"data":{"date":"2025-08-11","repo":{"name":"github.com/authenticname/sharex-server","commit":"8a3d840396311d3c4e51e307fecc1e403ceaf728"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:16","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:17","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/authenticname/sharex-server/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/authenticname/sharex-server/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/authenticname/sharex-server/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/authenticname/sharex-server/codeql.yml/master?enable=pin","Warn: containerImage not pinned by hash: docker/Dockerfile:1: pin your Docker image by updating node:18-alpine to node:18-alpine@sha256:8d6421d663b4c28fd3ebc498332f249011d118945588d0a35cb9bc4b8ca09d9e","Warn: npmCommand not pinned by hash: docker/Dockerfile:7","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 22 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T01:50:22.765Z","repository_id":35090408,"created_at":"2025-08-17T01:50:22.765Z","updated_at":"2025-08-17T01:50:22.765Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28399932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"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":["nodejs","sharex","sharex-server","sharex-upload","sharexserver"],"created_at":"2026-01-13T20:40:48.955Z","updated_at":"2026-01-13T20:40:49.718Z","avatar_url":"https://github.com/alexthemaster.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShareX Server\n\nA tiny, self-hosted upload target for ShareX and similar clients. Runs on Node.js and stores uploads on disk.\n\n[![Continuous Integration](https://github.com/alexthemaster/sharex-server/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/alexthemaster/sharex-server/actions/workflows/continuous-integration.yml)\n![Docker Image Size](https://img.shields.io/docker/image-size/alexthemaster/sharex-server)\n![Docker Pulls](https://img.shields.io/docker/pulls/alexthemaster/sharex-server)\n![NPM Downloads](https://img.shields.io/npm/dw/sharex-server)\n\n## ⭐ Features\n\n-   File uploads (including text, image, GIF, MP4 etc)\n-   Simple files directory listing with configurable endpoint\n-   Downloadable .sxcu file endpoint (/api/sxcu)\n-   Setting Base URL\n-   Custom generated filename length\n\n## ▶️ Quickstart\n\n### 🐳 Docker is the recommended way to run ShareX Server! See [Docker Hub](https://hub.docker.com/r/alexthemaster/sharex-server) for setup instructions.\n\n#### 🔨 Manually in your Node app:\n\n-   `npm install sharex-server`\n-   ```ts\n    import { ShareXServer } from \"sharex-server\";\n    new ShareXServer({ password: \"s3cret\", port: 8080, savePath: \"./uploads\" });\n    ```\n\n#### ⚙️ Options\n\nAll options accepted by the `ShareXServer` constructor:\n\n-   `password` (string) - REQUIRED. The password clients must send as the `x-password` header to upload files.\n-   `port` (number, default `8080`) - TCP port the server listens on.\n-   `baseUrl` (string, default `/`) - Base URL the server will run on.\n-   `savePath` (string, default `./uploads`) - Filesystem directory where uploads are stored. The server ensures this directory exists. On Windows prefer an absolute path to avoid a leading `/` being prefixed when resolving.\n-   `filenameLength` (number, default `10`) - Length passed to `nanoid()` used to generate short random filenames.\n-   `enableSxcu` (boolean, default `false`) - When `true` the server exposes a simple endpoint to get a downloadable .sxcu at `GET /api/sxcu`.\n-   `fileListing` (string | false, default `files`) - Path to file listing of uploads. Set to `false` to disable the listing.\n-   `debug` (boolean, default `false`) - Enable verbose debug logging to the console.\n-   `forceHttps` (boolean | undefined) - Force HTTPS for return URL (useful when running behind reverse proxy)\n-   `trustProxy` (boolean, default `false`) - Sets Express trust proxy to true; Useful for getting your X-Forwarded-For IP from reverse proxy when running with debug enabled; Also enables forceHttps if not explicitly set to a boolean\n\n## 🗒️ Usage notes:\n\n-   The server saves uploaded files directly under `savePath` and will serve any file in that directory - do not point `savePath` at directories containing sensitive data.\n-   The upload flow is protected only by the `x-password` header - run behind HTTPS and/or restrict access with a firewall or reverse proxy for production deployments.\n-   The code sets `this.#fsPath = join(\"./\", this.savePath)`. If you encounter path problems on Windows, set `savePath` to an absolute Windows path (e.g. `C:\\data\\uploads`).\n-   Ensure the Node process has permission to create and write to `savePath`.\n\n## ⬆️ Uploading\n\n-   Endpoint: `POST /api/upload` (multipart form, field name `file`).\n-   Auth: include header `x-password: \u003cyour-password\u003e`.\n-   Success response: JSON containing a `url` pointing to the uploaded file.\n-   Error response: JSON containing an `error` property with status code 400 for missing file and 401 for missing/incorrect password.\n\nExample (PowerShell / pwsh):\n\n```pwsh\ncurl -X POST \"http://localhost:8080/api/upload\" -H \"x-password: s3cret\" -F \"file=@C:\\path\\to\\file.jpg\"\n```\n\nExample (Linux / macOS):\n\n```bash\ncurl -X POST \"http://localhost:8080/api/upload\" \\\n    -H \"x-password: s3cret\" \\\n    -F \"file=@/path/to/file.jpg\"\n```\n\n## 🌐 Additional HTTP Endpoints\n\n-   `GET /:filename`\n\n    -   Purpose: Download a previously uploaded file. The server streams the file from disk.\n    -   Response: 200 with file body and `Content-Type` derived via the `mime-types` lookup (falls back to `application/octet-stream`).\n    -   Response: 404 if file does not exist.\n\n-   `GET /files` (or the configured `fileListing` path)\n\n    -   Purpose: Optional file listing page with links and upload timestamps. Disabled when `fileListing` is `false`.\n    -   Response: Simple HTML list of links to the uploaded files and their upload dates`.\n\n-   `GET /api/sxcu`\n    -   Purpose: When `enableSxcu` is `true`, will return a .sxcu file to be used with ShareX.\n\n\u003e **Note:** All endpoints take the configured `baseUrl` into account.  \n\u003e This means that every URL will be prefixed with the `baseUrl` you have configured. (example: `GET /baseUrl/files`)\n\n---\n\n## Upload handling and filename strategy\n\n-   Filenames are generated as: `{nanoid(length)}.{ext}` where `ext` uses the uploaded file's original extension if it has one.\n-   A collision safeguard checks whether a file with the generated name already exists and regenerates until successful. The probability of collision is [extremely low](https://zelark.github.io/nano-id-cc/) with `nanoid`.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexthemaster%2Fsharex-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexthemaster%2Fsharex-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexthemaster%2Fsharex-server/lists"}