meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| ubiquiti:controller [2020/07/20 15:44] – created niziak | ubiquiti:controller [2021/03/20 21:41] (current) – niziak | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| * Works correctly only with host type networking = no network separation | * Works correctly only with host type networking = no network separation | ||
| - | ===== In unprivileged LXC ===== | ||
| - | [[https://wiki.debian.org/LXC]] | + | |
| + | ==== Install MongoDB < 4.0.0 ==== | ||
| + | [[https://docs.mongodb.com/ | ||
| <code bash> | <code bash> | ||
| - | apt-get install | + | apt install gnupg2 |
| + | wget -qO - https:// | ||
| + | echo "deb http:// | ||
| + | apt-get | ||
| + | sudo apt install | ||
| + | sudo systemctl start mongod | ||
| </ | </ | ||
| - | Create user: | + | ==== Installing Unifi controller ==== |
| - | <code bash> | + | |
| - | <code bash>sudo passwd | + | Inside container: |
| + | <code bash> | ||
| + | sudo apt-get update && sudo apt-get install ca-certificates apt-transport-https wget | ||
| + | echo 'deb https://www.ui.com/ | ||
| + | sudo wget -O / | ||
| + | sudo apt update | ||
| + | sudo apt install unifi | ||
| - | Find subuids and subgids for created user | ||
| - | <code bash> | ||
| - | < | ||
| - | / | ||
| - | / | ||
| </ | </ | ||
| + | Access running controller on: [[https://< | ||
| - | Allow new user create network interfaces: | + | Unifi controller log location: |
| - | <file | /etc/lxc/lxc-usernet> | + | * '' |
| - | lxcgitlab veth br-lan 10 | + | * '' |
| - | </file> | + | |
| - | [[https://linuxcontainers.org/lxc/manpages/man5/ | + | |
| - | Now login as new user (using ssh or su). | + | ==== Configure mail agent ==== |
| - | Create default lxc configureation in user directory: | + | |
| <code bash> | <code bash> | ||
| - | mkdir -p ~/ | + | sudo apt-get install msmtp-mta |
| - | cp / | + | |
| </ | </ | ||
| - | Edit file below and put subuid and subgid: | + | See how to configure: [[linux: |
| - | <file | ~/ | + | |
| - | ... | + | |
| - | lxc.network.link = br-lan | + | |
| - | lxc.id_map = u 0 1738400 65536 | + | |
| - | lxc.id_map = g 0 1738400 65536 | + | |
| - | ... | + | |
| - | </ | + | |
| - | Create container: | + | === adding own CA cert to controller === |
| - | <code bash>lxc-create | + | To send e-mails to own SMTP server with self-signed cert. |
| + | It is enough to add cert to Debian certifcate store and restart | ||
| - | ==== Issues ==== | ||
| - | Error: lxc-create: unifi: confile.c: set_config_net: | + | To add certificate directly to JVM store: |
| + | |||
| + | [[https:// | ||
| + | |||
| + | <code bash> | ||
| + | sudo cp cacert.crt / | ||
| + | cd / | ||
| + | keytool -v -import -file cacert.crt -alias my_own_ca -keystore cacerts -storepass changeit | ||
| + | </ | ||
| - | LXC3 is using different config keys. Easiest way is to convert config file: | + | < |
| - | < | + | |