May 23, 2025

18 thoughts on “Turn Unifi Cloud Key Gen 2 + into a headless Linux Server

  1. Great guide, however I wish to install Unifi to run a site, i tried a lot of different methods on how to do this on Debian 10, but it doesn’t work.
    Have you tried this?

    1. I havnt tried – but after you get the OS setup the way you want, you could return to the admin page of the cloud key and re-install the cloud key/wifi controller portion? Again – I have not tried this.

      1. Hm I believe everything that has to do with Unifi is vanished after installing/upgrading to Debian 10. So I cannot access the portal again.

  2. If you dist-upgrade, effectively removing all of the Unifi customisations, is it still possible to enter recovery mode to re-flash an official Unifi image later if needs be?

    1. Yes. Great question. I did this the other day, when I sold the second unify cloud key I did this too. Finding the right image can be a bitch – I had to go WAY far back to get one to work.

      1. Great article. Looking into your writing and comments and some questions raised:
        1. Have you tried to flash a completely new OS. I see it is running on Debian, so maybe running a vanilla installation would be great if it is possible.
        2. Alexander mentions flashing back stock Unifi FW that you confirmed worked with your device. How do you execute this? Information other than wining on the instability of the CK and working with the stock FW and software seems to be a bit limited. It’s probably not the friendliest hackable piece of hardware, but I really like it and plan to get one for fun, but not before I am sure about the above.
        3. Is the 32GB eMMC where the above instructions work, or is it used only for recovery?

  3. Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 3.18.44-ubnt-qcom aarch64)

    * Documentation: https://help.ubuntu.com
    * Management: https://landscape.canonical.com
    * Support: https://ubuntu.com/advantage
    Linux ck-plus 3.18.44-ubnt-qcom #1 SMP Wed Oct 17 09:43:11 PDT 2018 aarch64

    Firmware version: v0.8.6

    The programs included with the Ubuntu system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
    applicable law.

    .–.__
    ______ __ .–( ) )-. __ __ __
    | | (._____.__.___)_| | |__ _____ __ __ _| |_
    | —| || _ | | | _ | <| -__| | | |_ _|
    |______|__||_____|_____|_____|__|__|_____|___ | |__|
    (c) 2018 Ubiquiti Networks, Inc. |_____|

    Welcome to the CloudKey Plus!

  4. So, I have converted this Cloud Key Gen2 Plus from the original Debian system over to Ubuntu 20.04. It took a little work, and a few tries at the trouble shooting. I placed the following into a script, and used it to upgrade the UCK from Debian, back around to Ubuntu.

    I know when you look at the script, the way the last upgrade went, your going to think, why do it this way. I will tell you a flat apt upgrade will leave you resetting the system back and starting again. However, *IF* you check apt upgrade, and upgrade ALL crypto packages first, you will have better success.

    https://github.com/jmewing/uckp-gen2/blob/main/README.md

  5. I got stuck on syslog-ng-core updates…

    Preparing to unpack …/syslog-ng-core_3.19.1-5_arm64.deb …
    Unpacking syslog-ng-core (3.19.1-5) over (3.8.1-10) …
    dpkg: error processing archive /var/cache/apt/archives/syslog-ng-core_3.19.1-5_arm64.deb (–unpack):
    trying to overwrite ‘/etc/logrotate.d/syslog-ng’, which is also in package cloudkey-plus-apq8053-base-files 2.4.38~691+g18016c6
    dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
    Errors were encountered while processing:
    /var/cache/apt/archives/syslog-ng-core_3.19.1-5_arm64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    It needed a little bit of help along the way!

    dpkg -i –force-overwrite /var/cache/apt/archives/syslog-ng-core_3.19.1-5_arm64.deb

    with a follow-up

    apt –fix-broken install

  6. The problem I have is fstab being overwritten when the device is restarted. Is it possible to get around this?

    1. I’m wanting to solve the same problem. Did you ever figure out how to solve the fstab overwrite?

    2. Hi Shaun, I have this problem too – fstab is restored on every reboot. Does anyone know how to get around this?
      Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

WordPress Appliance - Powered by TurnKey Linux