{"id":25002155,"url":"https://github.com/ktwrd/kasta","last_synced_at":"2025-04-12T11:18:28.882Z","repository":{"id":273804651,"uuid":"893389420","full_name":"ktwrd/Kasta","owner":"ktwrd","description":"Open-Source File Uploader, Link Shortener, and Text Sharing Platform.","archived":false,"fork":false,"pushed_at":"2025-03-06T07:44:48.000Z","size":4913,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T11:18:22.792Z","etag":null,"topics":["asp-net","csharp","file-sharing","file-upload","htmx","link-shortener","rustgrab","s3","sharex"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ktwrd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2024-11-24T10:15:30.000Z","updated_at":"2025-03-06T07:44:51.000Z","dependencies_parsed_at":"2025-03-04T03:34:54.958Z","dependency_job_id":null,"html_url":"https://github.com/ktwrd/Kasta","commit_stats":null,"previous_names":["ktwrd/kasta"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktwrd%2FKasta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktwrd%2FKasta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktwrd%2FKasta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktwrd%2FKasta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ktwrd","download_url":"https://codeload.github.com/ktwrd/Kasta/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248557847,"owners_count":21124168,"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":["asp-net","csharp","file-sharing","file-upload","htmx","link-shortener","rustgrab","s3","sharex"],"created_at":"2025-02-04T21:37:11.629Z","updated_at":"2025-04-12T11:18:28.850Z","avatar_url":"https://github.com/ktwrd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kasta\n![GitHub Release](https://img.shields.io/github/v/release/ktwrd/kasta)\n![GitHub branch check runs](https://img.shields.io/github/check-runs/ktwrd/kasta/main) \n![GitHub License](https://img.shields.io/github/license/ktwrd/kasta)\n\nA Simple self-hostable File Sharing Service written in C#. Supports displaying media (image, video, audio), [ShareX](https://github.com/ShareX/ShareX) config generation, [rustgrab](https://github.com/ktwrd/rustgrab) support, and stores files with pretty much any S3-compatible service.\n\n![Screenshot of the Kasta web application, displaying a list of uploaded images with their; filename, date created, file size, sharing status, and file size.](https://kate.pet/img/blog/firefox_1506_K10H17LkIG.png)\n\n## Features\n- User Management\n- User Registration\n- 2FA\n- Config Generator for [ShareX](https://github.com/ShareX/ShareX) and [rustgrab](https://github.com/ktwrd/rustgrab)\n- Compatible with AWS S3 and S3-Compatible Services (like Cloudflare R2, MinIO, and Wasabi[^1])\n- Web File Upload\n- Audit Logging\n- Per-user storage quota \u0026 file size limits\n- Public \u0026 Private uploads\n- Image Preview Generation (including image info like file type, compression, interlacing, and dimensions)\n- Text File Preview\n- Link Shortener\n\n## Installing\nIt is recommended to use Docker to make updating very easy. The following docker compose file is the recommended setup, along with copying `config.example.xml` to `config.xml` and change the settings in there so it fits your needs.\n```yml\nservices:\n  db:\n    image: postgres:17-alpine\n    environment:\n      POSTGRES_PASSWORD: changeme123\n      POSTGRES_USER: kasta\n      POSTGRES_DB: kasta\n    logging:\n      driver: \"none\"\n    restart: unless-stopped\n    volumes:\n      - local_pgdata:/var/lib/postgresql/data\n  web:\n    image: ghcr.io/ktwrd/kasta:latest\n    environment:\n      # optional setting\n      SentryDsn: https://xxxx@sentry.example.com/1\n    ports:\n      - \"127.0.0.1:8080:8080\" # will only forward ports to localhost for security reasons.\n    volumes:\n\t  # Configuration file defaults to /config/kasta.xml\n      - ./kasta-config/:/config\n    depends_on:\n      - db\nvolumes:\n  local_pgdata:\n```\n\n### Important Note\n\nThe first user that is created will be given the \"Administrator\" role, so make sure that your deployment is **only accessible locally at first**. By default, anyone can register for an account, so secure your deployment in the \"System\" tab when you first log in.\n\n## Database Migrations for Development\nWhen trying to do database migrations for development, make sure that the `CONFIG_LOCATION` environment variable is set to where your `config.xml` file is located so the Database Context can successfully create a connection string.\n\n## 520 with Cloudflare\nThis occurs because the response header is \u003e8kb. This can be fixed by disabling HTTP/2 support (`/speed/optimization/protocol`), and setting the following value in your NGINX config;\n```\nserver {\n  ...\n  large_client_header_buffers 4 32k;\n  ...\n}\n```\n\n## NGINX Configuration\nThe following is the recommended NGINX site configuration for `proxy_pass` (only subdomain proxy is officially supported)\n\n```nginx\nserver {\n    listen 443 ssl;\n    # Make sure that your SSL parameters are set here!!\n    server_name kasta.example.com;\n\n    access_log  /var/log/nginx/access.log;\n    client_max_body_size 500M;\n\n    # Fix for 520 Cloudflare errorr (see section above)\n    large_client_header_buffers 4 32k;\n\n    location / {\n        # Make sure that the port is correct!\n        proxy_pass http://127.0.0.1:5280/;\n        proxy_buffer_size 32k;\n        proxy_buffers 8 32k;\n        proxy_busy_buffers_size 64k;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n    }\n}\nserver {\n    server_name kasta.example.com;\n    listen 80;\n    return 301 https://$http_host$request_uri;\n}\n```\n\n## Footnotes\n[^1]: Kasta has only been tested with AWS S3 and MinIO (LAN Deployment). When using an S3 Compatible Service (that isn't AWS S3), then make sure that the `ForcePathStyle` element in your S3 configuration is set to `true` (which is nested in the `S3` element in `config.example.xml`).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktwrd%2Fkasta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fktwrd%2Fkasta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktwrd%2Fkasta/lists"}