{"id":22656900,"url":"https://github.com/icelk/moella","last_synced_at":"2026-03-10T10:31:54.699Z","repository":{"id":55908553,"uuid":"333368476","full_name":"Icelk/moella","owner":"Icelk","description":"Reference implementation of the Kvarn web server library. Currently serving my two websites.","archived":false,"fork":false,"pushed_at":"2025-02-19T21:43:14.000Z","size":484,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T04:53:40.736Z","etag":null,"topics":["rust","web-server"],"latest_commit_sha":null,"homepage":"https://kvarn.org/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Icelk.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":"2021-01-27T09:29:36.000Z","updated_at":"2025-03-02T13:02:25.000Z","dependencies_parsed_at":"2024-10-26T04:36:16.390Z","dependency_job_id":null,"html_url":"https://github.com/Icelk/moella","commit_stats":null,"previous_names":["icelk/kvarn-reference"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icelk%2Fmoella","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icelk%2Fmoella/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icelk%2Fmoella/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icelk%2Fmoella/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Icelk","download_url":"https://codeload.github.com/Icelk/moella/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248519472,"owners_count":21117757,"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":["rust","web-server"],"created_at":"2024-12-09T10:16:50.730Z","updated_at":"2026-03-10T10:31:54.635Z","avatar_url":"https://github.com/Icelk.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Mölla](https://kvarn.org/moella/)\n\nThis is the reference implementation of the Kvarn server library,\noffering a [**simple config**](https://kvarn.org/moella/) to get you started using Kvarn.\n\n\u003e See `moella --help` for config options\n\nIt's e.g. currently used by my domains [icelk.dev](https://icelk.dev/) and [kvarn.org](https://kvarn.org/).\n\nSee [kvarn.org](https://kvarn.org/moella/) for an example config and the schema of the config.\nYou can also take a look at the [icelk.dev config](https://github.com/Icelk/icelk.dev/blob/main/icelk.dev.ron)\nfor a production example.\n\n## Usage\n\nFirst install `moella`.\n\nNext, create a config file, let's say `host.ron`:\n\n```ron\n(\n    hosts: [\n        Plain (\n            name: \"my-website.com\",\n            pk: \"pk.pem\",\n            cert: \"cert.pem\",\n            auto_cert: true,\n            path: \"./\",\n            extensions: [\"arbetrary-name\"],\n            options: (\n                public_data_directory: \"build\",\n                disable_server_cache: true,\n                disable_client_cache: false,\n            )\n        ),\n    ],\n    extensions: {\n        \"arbetrary-name\": [\n            // most of this can be removed; it's just an example\n            Csp ({\n                \"/*\": FromDefault ({\n                    script_src: [ UnsafeInline, WasmUnsafeEval ],\n                    style_src: [\n                        Uri(\"https://fonts.googleapis.com\"),\n                        Uri(\"https://fonts.googleapis.com\"),\n                        UnsafeInline,\n                    ],\n                    default_src: [ Uri(\"https://fonts.gstatic.com\") ],\n                    img_src: [ Uri(\"*\"), Scheme(\"data:\") ]\n                }),\n                // SVG XSS attacks if viewing file\n                \"/groups/logo-images/*\": FromDefault ({}),\n\n            }),\n            ClientCache ({\n                \"/\": MaxAge(3600),\n                \"/_app/immutable/\": Full,\n                \"/groups/logo-images/\": Changing,\n                \"/groups/data\": Changing,\n                \"/groups/locations\": Changing,\n            }),\n        ]\n    },\n    import: [\"./some-other.config-file.ron\"],\n    ports: Standard(All),\n)\n```\n\nNow, run `moella -c host.ron --dev`. Your website should be working. Remove the `--dev` flag when deploying.\n\n\u003e [Link to a systemd service template](https://github.com/Icelk/kvarn/blob/main/sample.service)\n\nSee [kvarn.org](https://kvarn.org/moella/) for more details.\n\n## Installation\n\nIf you have `cargo` installed, simply run `cargo install moella`.\n\nThere are builds available for Linux in [Github Actions](https://github.com/Icelk/moella/actions),\nand for other platforms under [Releases](https://github.com/Icelk/moella/releases).\n\nTo run it, download the binary appropriate for your platform.\n\n-   Platform specifics:\n    -   If you run Linux: run `chmod +x \u003cdownloaded binary\u003e` to make it executable.\n    -   If you run macOS: run `chmod +x \u003cdownloaded binary\u003e`, then open Finder and find\n        the binary. Right click and click `Open`. Accept the warning.\n    -   On Windows, it should just run\n-   Lastly, run the command `./\u003cdownloaded binary\u003e --help` in your shell to\n    get usage information.\n\n## Build from latest source\n\n[Install Rust](https://rust-lang.org/learn/get-started) and then run the following:\n\n**If you're on macOS or Windows, you need to add `--no-default-features -F bin`.\n\n```shell\n$ cargo install moella\n```\n\n# Documentation\n\n- [Kvarn website](https://kvarn.org/moella/)\n- [Library docs](https://doc.icelk.dev/moella/moella/)\n\n# Development\n\nDuring development, Mölla requires\n[Kvarn](https://github.com/Icelk/kvarn) to be cloned at `../kvarn`,\n[Kvarn Search](https://github.com/Icelk/kvarn-search) at `../kvarn-search`,\nand [Kvarn Auth](https://github.com/Icelk/kvarn-auth) at `../kvarn-auth`.\n\n# Changelog\n\n## [v0.2.0](https://github.com/Icelk/moella/compare/v0.1.1...v0.2.0)\n\nMany bugfixes to reverse proxy, including websockets finally working and body\nstreaming for large files (e.g. movies through Jellyfin). **Zstd** is also\nsupported now, and compression levels are generally more fitting.\n\n### Added\n\n-   Zstd compression\n-   Reverse proxy body streaming for large files\n-   You can now use e.g. `http://10.0.0.12:8096` as an option to the reverse proxy.\n    Previously \"tcp\" was the only option.\n-   Option to make systemd services work with a bug in io_uring (kvarnctl)\n    -   Sometimes a double-free happens after Kvarn has finished. This can be\n        ignored, and so a flag to ignore that was added to kvarnctl\n\n### Improved\n\n-   Faster HTTP/3\n-   Dynamic compress based on if the response is cached or not.\n-   Make io_uring even faster with less allocations\n-   Performance related to HTTP/1 requests and responses. Also useful for other\n    HTTP versions when reverse proxy is used (HTTP/1 is used for reverse proxy).\n-   Updated dependencies\n\n### Fixed\n\n-   **Caching issues for reverse proxy**\n-   **Reverse proxy websockets**.\n-   Reverse proxy for Jellyfin\n-   Auto cert made more robust\n-   Auto cert in development behaves better\n-   Auto cert private key having permission 644 instead of 600\n-   kvarn_signal (used by kvarnctl) fixed commands sometimes not being sent\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficelk%2Fmoella","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficelk%2Fmoella","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficelk%2Fmoella/lists"}