😎
Docs
  • Tamm - Docs
  • Azure
    • Sentinel KQL Samples
    • Managed Identities
    • Deploy Sentinel with Terraform
  • Docker
    • Allow standard user to interact with Docker
    • Install Docker
    • Installing and working with Traefik
    • Installing specific version of Docker
    • Deploy Guacamole
    • Traefik geoblock
    • Unpoller Prometheus UCG Ultra
  • HomeAssistant
    • HAOS install on Proxmox
    • Zigbee2MQTT
    • HAOS Reverse Proxy
    • ZBDongle-E
  • Kali
    • Enable RDP
  • Kubernetes
    • Cert manager with Cloudflare
    • On prem loadbalancer metallb
    • Nginx ingress
    • Cloudinit Rancher ubuntu
    • Rancher Ubuntu 18.04 node template
    • Velero with minio backend
    • vsphere pvc (in-tree)
    • Velero cheat sheet
    • nginx annotations examples
  • Linux
    • Expand lvm disk vmware
    • Expand lvm disk fresh install
    • Disk usage
    • flush-dns
    • Netplan config example
    • Add user in photon OS
    • SSH-Keys
    • Set timezone
    • sudo nopasswd
    • Add custom alias
    • Rocky Linux commands
  • macOS
    • Uninstall System extensions
    • 1Password Github setup
  • Microsoft 365
    • Powershell Cheat sheet
  • Portainer
    • Install Portainer
    • Add docker node
  • Powershell
    • GenericList example
    • Mixed stuff n things
    • Synopsis Template
    • Powershell Oh-my-posh
    • Powershell Sync Profile
    • Cleanup and install MS Graph module
  • Proxmox
    • Disable No Subscription notification
    • Import from vmware error
    • Proxmox commands
    • Proxmox on Intel NUC
    • Proxmox E1000
  • Terraform
    • Getting started
    • Deploy Sentinel
  • Unifi
    • Unifi Network App (migration)
    • Slow vlan throughput
    • interface-explanation
  • Windows
    • Network settings access denied
    • Windows GVLK Keys
    • Windows Server 2025
Powered by GitBook
On this page

Was this helpful?

  1. Unifi

Unifi Network App (migration)

PreviousDeploy SentinelNextSlow vlan throughput

Last updated 1 year ago

Was this helpful?

Soo since the previous ghcr.io/linuxserver/unifi-controller:latest is going End of life 2024-01-01 its time to migrate.

"Official" Docs: https://github.com/linuxserver/docker-unifi-network-application

I run my stuff using Portainer so the guide will be made for that, but its still docker-compose files so its should work elsewhere as well

  1. Make sure you know you AP password, if not I found mine under

So make sure you jot that down for future use as well....

  1. Export configuration by going to Settings -> System -> Backups

If you want historic data with you, choose how many days back you want to download

  1. In Portainer shut down you previous Stack

  2. SSH to your Portainer host and create this file /tmp/init-mongo.js

db.getSiblingDB("unifi").createUser({user: "unifi", pwd: "myFunnyPassword", roles: [{role: "dbOwner", db: "unifi"}]});
db.getSiblingDB("unifi_stat").createUser({user: "unifi", pwd: "myFunnyPassword", roles: [{role: "dbOwner", db: "unifi_stat"}]});

Change "myFunnyPassword" to something else

  1. Create a new Stack with this docker-compose

---
version: "2.1"
services:
  unifi-network-application:
    image: lscr.io/linuxserver/unifi-network-application:latest
    container_name: unifi-network-application
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - MONGO_USER=unifi
      - MONGO_PASS=myFunnyPassword
      - MONGO_HOST=unifi-db
      - MONGO_PORT=27017
      - MONGO_DBNAME=unifi
      - MEM_LIMIT=1024 #optional
      - MEM_STARTUP=1024 #optional
      - MONGO_TLS= #optional
      - MONGO_AUTHSOURCE= #optional
    volumes:
      - 'unifi_app_config:/config'
    ports:
      - 8443:8443
      - 3478:3478/udp
      - 10001:10001/udp
      - 8080:8080
      - 1900:1900/udp #optional
      - 8843:8843 #optional
      - 8880:8880 #optional
      - 6789:6789 #optional
      - 5514:5514/udp #optional
    restart: unless-stopped
  unifi-db:
    image: docker.io/mongo:4.4
    container_name: unifi-db
    volumes:
      - 'unifi_db_data:/data/db'
      - /tmp/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
    restart: unless-stopped
volumes:
  unifi_app_config:
  unifi_db_data:
  1. Start the stack

  2. You should now be able to access your UI, choose restore from backup. Once the backup has been restored, you should be able to login using your old credentials.

  3. SSH to your APs, ssh username@<ip>

  4. run set-inform http://ip-to-controller:8080/inform

Done and done

Cleaning up

Once all set up, you should delete the init-mongo.js file from the portainer hos and remove the line from the Portainer Stack