{"id":37168243,"url":"https://github.com/dmarcwise/caddy-storage-postgresql","last_synced_at":"2026-01-14T19:53:17.465Z","repository":{"id":312875691,"uuid":"1048571904","full_name":"dmarcwise/caddy-storage-postgresql","owner":"dmarcwise","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-30T20:03:57.000Z","size":98,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-30T22:07:30.518Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/dmarcwise.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":"2025-09-01T16:54:23.000Z","updated_at":"2025-10-30T20:04:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"5bd9bd01-b221-4e17-b0c9-480850102b67","html_url":"https://github.com/dmarcwise/caddy-storage-postgresql","commit_stats":null,"previous_names":["dmarcwise/caddy-storage-postgresql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dmarcwise/caddy-storage-postgresql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarcwise%2Fcaddy-storage-postgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarcwise%2Fcaddy-storage-postgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarcwise%2Fcaddy-storage-postgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarcwise%2Fcaddy-storage-postgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmarcwise","download_url":"https://codeload.github.com/dmarcwise/caddy-storage-postgresql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarcwise%2Fcaddy-storage-postgresql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28433441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-01-14T19:53:16.885Z","updated_at":"2026-01-14T19:53:17.451Z","avatar_url":"https://github.com/dmarcwise.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Caddy Storage PostgreSQL\n\n\u003e [!WARNING]\n\u003e This project is still a work in progress, although used by [DMARCwise](https://dmarcwise.io) in production.\n\nA storage implementation for [Caddy](https://caddyserver.com/) / [certmagic](https://github.com/caddyserver/certmagic) that uses PostgreSQL as the backend.\n\n- ✅ Supports all Caddy storage operations\n- ✅ Directories semantics fully implemented (e.g. listing objects in a directory)\n- ✅ Supports [storage export](https://caddyserver.com/docs/command-line#caddy-storage) (recursive listing of all\n  files)\n- ✅ Works in distributed Caddy setups thanks to distributed locking with fencing tokens ([pglock](https://github.com/cirello-io/pglock))\n- ✅ Fully tested ([integration tests](https://github.com/dmarcwise/caddy-storage-postgresql/blob/main/storage_test.go) + [smoke tests and real export test](https://github.com/dmarcwise/caddy-storage-postgresql/blob/main/.github/workflows/test.yml))\n- ✅ Works with distributed rate limiting ([mholt/caddy-ratelimit](https://github.com/mholt/caddy-ratelimit))\n\n## How to use\n\nBuild the module into your Caddy binary:\n\n```shell\nxcaddy build --with github.com/dmarcwise/caddy-storage-postgresql\n```\n\nYou can pin a specific commit with:\n\n```shell\nxcaddy build --with github.com/dmarcwise/caddy-storage-postgresql@\u003ccommit-hash\u003e\n```\n\nConfigure Caddy to use the PostgreSQL storage module. Example `Caddyfile`:\n\n```caddy\n{\n    storage postgresql {\n        dsn \"postgres://user:password@localhost:5432/caddy?sslmode=disable\"\n    }\n}\n```\n\nThe `dsn` parameter is a [PostgreSQL connection string](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING), either as a key/value string or as a connection URI.\n\nThe `sslmode` connection parameter defaults to `require`. We recommend setting a `statement_timeout` (e.g. `30s`) and other [basic parameters](https://brandur.org/fragments/postgres-parameters).\n\nThis module implementation already sets the following connection pooling parameters:\n\n- Maximum open connections: `10`\n- Maximum idle connections: `3`\n- Connection maximum idle time: `1h`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmarcwise%2Fcaddy-storage-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmarcwise%2Fcaddy-storage-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmarcwise%2Fcaddy-storage-postgresql/lists"}