System Requirements
Before you begin, verify your system meets these requirements:| Requirement | Version | Notes |
|---|---|---|
| PHP | 8.2+ | 8.3.7+ recommended |
| Composer | Latest | For dependency management |
| Node.js | 16+ | For building frontend assets |
| npm | 8+ | Comes with Node.js |
| Database | MySQL 8.0+ / MariaDB 10.3+ / SQLite 3 | SQLite works for development |
| NetBird API | Active account | With API token and network access |
| OAuth Provider | Google Cloud project | Or any Laravel Socialite supported provider |
The composer.json specifies PHP ^8.2, but the platform configuration targets PHP 8.3.7 for optimal compatibility.
Installation Steps
Clone the Repository
Clone the NetBird Selfservice repository to your server:Or clone from your own fork if you’ve forked the repository.
Install PHP Dependencies
Use Composer to install all required PHP packages:This installs:
- Laravel Framework (^12.0)
- Laravel Socialite (^5.24) for OAuth
- Livewire Flux (^2.10) and Volt (^1.7.0)
- Laravel Tinker (^2.10.1)
Install Frontend Dependencies
Install Node.js packages for building frontend assets:This installs Vite, Tailwind CSS 4.x, and other frontend build tools.
Configure Environment
Copy the example environment file and customize it:Edit the
.env file with your configuration. See the Configuration page for detailed information about each variable.Generate Application Key
Generate a unique application encryption key:This command automatically updates the
APP_KEY in your .env file. This key is used for encrypting session data and other sensitive information.Set Up Database
Choose your database configuration:
SQLite is suitable for development and small deployments. For production with multiple concurrent users, use MySQL or MariaDB.
Run Database Migrations
Create all necessary database tables:This creates tables for:
- User authentication
- Resource management
- Activity logs
- Sessions and cache
- Queue jobs
Build Frontend Assets
Compile the frontend assets for production:For development with hot module replacement:
Start the Application
Launch the development server:Or use the comprehensive development environment:This starts:
- PHP development server (port 8000)
- Queue worker for background jobs
- Log viewer (Laravel Pail)
- Vite development server with HMR
The application will be available at
http://localhost:8000 by default.Quick Setup Script
Alternatively, use the automated setup script defined in composer.json:composer install- Installs PHP dependencies- Copies
.env.exampleto.env(if .env doesn’t exist) php artisan key:generate- Generates application keyphp artisan migrate --force- Runs database migrationsnpm install- Installs Node.js dependenciesnpm run build- Builds frontend assets
Verifying Installation
After installation, verify everything is working:- Check Application Access: Visit
http://localhost:8000(or your configured APP_URL) - Test OAuth Login: Click the login button and verify OAuth redirect works
- Check Database Connection: Ensure no database errors appear in logs
- Verify Asset Loading: Confirm CSS and JavaScript load correctly
Troubleshooting
Permission Denied Errors
Permission Denied Errors
If you encounter permission errors, ensure the web server has write access to:Replace
www-data with your web server user.Composer Memory Limit Errors
Composer Memory Limit Errors
If Composer runs out of memory during installation:
Database Connection Errors
Database Connection Errors
Verify your database credentials in
.env:- For SQLite: Ensure
database/database.sqliteexists and is writable - For MySQL: Test connection with
mysql -h DB_HOST -u DB_USERNAME -p - Check that the database exists:
SHOW DATABASES;
Asset Build Failures
Asset Build Failures
If
npm run build fails:PHP Version Issues
PHP Version Issues
Verify your PHP version meets requirements:If using multiple PHP versions, specify the correct one:
Port Already in Use
Port Already in Use
If port 8000 is already in use, specify a different port:
Next Steps
Now that NetBird Selfservice is installed, proceed to:Configuration
Configure environment variables, OAuth providers, and NetBird API integration
OAuth Setup Guide
Set up Google OAuth credentials for user authentication
Production Deployment
For production deployments, consider:- Using a proper web server (Nginx or Apache) instead of
php artisan serve - Configuring HTTPS with SSL certificates
- Setting
APP_ENV=productionandAPP_DEBUG=false - Using a queue worker service (systemd or supervisor)
- Implementing proper backup strategies for your database
- Setting up monitoring and logging solutions
- Configuring a process manager for the queue worker