Prerequisites
- A NetBird account (sign up at netbird.io)
- Admin access to your NetBird network
- Completed OAuth Setup
NetBird Account Setup
Create or Access NetBird Account
- Visit NetBird Dashboard
- Sign in with your account or create a new one
- Create a new network or select an existing network
If you’re new to NetBird, you’ll be prompted to create your first network during initial setup.
Find Your Network ID
Your Network ID is required for API operations. To find it:Method 1: From the URLWhen viewing your network in the NetBird dashboard, check the URL:Method 2: From Network Settings
- Navigate to your network in the dashboard
- Go to Settings > General
- Look for “Network ID” or “ID” field
Create API Token
NetBird Selfservice requires an API token with appropriate permissions:
- In the NetBird dashboard, navigate to Settings > Access Tokens
- Click Create Token or Add Token
- Configure the token:
- Name: “Selfservice Portal” or a descriptive name
- Permissions: Select appropriate scopes (minimum required below)
- Expiration: Set based on your security policy (30-90 days recommended)
- Click Create
- Copy the token immediately - it will only be shown once
Required Permissions
The API token needs these permissions:resources:read- List and view resourcesresources:write- Create, update, and delete resourcesgroups:read- List groups for resource assignment
Create Required Groups
NetBird Selfservice uses two types of groups:
1. User Group (Employees)
This group contains users who can access the VPN resources:- Navigate to Access Control > Groups
- Click Add Group
- Configure:
- Name: “Employees” (or your preferred name)
- Description: “Employee users with VPN access”
- Add your users to this group
2. Resource Group
This group will contain all managed resources:- In Groups, click Add Group again
- Configure:
- Name: “Resources for Employees” (or your preferred name)
- Description: “Network resources managed by Selfservice portal”
- This group will be auto-populated by the Selfservice application
The exact group names you use must match the configuration in your
.env file.Environment Configuration
Configure Admin Settings
Set the admin email and egress IP:
- NETBIRD_ADMIN_EMAIL: Email address of the admin who will approve resource requests
- NETBIRD_EGRESS_IP: Your VPN’s public egress IP (for display in the UI)
The admin email receives approval notifications and can manage all resources without approval.
Testing NetBird Connection
Test API Connection
You can test the NetBird API connection using Laravel Tinker:Then run:If successful, you should see a list of your NetBird groups including the ones you created.
Verify Group Configuration
Ensure your configured groups exist:You should see your resource group details. If
null, double-check the group name matches exactly.Group Configuration Best Practices
Resource Group Strategy
Resource Group Strategy
Single Resource Group (Recommended)Use one resource group for all managed resources:
- Simpler to manage
- Consistent access control
- Easier troubleshooting
- Separate by department or project
- Different access levels
- Requires custom code modifications
User Group Organization
User Group Organization
Department-Based Groups
- Create groups like “Engineering”, “Sales”, “Support”
- Assign resources to specific department groups
- “All Employees” - basic resources
- “Developers” - development environment resources
- “Admins” - sensitive infrastructure resources
- Combine both strategies for granular control
- Requires NetBird access policies configuration
Access Control Policies
Access Control Policies
In NetBird, create access control policies to connect user groups with resource groups:
- Navigate to Access Control > Policies
- Click Add Policy
- Configure:
- Name: “Employee VPN Access”
- Source Groups: Select your user group (“Employees”)
- Destination Groups: Select your resource group (“Resources for Employees”)
- Protocol: Allow all or restrict as needed
- Save the policy
Troubleshooting
”Invalid API token” error
- Verify the token is copied correctly without extra spaces
- Check if the token has expired
- Ensure the token has required permissions (
resources:read,resources:write,groups:read) - Generate a new token if needed
”Network not found” error
- Verify
NETBIRD_NETWORK_IDis correct - Check that your API token has access to this network
- Ensure the network ID doesn’t have extra spaces or characters
”Group not found” error
- Verify group names in
.envmatch exactly (case-sensitive) - Check that groups exist in your NetBird dashboard
- Run
php artisan config:clearafter changing group names
Resources not accessible by users
- Verify an access control policy exists connecting user and resource groups
- Check that users are members of the user group
- Ensure resources are assigned to the correct resource group
- Verify NetBird client is running and connected
Security Considerations
Next Steps
With NetBird configured, you’re ready to:- User Guide - Learn how to request and manage resources
- Admin Guide - Understand admin capabilities and workflows