{"id":22650923,"url":"https://github.com/mohammed90/caddy-pocketbase","last_synced_at":"2025-07-05T08:33:09.148Z","repository":{"id":265925532,"uuid":"894450226","full_name":"mohammed90/caddy-pocketbase","owner":"mohammed90","description":"PocketBase embedded in Caddy","archived":false,"fork":false,"pushed_at":"2025-03-21T18:44:15.000Z","size":61,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-28T17:03:12.977Z","etag":null,"topics":["baas","caddy","caddy-plugin","caddyserver","pocketbase"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mohammed90.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}},"created_at":"2024-11-26T11:29:22.000Z","updated_at":"2025-06-10T09:07:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4db59f4-1fb1-4c20-84de-cda5c3e7f721","html_url":"https://github.com/mohammed90/caddy-pocketbase","commit_stats":null,"previous_names":["mohammed90/caddy-pocketbase"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mohammed90/caddy-pocketbase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy-pocketbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy-pocketbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy-pocketbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy-pocketbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohammed90","download_url":"https://codeload.github.com/mohammed90/caddy-pocketbase/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy-pocketbase/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263710409,"owners_count":23499694,"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":["baas","caddy","caddy-plugin","caddyserver","pocketbase"],"created_at":"2024-12-09T08:48:55.538Z","updated_at":"2025-07-05T08:33:09.143Z","avatar_url":"https://github.com/mohammed90.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Caddy PocketBase Module\n\nA Caddy module that integrates [PocketBase](https://pocketbase.io/)([Repository](https://github.com/pocketbase/pocketbase)) as a Caddy application, allowing you to run PocketBase embedded in your Caddy server.\n\n## Features\n\n- Run PocketBase as a native Caddy module\n- Admin API endpoints for managing superusers\n- Configurable data directory and origins\n- Automatic port allocation if none specified\n- Full integration with Caddy's configuration and lifecycle\n\n## Configuration\n\nExample Caddyfile configuration:\n\n```caddyfile\n{\n    order pocketbase before file_server\n}\nexample.com {\n    pocketbase\n}\n```\n\nThe embedded pocketbase app can be customized (with limitations) as follows:\n\n```caddyfile\n{\n\tpocketbase {\n\t\t# optional: port pocketbase will listen to; defaults to randomly allocated port.\n\t\tlisten 8080\n\t\t\n\t\t# optional: default data directory; defaults to ./pb_data.\n\t\tdata_dir /var/pb\n\n\t\t# optional: all origins allowed when empty; defaults to all origins.\n\t\torigins example.com example.net localhost\n\t}\n\torder pocketbase before file_server\n}\n\nexample.com {\n\tpocketbase\n}\n\n```\n\n## Key Components\n\n- **PocketBase Integration**: Runs PocketBase within Caddy.\n- **Admin API**: Provides endpoints for superuser management.\n- **Configuration**: Allows customization of data directory and origins.\n\n\n## Usage\n\nThis module enables you to run PocketBase as part of your Caddy server, simplifying deployment and management of both services. The configuration options allow for easy customization to fit various deployment scenarios.\n\n## Admin API Endpoints\nThe module provides admin API endpoints under `/pocketbase/`:\n\n- `POST /pocketbase/superuser` - Create a new superuser\n- `PUT /pocketbase/superuser` - Upsert a superuser\n- `PATCH /pocketbase/superuser` - Update superuser password\n- `DELETE /pocketbase/superuser` - Delete a superuser\n- `POST /pocketbase/superuser/{email}/otp` - Generate OTP for superuser\n\nAll the above endpoints require a JSON payload, except for the OTP endpoint. The\nJSON payload for the superuser endpoints is as follows:\n\n```json\n{\n\t\t\"email_address\": \"...\",\n\t\t\"password\": \"...\"\n}\n```\n\nThe `DELETE` endpoint does not expect the `password` field.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammed90%2Fcaddy-pocketbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammed90%2Fcaddy-pocketbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammed90%2Fcaddy-pocketbase/lists"}