Run Your Own Ubiquiti UniFi Controller: Docker Guide for Ubuntu
Are you tired of cloud dependencies and looking for a reliable way to control your Ubiquiti network? This guide shows you how to set up a UniFi Controller using Docker on Ubuntu, giving you more control, security, and even better performance.
Why Dockerize Your UniFi Controller?
Using Docker offers key advantages:
- Isolation: Keep your UniFi Controller separate from your main OS.
- Simplicity: Easy setup and updates with Docker commands.
- Portability: Move your controller between Ubuntu servers with ease.
- Control: Retain total control over your network and data.
Key Features of This Docker UniFi Ubuntu Setup
This setup from 11notes offers several benefits:
- Ubuntu Based: Built on a stable Ubuntu base.
- Embedded Database: Includes MongoDB, simplifying deployment and management.
- Automatic Telemetry Control: Disables Ubiquiti anonymous telemetry by default.
- Easy Configuration: Simple environment variables for customization.
Pre-requisites
Before you begin, ensure you have the following:
- An Ubuntu server (20.04 or later recommended).
- Docker installed and running.
- Basic knowledge of Docker commands.
Setting Up Your UniFi Controller with Docker: Step-by-Step
Here's how to get your UniFi controller up and running.
Pull the Docker Image
Download the latest UniFi Controller Docker image from 11notes using this command:
Create a Volume for Persistent Data
This is where your UniFi configuration and site data will be stored:
Run the UniFi Controller Container
Execute the following Docker command to start the UniFi controller:
Remember to replace /your/path/to/unifi/var
with a valid path on your system.
Configure Environment Variables (Optional)
Customize your setup using environment variables:
-e TZ=Your/Timezone
: Set your timezone.-e DEBUG=true
: Enable debug information.
Example:
Accessing Your UniFi Controller
Once the container is running, access the UniFi controller web interface through your browser at https://your_server_ip:8443
.
Optimizing Your UniFi Controller Setup
Consider these tips for a smoother experience:
- Utilize rootless Docker for enhanced security.
- Use a reverse proxy like Nginx or Traefik with Let's Encrypt for SSL termination.
- Allow non-root ports if needed using
sysctl
.
Security Considerations and Best Practices
- Always make backups before updating to a new version.
- Monitor the 11notes repository for important changelogs and updates.
- Implement proper firewall rules to protect your UniFi controller.
- Change the default credentials immediately after setup.
Troubleshooting Common Issues
- Container Not Starting: Check Docker logs for errors. Ensure the volume path is correct.
- Web Interface Unavailable: Verify the container is running and ports are mapped correctly.
- Database Issues: Ensure sufficient resources are allocated to the Docker container.
Embrace Control with Your Own UniFi Controller
Running a UniFi Controller via Docker on Ubuntu gives you the power to manage your network on your terms. Follow this guide, and you'll have a secure, reliable, and performant UniFi setup in no time!