Note: AuthDrop is an evolution of the project PairDrop, with integrated group management, advanced device pairing, audit logging, and many other enhancements for professional and organizational use. This LDAP/Enterprise Edition adds full Active Directory integration, hierarchical group management, and enterprise-grade security features.
AuthDrop is a web application for peer-to-peer file transfer that works directly in your browser, with no installation required.
🔒 Security Notice: For new installations, please read SECURITY.md for important security guidelines and best practices.
- 🔄 Peer-to-peer file transfer via WebRTC
- 🌐 Fully browser-based (PWA)
- 🔒 Direct and secure device-to-device connection
- 📱 Multi-platform support (Windows, Mac, Linux, iOS, Android)
- 💾 No file size limits
- 🚀 Transfer speed limited only by your network
- 🌍 35+ languages supported
- 🎨 Automatic light/dark theme
- 📴 Works offline after first visit
- 🔐 Total privacy: files never pass through external servers
- 👥 User & Group Management with role-based access control
- 🔗 LDAP/Active Directory Integration for enterprise environments
- 📊 Audit Log for compliance and security tracking
- 🏢 Multi-database support: SQLite (easy setup) or PostgreSQL (production-ready)
Below are some screenshots of the AuthDrop dashboard:
- Frontend: HTML5, CSS3, JavaScript ES6
- Backend: Node.js with Express
- Communication: WebRTC and WebSockets
- PWA: Progressive Web App
- Node.js >= 18.0.0
- npm
- Database: Choose one:
- SQLite (default, no setup required) - Perfect for development and small deployments
- PostgreSQL (recommended for production) - Better performance and scalability
-
Clone the repository
git clone https://github.com/Gheben/AuthDropLdap.git cd AuthDropLdap -
Configure environment
-
Copy
.env.exampleto.envand edit with your settings:cp .env.example .env # Edit .env with your credentials -
IMPORTANT: Change the default passwords in
.env:
For SQLite (easiest setup):
SUPER_ADMIN_USERNAME=admin SUPER_ADMIN_PASSWORD=YourSecurePassword123! # Database Configuration DB_TYPE=sqlite # SQLite creates authdrop.db automatically - no other DB config needed!
For PostgreSQL (production):
SUPER_ADMIN_USERNAME=admin SUPER_ADMIN_PASSWORD=YourSecurePassword123! # Database Configuration DB_TYPE=postgres DB_HOST=localhost DB_PORT=5432 DB_USER=authdrop DB_PASSWORD=YourDBPassword123! DB_NAME=authdrop
Then create the PostgreSQL database:
# Connect to PostgreSQL as admin psql -U postgres # Create database and user CREATE DATABASE authdrop; CREATE USER authdrop WITH PASSWORD 'YourDBPassword123!'; GRANT ALL PRIVILEGES ON DATABASE authdrop TO authdrop; \q
-
-
Install dependencies
npm install
-
Start the server
npm start
The server will:
- Automatically create the database schema (SQLite or PostgreSQL)
- Create the super admin user from your
.envcredentials - Be available at
http://localhost:3441
-
First Login
- Navigate to
http://localhost:3441/admin.html - Login with your super admin credentials from
.env - Start managing users and groups!
- Navigate to
Note: Docker deployment uses PostgreSQL by default for better performance and production reliability. The database type is hardcoded in
docker-compose.ymland cannot be changed to SQLite.
- Docker & Docker Compose installed
-
Clone the repository
git clone https://github.com/Gheben/AuthDropLdap.git cd AuthDropLdap -
Configure environment
-
Copy
.env.exampleto.envand customize the settings:cp .env.example .env # Edit .env with your credentials -
IMPORTANT: Change the default passwords before starting:
SUPER_ADMIN_USERNAME=admin SUPER_ADMIN_PASSWORD=YourSecurePassword123! # PostgreSQL Database (used automatically by Docker) POSTGRES_USER=authdrop POSTGRES_PASSWORD=YourDBPassword123! POSTGRES_DB=authdrop
Note: In Docker,
DB_TYPEis automatically set topostgresindocker-compose.yml. The PostgreSQL container is always created regardless of your.envsettings.
-
-
Start with Docker Compose
docker compose up -d
This will start:
- authdrop-postgres: PostgreSQL 16 database container (internal network only)
- authdrop: Node.js application container (exposed on port 3441)
The app will be available at
http://localhost:3441 -
Database Persistence
- PostgreSQL data is stored in Docker volume
postgres-data - To completely reset the database:
docker compose down -v # Removes all data! docker compose up -d # Fresh start
- PostgreSQL data is stored in Docker volume
-
Environment Variables in Docker
Docker reads credentials from your
.envfile:Used by Docker:
SUPER_ADMIN_USERNAME/SUPER_ADMIN_PASSWORD- Admin credentialsPOSTGRES_DB/POSTGRES_USER/POSTGRES_PASSWORD- Database credentialsLDAP_*- All LDAP settings (if enabled)PORT- Application port (default: 3441)
Ignored by Docker (hardcoded in docker-compose.yml):
DB_TYPE- Alwayspostgresin DockerDB_HOST- Alwayspostgres(container name)DB_PORT- Always5432
Important:
DB_NAME,DB_USER,DB_PASSWORDshould matchPOSTGRES_*values for consistency.
# Development mode
npm run devdocker build -t authdrop .
docker run -d --restart=unless-stopped --name=authdrop -p 3441:3441 authdropnpm run start:prodAuthDrop/
├── public/ # Frontend files (HTML, CSS, JS, images)
├── server/ # Node.js backend
├── package.json # npm configuration
└── README.md # This file
- Open AuthDrop in the browser on all devices you want to connect
- Devices on the same local network will automatically discover each other
- Click on the target device and select the files to send
- The transfer happens directly between devices (P2P)
AuthDrop supports seamless integration with LDAP/Active Directory for enterprise environments. This allows you to:
- Automatically import users and groups from your AD
- Authenticate users against your existing AD credentials
- Maintain group hierarchies and permissions
- Automatically sync changes from AD
AuthDrop uses a hierarchical group model for security and organization:
AD Structure:
├── APP_AuthDrop (Parent Group - Main Access Control)
│ ├── IT_Department (Subgroup)
│ │ ├── User1
│ │ ├── User2
│ │ └── User3
│ ├── Sales_Department (Subgroup)
│ │ ├── User4
│ │ └── User5
│ └── HR_Department (Subgroup)
│ └── User6
Key Concepts:
-
Parent Group (e.g.,
APP_AuthDrop)- The main access control group
- Users should NOT be directly added here
- Only subgroups should be members
- Used in
LDAP_GROUP_SEARCH_FILTERto define the scope
-
Subgroups (e.g.,
IT_Department,Sales_Department)- Created as members of the parent group
- This is where you add actual users
- Each subgroup represents a department, team, or organizational unit
- Users in a subgroup can only see devices/rooms of their group members
-
User Isolation
- Users in
IT_Departmentonly see devices from other IT users - Users in
Sales_Departmentonly see devices from other Sales users - Complete separation between different departments/groups
- Users in
In your .env file:
# Enable LDAP
LDAP_ENABLED=true
# LDAP Server (use ldaps:// for secure connection)
LDAP_URL=ldaps://dc.yourcompany.local:636
# Accept self-signed certificates (for testing only!)
LDAP_TLS_REJECT_UNAUTHORIZED=false
# Service Account with read permissions
LDAP_BIND_DN=CN=ServiceAccount,OU=ServiceAccounts,DC=yourcompany,DC=local
LDAP_BIND_PASSWORD=YourServiceAccountPassword
# Base DN
LDAP_BASE_DN=DC=yourcompany,DC=local
# Group Search - IMPORTANT: This defines your parent group!
LDAP_GROUP_SEARCH_BASE=OU=Groups,DC=yourcompany,DC=local
LDAP_GROUP_SEARCH_FILTER=(|(CN=APP_AuthDrop)(memberOf=CN=APP_AuthDrop,OU=Groups,DC=yourcompany,DC=local))
# User Search (leave empty to import only users from subgroups)
LDAP_USER_SEARCH_BASE=
LDAP_USER_SEARCH_FILTER=(&(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))-
Create the Parent Group
New-ADGroup -Name "APP_AuthDrop" -GroupScope Global -GroupCategory Security -Path "OU=Groups,DC=yourcompany,DC=local"
-
Create Subgroups
# Create IT Department subgroup New-ADGroup -Name "AuthDrop_IT" -GroupScope Global -GroupCategory Security -Path "OU=Groups,DC=yourcompany,DC=local" # Add IT subgroup to parent group Add-ADGroupMember -Identity "APP_AuthDrop" -Members "AuthDrop_IT" # Create Sales subgroup New-ADGroup -Name "AuthDrop_Sales" -GroupScope Global -GroupCategory Security -Path "OU=Groups,DC=yourcompany,DC=local" # Add Sales subgroup to parent group Add-ADGroupMember -Identity "APP_AuthDrop" -Members "AuthDrop_Sales"
-
Add Users to Subgroups (NOT to parent!)
# Add users to IT subgroup Add-ADGroupMember -Identity "AuthDrop_IT" -Members "user1", "user2", "user3" # Add users to Sales subgroup Add-ADGroupMember -Identity "AuthDrop_Sales" -Members "user4", "user5"
-
Sync from AuthDrop Admin Panel
- Login to
http://localhost:3441/admin.html - Go to LDAP tab
- Click Test Connection to verify settings
- Click Preview to see what will be imported
- Click Sync to import users and groups
- Login to
- ✅ Automatic user import from AD subgroups
- ✅ Group hierarchy preservation (parent group excluded from sync)
- ✅ Read-only LDAP entities (users/groups from AD cannot be modified in AuthDrop)
- ✅ Orphan cleanup (automatically removes users/groups deleted from AD)
- ✅ Audit logging for all LDAP operations
- ✅ Visual indicators (🔗 icon) for LDAP-imported entities
- ✅ Dual authentication (LDAP users use AD credentials, local users use AuthDrop passwords)
- ✅ Auto-sync (optional automatic synchronization at scheduled intervals)
Enable automatic LDAP synchronization by adding these variables to your .env:
# Enable automatic sync from Active Directory
LDAP_AUTO_SYNC=true
# Sync interval in seconds (default: 3600 = 1 hour)
# Examples: 3600 (1h), 7200 (2h), 86400 (24h)
LDAP_SYNC_INTERVAL=3600When enabled:
- Initial sync runs 30 seconds after server start
- Subsequent syncs run automatically at the specified interval
- All sync operations are logged in the audit log
- Orphaned users/groups are automatically removed
After configuring LDAP, run these migrations to prepare the database:
# Add LDAP support to database
node migrate-ldap.js
# Add group admin permissions support
node migrate-group-admin.js
# Add LDAP cleanup statistics support
node migrate-ldap-cleanup.jsNote: Migrations are idempotent and safe to run multiple times.
You can permanently pair your devices by entering a shared room code, even if they are on different networks.
If you need to reset the database to a clean state with only the super admin user from .env:
For PostgreSQL:
node reset-postgres.jsFor Docker Compose:
docker compose down -v # Remove all volumes (deletes all data!)
docker compose up -d # Recreate with fresh databaseNote: These operations will DELETE ALL DATA including users, groups, logs, and sessions. The database will be recreated with only the super admin user defined in your .env file.
Is it secure?
Yes, files are transferred directly between your devices using WebRTC. They never pass through external servers.
Does it work without internet?
Yes, on the local network it works offline. Internet is only needed for the initial signaling server.
Which browsers are supported?
All modern browsers: Chrome, Edge, Firefox, Safari, Opera.
Can I use it with devices on different networks?
Yes, by using the pairing feature with a shared room code.
SQLite or PostgreSQL - which one should I use?
- SQLite: Perfect for development, testing, and small deployments (< 50 users). Zero configuration required - just set
DB_TYPE=sqlitein.envand you're done! Use this for local/manual installations. - PostgreSQL: Recommended for production environments with many users, better performance, concurrent access, and enterprise features. Automatically used in Docker deployments.
Does Docker always use PostgreSQL?
Yes. The docker-compose.yml file has PostgreSQL hardcoded for production reliability. The authdrop-postgres container is created automatically when you run docker compose up, regardless of .env settings. This ensures optimal performance and scalability for containerized deployments.
Can I use SQLite with Docker? No. Docker deployments are designed for production use with PostgreSQL. If you need SQLite, use the manual npm installation method instead.
Can I switch from SQLite to PostgreSQL later? Yes! Both databases use the exact same schema. To migrate:
- Export data from SQLite (if you have important data)
- Change
DB_TYPE=postgresin.envand configure PostgreSQL settings - Restart the server - it will automatically create the schema in PostgreSQL
- Import your data (or start fresh)
Does LDAP work with both SQLite and PostgreSQL? Yes! LDAP integration works identically with both database backends. Choose the database that fits your deployment needs.
What happens if I change something in Active Directory? When you run a sync from the LDAP tab:
- New users/groups in AD subgroups are automatically imported
- Updated information (email, display name) is synchronized
- Users/groups deleted from AD are automatically removed from AuthDrop
- Group memberships are updated to match AD
Guido Ballarini - git.ballarini.app
GPL-3.0


