Authentication Providers
Homarr supports multiple authentication methods to integrate with your existing infrastructure:Credentials
Local username and password authentication with secure password hashing.
LDAP
Integrate with LDAP/Active Directory for centralized user management.
OIDC
OpenID Connect for single sign-on with providers like Keycloak, Authelia, and Auth0.
Guest Access
Optional anonymous access for public boards (configurable).
Provider Configuration
Homarr uses NextAuth.js with custom providers:Credentials Provider
Local authentication with username and password:Features
- Secure password hashing with bcrypt
- Password strength requirements
- Account lockout after failed attempts
- Password reset functionality
- Remember me option
Configuration
Credentials provider is enabled by default. Configure in environment variables:Session Management
LDAP Authentication
Connect to LDAP or Active Directory servers:Setup
- Configure LDAP connection in environment:
- Enable LDAP in Homarr settings
- Test connection with a known user
- Map LDAP groups to Homarr groups (optional)
LDAP Implementation
LDAP Group Sync
Automatically sync LDAP groups to Homarr:- Map LDAP groups to Homarr groups
- Inherit board permissions from groups
- Sync on each login
- Manual sync available in admin panel
LDAP users are created in Homarr on first login. Subsequent logins update user information and group membership.
OIDC Provider
Single sign-on with OpenID Connect:Supported Providers
- Keycloak: Open-source identity and access management
- Authelia: Authentication and authorization server
- Auth0: Cloud-based identity platform
- Authentik: Open-source identity provider
- Okta: Enterprise identity management
- Azure AD: Microsoft identity platform
- Google: Google OAuth 2.0
- Any OIDC-compliant provider
Configuration
Configure OIDC in environment variables:OIDC Implementation
User Management
Creating Users
- Admin Panel
- First User
- LDAP/OIDC
Create users through the web interface:
- Navigate to Settings → Users
- Click Add User
- Enter user details:
- Username
- Password (for credentials provider)
- Groups (optional)
- Click Create
User Properties
- Username: Unique identifier for login
- Email: For notifications and password reset
- Display Name: Shown in UI
- Avatar: Profile picture URL
- Groups: Group membership for permissions
- Permissions: Direct user permissions
- Status: Active/Inactive
Groups and Permissions
Group Management
Organize users into groups for easier permission management:- Navigate to Settings → Groups
- Click Add Group
- Enter group name and description
- Add users to the group
- Configure group permissions
Permission Levels
Homarr uses a hierarchical permission system:User Permissions
User Permissions
Direct permissions assigned to individual users. Override group permissions when higher.Common user permissions:
admin: Full system accessboard-create: Create new boardsboard-view-all: View all boardsboard-modify-all: Edit all boardsboard-full-all: Full access to all boardsintegration-create: Create integrationsintegration-use-all: Use all integrations in widgetsintegration-full-all: Manage all integrations
Group Permissions
Group Permissions
Permissions inherited by all group members. Useful for team-based access control.Example groups:
- Admins: Full system access
- Editors: Can create and modify boards
- Viewers: Read-only access to public boards
- Media Team: Access to media-related boards and integrations
- Infrastructure Team: Access to monitoring boards
Board Permissions
Board Permissions
Specific to individual boards. See Board Permissions for details.Permission types:
- View: Read-only access
- Modify: Edit layout and widgets
- Full: Complete control including permissions
Integration Permissions
Integration Permissions
Control which users can use specific integrations in widgets.Permission model:
- Creator has full access
- Users can be granted view or full access
- Groups can inherit integration permissions
- Widgets respect integration permissions when displaying data
Permission Implementation
Session Management
Session Configuration
Sessions are stored in the database with configurable expiry:Session Security
- HTTP-only cookies: Prevents XSS attacks
- SameSite=Lax: CSRF protection
- Secure flag: HTTPS only (in production)
- Token rotation: New token on sign-in
- Automatic cleanup: Expired sessions removed
Session Endpoints
/api/auth/signin: Sign in page/api/auth/signout: Sign out endpoint/api/auth/session: Get current session/api/auth/callback/*: OAuth callbacks
API Key Authentication
For programmatic access to Homarr:Creating API Keys
- Navigate to Settings → API Keys
- Click Create API Key
- Enter description and expiry date
- Select permissions
- Copy the generated key (shown only once)
Using API Keys
Include in requests as bearer token:API Key Sessions
Security Best Practices
Password Security
- Enforce strong password requirements
- Enable account lockout after failed attempts
- Use password managers for users
- Rotate passwords regularly
- Never share credentials
Session Security
- Use HTTPS in production
- Enable secure cookies
- Set appropriate session expiry
- Sign out on shared devices
- Monitor active sessions
Permission Management
- Follow principle of least privilege
- Use groups for team permissions
- Review permissions regularly
- Audit permission changes
- Remove inactive users
Integration Security
- Use separate service accounts
- Limit integration permissions
- Rotate integration secrets
- Monitor integration usage
- Remove unused integrations
Authentication Flow
Login Process
Authorization Flow
- Request: User accesses protected resource
- Session Check: Verify valid session exists
- Permission Check: Verify required permissions
- Resource Access: Grant or deny based on permissions
- Audit Log: Record access attempt
Event Logging
Authentication events are logged for audit purposes:- Sign in/out
- Failed login attempts
- Password changes
- Permission changes
- API key usage
- Session creation/expiry
Troubleshooting
Cannot sign in
Cannot sign in
Check:
- Credentials are correct
- Account is not locked
- Provider is properly configured
- Session cookies are enabled
- HTTPS is used if secure cookies enabled
- Reset password if forgotten
- Check server logs for errors
- Verify provider configuration
- Clear browser cookies and retry
LDAP connection failed
LDAP connection failed
Check:
- LDAP URI is correct
- Bind credentials are valid
- Network connectivity to LDAP server
- Firewall rules allow connection
- Search base and filter are correct
- Test LDAP connection with ldapsearch
- Verify bind DN has search permissions
- Check LDAP server logs
- Ensure TLS/SSL certificates are valid
OIDC redirect failed
OIDC redirect failed
Check:
- Client ID and secret are correct
- Redirect URI is registered with provider
- Issuer URL is accessible
- Scopes are supported by provider
- System time is synchronized
- Verify provider configuration
- Check provider logs
- Test token endpoint manually
- Ensure HTTPS is used
Permission denied
Permission denied
Check:
- User has required permission
- Group permissions are configured
- Board/integration permissions are set
- User is member of correct groups
- Session is valid and not expired
- Review permission settings
- Check group membership
- Verify resource permissions
- Sign out and back in to refresh permissions
Next Steps
Board Permissions
Learn about board-specific permissions
Integration Setup
Configure integrations with proper permissions
User Management
Manage users, groups, and permissions
Configuration
Configure authentication providers
