{"id":23197286,"url":"https://github.com/crystalnet-org/pure-ftpd-paperless-dbauth","last_synced_at":"2026-05-08T17:43:33.569Z","repository":{"id":212926760,"uuid":"732629072","full_name":"CrystalNET-org/pure-ftpd-paperless-dbauth","owner":"CrystalNET-org","description":"a small go programm to plug into pureftpd's authd programm that verifies users against a paperless-ngx mariadb or postgresql database","archived":false,"fork":false,"pushed_at":"2024-01-20T10:24:31.000Z","size":14901,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-20T11:28:03.598Z","etag":null,"topics":["authentication","mariadb","paperless","paperless-ng","paperless-ngx","postgresql","pure-ftpd","pureftpd"],"latest_commit_sha":null,"homepage":"","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/CrystalNET-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2023-12-17T10:24:44.000Z","updated_at":"2024-04-15T12:31:47.280Z","dependencies_parsed_at":"2024-04-15T12:31:38.358Z","dependency_job_id":"c8532ddb-d43b-418e-aed3-2890e4eef8ae","html_url":"https://github.com/CrystalNET-org/pure-ftpd-paperless-dbauth","commit_stats":null,"previous_names":["psych0d0g/pure-ftpd-paperless-dbauth","crystalnet-org/pure-ftpd-paperless-dbauth"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/CrystalNET-org/pure-ftpd-paperless-dbauth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrystalNET-org%2Fpure-ftpd-paperless-dbauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrystalNET-org%2Fpure-ftpd-paperless-dbauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrystalNET-org%2Fpure-ftpd-paperless-dbauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrystalNET-org%2Fpure-ftpd-paperless-dbauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrystalNET-org","download_url":"https://codeload.github.com/CrystalNET-org/pure-ftpd-paperless-dbauth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrystalNET-org%2Fpure-ftpd-paperless-dbauth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32791393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"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":["authentication","mariadb","paperless","paperless-ng","paperless-ngx","postgresql","pure-ftpd","pureftpd"],"created_at":"2024-12-18T14:29:51.648Z","updated_at":"2026-05-08T17:43:33.533Z","avatar_url":"https://github.com/CrystalNET-org.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pure-FTPd Authd Database Authenticator\n[![status-badge](https://ci.cluster.lan.crystalnet.org/api/badges/5/status.svg)](https://ci.cluster.lan.crystalnet.org/repos/5)\n![GitHub release (with filter)](https://img.shields.io/github/v/release/psych0d0g/pure-ftpd-paperless-dbauth)\n\nThis small Go program is designed to be plugged into Pure-FTPd's authd program, providing authentication against a Paperless-NGX MariaDB or PostgreSQL database.\n\n## Prerequisites\n\n- Go installed on your machine\n- Pure-FTPd with authd support\n- MariaDB or PostgreSQL database configured for Paperless-NGX\n\n## Features\n\n- Authenticate users against a Paperless-NGX database\n- Support for both MariaDB and PostgreSQL databases\n- Automatic dependency resolution using Go Modules\n\n## Getting Started\n\n### Installation\n\n1. Clone the repository:\n\n    ```bash\n    git clone https://github.com/psych0d0g/pure-ftpd-paperless-dbauth.git\n    ```\n\n2. Change into the project directory:\n\n    ```bash\n    cd pure-ftpd-paperless-dbauth\n    ```\n\n3. Run the build script to compile the binary:\n\n    ```bash\n    ./build.sh\n    ```\n\n### Configuration\n\n1. Set up environment variables:\n\n    ```bash\n    export PAPERLESS_DBHOST=\"your_database_host\"\n    export PAPERLESS_DBPORT=\"your_database_port\"\n    export PAPERLESS_DBNAME=\"your_database_name\"\n    export DB_USER=\"your_database_user\"\n    export PAPERLESS_DBPASS=\"your_database_password\"\n    export PAPERLESS_DBENGINE=\"postgres\"  # or \"mysql\" for MariaDB\n    export PAPERLESS_CONSUMPTION_DIR=\"your_paperless_consumption_dir\"\n    ```\n\n2. Set up authd configuration to use the compiled binary.\n\n### Test\n\nRun the compiled binary to authenticate users against the Paperless-NGX database.\n\n```bash\nAUTHD_ACCOUNT=username AUTHD_PASSWORD=password ./verify_pw\n```\n\n### authd configuration\n\nplease refer to pure-ftpd documentation on how to integrate it with authd: https://github.com/jedisct1/pure-ftpd/blob/master/README.Authentication-Modules\n\n### Database Schema\n\nEnsure your Paperless-NGX database has a table similar to the following:\n\n```sql\nCREATE TABLE auth_user (\n    id SERIAL PRIMARY KEY,\n    username VARCHAR(255) NOT NULL,\n    password VARCHAR(255) NOT NULL,\n    last_login TIMESTAMP,\n    is_superuser BOOLEAN NOT NULL,\n    first_name VARCHAR(30),\n    last_name VARCHAR(30),\n    email VARCHAR(255),\n    is_staff BOOLEAN NOT NULL,\n    is_active BOOLEAN NOT NULL,\n    date_joined TIMESTAMP NOT NULL\n);\n```\n\n### Built With\n\n    - Go - The Go Programming Language\n    - github.com/go-sql-driver/mysql - MySQL driver for Go\n    - github.com/lib/pq - PostgreSQL driver for Go\n\n### Contributing\n\ni am open to any improvement suggestions via issues or pull reqests\n\n### License\n\nThis project is licensed under the MIT License - see the LICENSE.md file for details.\n\n### Acknowledgments\n\n    -  ChatGPT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrystalnet-org%2Fpure-ftpd-paperless-dbauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrystalnet-org%2Fpure-ftpd-paperless-dbauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrystalnet-org%2Fpure-ftpd-paperless-dbauth/lists"}