Files
.infineon/_-Review/beelink.ubuntu.md
2024-12-04 07:29:08 -07:00

558 lines
22 KiB
Markdown

---
created: 2024-11-04T19:30:17.000Z
type: note
updated: 2024-12-04T03:46:28.000Z
---
# Beelink Ubuntu
## Dashkiosk
```bash Thu Jun 20 2024 17:31:33 GMT-0700 (Mountain Standard Time)
sudo -i
apt install snapd
apt install sudo links unzip nginx git nano ncdu -y
snap install dashkiosk
snap install ubuntu-frame wpe-webkit-mir-kiosk
snap set wpe-webkit-mir-kiosk daemon=true
snap set wpe-webkit-mir-kiosk url=http://localhost:9400/receiver
wpe-webkit-mir-kiosk.cog http://localhost:9400/receiver
/snap/wpe-webkit-mir-kiosk/current/bin/setup.sh
wpe-webkit-mir-kiosk.cog http://localhost:9400/receiver
exit
sudo -i
reboot
```
```bash Thu Jun 20 2024 17:37:12 GMT-0700 (Mountain Standard Time)
snap set ubuntu-frame daemon=true
# Slideshow
# http://127.0.0.1:8080/slideshow
# Local
# https://192.168.11.2/slideshow
```
## authorized_keys
```bash Thu Jun 20 2024 17:40:24 GMT-0700 (Mountain Standard Time)
adduser lphares
mkdir /home/lphares/.ssh
cp /home/phares/.ssh/authorized_keys /home/lphares/.ssh/authorized_keys
chown lphares:lphares -R /home/lphares
adduser bmiller
mkdir /home/bmiller/.ssh
cp /home/phares/.ssh/authorized_keys /home/bmiller/.ssh/authorized_keys
chown bmiller:bmiller -R /home/bmiller
adduser bmiller lphares
cp /home/phares/.ssh/authorized_keys /root/.ssh/authorized_keys
```
## Log
```bash Thu Jun 20 2024 17:40:26 GMT-0700 (Mountain Standard Time)
ln -s /var/log/nginx /var/www/html/log-nginx
ls -la /var/www/html
exit
```
```bash Thu Jun 20 2024 17:40:28 GMT-0700 (Mountain Standard Time)
sudo -i
cp ~/.bash_history /etc/bash_history_2024-06-20.txt
cat /etc/bash_history_2024-06-20.txt
exit
```
```bash Thu Jun 20 2024 17:40:31 GMT-0700 (Mountain Standard Time)
sudo -i
apt install smartmontools -y
smartctl -i /dev/sda
```
## no-ip2
```bash Thu Jun 20 2024 17:42:09 GMT-0700 (Mountain Standard Time)
cd /usr/local/src/
wget http://www.noip.com/client/linux/noip-duc-linux.tar.gz
tar xf noip-duc-linux.tar.gz
ls
cd noip-2.1.9-1/
apt-get install make gcc -y
make install
cat /usr/local/etc/no-ip2.conf
noip2 -C -u 9zh94yf -p xrtvLiRNhScX
cd /usr/local/src/noip-2.1.9-1/binaries
./noip2-x86_64 -S
cd ..
noip2 -S
exit
```
## certbot
```bash Thu Jun 20 2024 17:42:44 GMT-0700 (Mountain Standard Time)
# https://certbot.eff.org/instructions?ws=nginx&os=ubuntufocal
apt-get remove certbot -y
snap install --classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot
mkdir -p /var/www/certbot/.well-known/acme-challenge
touch /var/www/certbot/.well-known/acme-challenge/smwqgmeNx04tA3HC05I8_gtpqLTkjRAotHdfp0E5LnM
# certbot --nginx
certbot certonly --nginx
# 19 12 15 16 17
# always pick phares3757 first!
# http://immich3757.ddns.net/.well-known/acme-challenge/smwqgmeNx04tA3HC05I8_gtpqLTkjRAotHdfp0E5LnM
systemctl list-timers
# /etc/crontab/
# /etc/cron.*/*
certbot renew --dry-run
# https://www.f5.com/company/blog/nginx/using-free-ssltls-certificates-from-lets-encrypt-with-nginx
nano /etc/logrotate.d/letsencrypt
```
```conf Sun Jun 23 2024 14:16:20 GMT-0700 (Mountain Standard Time)
/var/log/letsencrypt/*.log {
rotate 12
weekly
compress
missingok
}
```
```bash Thu Jun 20 2024 17:42:44 GMT-0700 (Mountain Standard Time)
exit
```
## LXD
```bash Thu Jun 20 2024 18:07:18 GMT-0700 (Mountain Standard Time)
sudo -i
snap install lxd
lxd init
lxc launch ubuntu:24.04 ubuntu-gogs
lxc list
lxc exec ubuntu-gogs bash
```
## Gogs
```bash Thu Jun 20 2024 18:50:06 GMT-0700 (Mountain Standard Time)
apt-get update
apt-get upgrade
adduser gogs
# mkdir /home/gogs/.ssh
# cp /home/mike/.ssh/authorized_keys /home/gogs/.ssh/authorized_keys
# chown gogs:gogs -R /home/gogs
# adduser gogs sudo
# usermod -a -G sudo gogs
cd /home/gogs
wget https://dl.gogs.io/0.13.0/gogs_0.13.0_linux_amd64.tar.gz
tar -xvzf gogs_0.13.0_linux_amd64.tar.gz
rm gogs_0.13.0_linux_amd64.tar.gz
chown -R gogs:gogs /home/gogs
su gogs
cd /home/gogs/gogs
./gogs web
```
```bash Thu Jun 20 2024 18:57:46 GMT-0700 (Mountain Standard Time)
# http://192.168.11.2:3000/user/settings/ssh
exit # gogs
# https://github.com/gogs/gogs/blob/main/scripts/systemd/gogs.service
nano /etc/systemd/system/gogs-daemon.service
```
```conf Thu Jun 20 2024 18:57:50 GMT-0700 (Mountain Standard Time)
[Unit]
Description=Gogs
After=syslog.target
After=network.target
[Service]
# Modify these two values and uncomment them if you have
# repos with lots of files and get an HTTP error 500 because
# of that
##
#LimitMEMLOCK=infinity
#LimitNOFILE=65535
Type=simple
User=gogs
Group=gogs
WorkingDirectory=/home/gogs/gogs
ExecStart=/home/gogs/gogs/gogs web
Restart=always
Environment=USER=gogs HOME=/home/gogs
# Some distributions may not support these hardening directives
# If you cannot start the service due
# to an unknown option, comment out the ones not supported by your version of systemd.
ProtectSystem=full
PrivateDevices=yes
PrivateTmp=yes
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target
```
```bash Thu Jun 20 2024 18:57:57 GMT-0700 (Mountain Standard Time)
systemctl enable gogs-daemon
systemctl stop gogs-daemon
systemctl start gogs-daemon
systemctl status gogs-daemon.service
journalctl -fu gogs-daemon.service
journalctl --rotate
journalctl --vacuum-time=1s
systemctl daemon-reload
```
```bash
# https://github.com/Kos-M/GogsThemes
cd /home/gogs
git clone https://github.com/Kos-M/GogsThemes
mkdir -p /home/gogs/gogs/custom/templates/inject/
mkdir -p /home/gogs/gogs/custom/public/css/
echo '<link rel="stylesheet" href="/css/themes/dark_theme.css">' >> /home/gogs/gogs/custom/templates/inject/head.tmpl
mv ./GogsThemes/themes/ /home/gogs/gogs/custom/public/css/
cp -r GogsThemes/img/ /home/gogs/gogs/custom/public/
rm -r ./GogsThemes
systemctl restart gogs-daemon
nano /etc/gogs/app.ini
```
```bash Thu Jun 20 2024 19:09:35 GMT-0700 (Mountain Standard Time)
# mkdir /etc/gogs-copy
# cp /home/gogs/gogs/custom/conf/app.ini /etc/gogs-copy/
# ln -s /home/gogs/gogs/custom/conf /etc/gogs
chown -R gogs:gogs /home/gogs
nano /home/gogs/gogs/custom/conf/app.ini
```
```conf Thu Jun 20 2024 19:13:14 GMT-0700 (Mountain Standard Time)
BRAND_NAME = Gogs
RUN_USER = gogs
RUN_MODE = prod
[database]
TYPE = sqlite3
HOST = 127.0.0.1:3306
NAME = gogs
SCHEMA = public
USER = gogs
PASSWORD = 1178
SSL_MODE = disable
PATH = data/gogs.db
[repository]
ROOT = /home/gogs/gogs-repositories
DEFAULT_BRANCH = master
[server]
DOMAIN = localhost
HTTP_PORT = 3000
EXTERNAL_URL = http://c242738d1d8b414da0e756118c5124e8ac015a0c@gogs3757.ddns.net/
DISABLE_SSH = false
SSH_PORT = 22
START_SSH_SERVER = false
OFFLINE_MODE = false
[mailer]
ENABLED = false
[auth]
REQUIRE_EMAIL_CONFIRMATION = false
DISABLE_REGISTRATION = false
ENABLE_REGISTRATION_CAPTCHA = true
REQUIRE_SIGNIN_VIEW = false
[user]
ENABLE_EMAIL_NOTIFICATION = false
[picture]
DISABLE_GRAVATAR = false
ENABLE_FEDERATED_AVATAR = false
[session]
PROVIDER = file
[log]
MODE = file
LEVEL = Info
ROOT_PATH = /home/gogs/gogs/log
[security]
INSTALL_LOCK = true
SECRET_KEY = czo27vBeXWU7HTi
```
```conf
# See free-file-sync directory
```
```bash
systemctl restart gogs-daemon
# http://localhost:3000/
# https://github.com/gogs/docs-api/tree/master/Repositories#migrate
# https://github.com/gogs/docs-api?tab=readme-ov-file
# git push --set-upstream gogs master
# url = gogs@gogs3757.ddns.net:mikepharesjr/
# url = https://{token}@gogs3757.ddns.net/mikepharesjr/
timedatectl set-timezone America/Phoenix
```
```bash Thu Jun 20 2024 19:41:18 GMT-0700 (Mountain Standard Time)
sudo -i
lxc launch ubuntu:24.04 ubuntu-noble-gogs
lxc list
lxc exec ubuntu-noble-gogs bash
```
```bash Thu Jun 20 2024 19:41:18 GMT-0700 (Mountain Standard Time)
# https://bobcares.com/blog/move-lxc-container-to-new-vm/
# To begin with, create a snapshot of the LXC container on the current VM. This snapshot will serve as a backup for the migration process. So, open the terminal and run this command:
lxc snapshot ubuntu-noble-gogs ubuntu-noble-gogs-2024-06-20
# Then, validate the snapshot was created successfully by checking the snapshots list with this command:
lxc info ubuntu-noble-gogs
# If we have not named the snapshot yet, look for the most recent creation date.
# Now, it is time to create an image from it. This will be used to set up our container on the new VM.
lxc publish ubuntu-noble-gogs/ubuntu-noble-gogs-2024-06-20 --alias="ubuntu-noble-gogs-image" description="ubuntu-noble-gogs-image-2024-06-20"
# At this point, we have to verify that the image was created by checking the image list with:
lxc image info ubuntu-noble-gogs-image
# Then, move the image to the new VM. We need to export it as an archive. This is done with this command:
mkdir root/Gogs
lxc image export ubuntu-noble-gogs-image root/Gogs/ubuntu-noble-gogs-image-2024-06-20-archive
# Before we import the image into the new VM, we have to make sure we can establish an SSH connection between the old VM and the new one. This is done via a VPN or Wireguard connection. So, use the `scp` command to copy the image to the new VM and replace `usera@host:/home/user` with the correct destination path:
# scp ./root/Gogs/ubuntu-noble-gogs-image-2024-06-20-archive.tar.gz usera@host:/home/user
# Furthermore, make sure both `lxc` and `lxd` are installed on the new VM. Then, import the image as seen here:
# lxc image import root/Gogs/ubuntu-noble-gogs-image-2024-06-20-archive.tar.gz --alias ubuntu-noble-gogs-image_on_new_vm
# Finally, confirm that the imported image appears in the list on our new VM:
lxc image list
lxc copy ubuntu-noble-gogs ubuntu-noble-gogs-b
lxc delete ubuntu-noble-gogs-b
```
## Slideshow
```bash Sun Jun 23 2024 14:23:01 GMT-0700 (Mountain Standard Time)
lsblk
mount /dev/sdc2 /mnt
cp -R /mnt/var/www/html/Images-c9dbce3b-Results/thumbs/ /var/www/html/Images-c9dbce3b-Results/.
ls /var/www/html/Images-c9dbce3b-Results/thumbs/
exit
```
## LXC
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
|------|-------|------|------|------|-----------|
```bash Sun Jun 23 2024 20:54:13 GMT-0700 (Mountain Standard Time)
mkdir /root/Readeck
scp root@192.168.11.12:/tmp/metadata.tar.gz /root/Readeck/.
scp root@192.168.11.12:/tmp/vzdump-lxc-107-2024_06_23-19_23_43.tar.gz /root/Readeck/.
lxc image import --alias=proxmox-107-debian-bookworm-readeck-image /root/Readeck/metadata.tar.gz /root/Readeck/vzdump-lxc-107-2024_06_23-19_23_43.tar.gz
lxc launch proxmox-107-debian-bookworm-readeck-image debian-bookworm-readeck -c boot.autostart=true
lxc exec debian-bookworm-readeck bash
```
```bash Sun Jun 23 2024 20:54:13 GMT-0700 (Mountain Standard Time)
mkdir /root/Zabbix
scp root@192.168.11.12:/tmp/metadata.tar.gz /root/Zabbix/.
scp root@192.168.11.12:/tmp/vzdump-lxc-109-2024_06_23-20_03_51.tar.gz /root/Zabbix/.
lxc image import --alias=proxmox-109-id-code-zabbix-image /root/Zabbix/metadata.tar.gz /root/Zabbix/vzdump-lxc-109-2024_06_23-20_03_51.tar.gz
lxc launch proxmox-109-id-code-zabbix-image proxmox-zabbix -c boot.autostart=true
lxc exec id-code-zabbix bash
```
```bash Sun Jun 23 2024 20:54:13 GMT-0700 (Mountain Standard Time)
mkdir /root/HomeAssistantCore
scp root@192.168.11.12:/tmp/metadata.tar.gz /root/HomeAssistantCore/.
scp root@192.168.11.12:/tmp/vzdump-lxc-110-2024_06_23-20_52_34.tar.gz /root/HomeAssistantCore/.
lxc image import --alias=proxmox-110-ubuntu-noble-home-assistant-core-image /root/HomeAssistantCore/metadata.tar.gz /root/HomeAssistantCore/vzdump-lxc-110-2024_06_23-20_52_34.tar.gz
lxc launch proxmox-110-ubuntu-noble-home-assistant-core-image ubuntu-noble-home-assistant-core -c boot.autostart=true
lxc exec ubuntu-noble-home-assistant-core bash
```
```bash Sun Jun 23 2024 20:54:13 GMT-0700 (Mountain Standard Time)
mkdir /root/Ansible
scp root@192.168.11.12:/tmp/104-metadata.tar.gz /root/Ansible/metadata.tar.gz
scp root@192.168.11.12:/tmp/vzdump-lxc-104-2024_06_23-21_55_47.tar.gz /root/Ansible/.
lxc image import --alias=proxmox-104-debian-bookworm-ansible-image /root/Ansible/metadata.tar.gz /root/Ansible/vzdump-lxc-104-2024_06_23-21_55_47.tar.gz
lxc launch proxmox-104-debian-bookworm-ansible-image debian-bookworm-ansible -c boot.autostart=true
lxc exec debian-bookworm-ansible bash
```
```bash Sun Jun 23 2024 20:54:13 GMT-0700 (Mountain Standard Time)
mkdir /root/InvoiceNinja
scp root@192.168.11.12:/tmp/105-metadata.tar.gz /root/InvoiceNinja/metadata.tar.gz
scp root@192.168.11.12:/tmp/vzdump-lxc-105-2024_06_23-21_57_29.tar.gz /root/InvoiceNinja/.
lxc image import --alias=proxmox-105-debian-bookworm-invoice-ninja-image /root/InvoiceNinja/metadata.tar.gz /root/InvoiceNinja/vzdump-lxc-105-2024_06_23-21_57_29.tar.gz
lxc launch proxmox-105-debian-bookworm-invoice-ninja-image debian-bookworm-invoice-ninja -c boot.autostart=true
lxc exec debian-bookworm-invoice-ninja bash
```
```bash Sun Jun 23 2024 20:54:13 GMT-0700 (Mountain Standard Time)
mkdir /root/Odoo
scp root@192.168.11.12:/tmp/106-metadata.tar.gz /root/Odoo/metadata.tar.gz
scp root@192.168.11.12:/tmp/vzdump-lxc-106-2024_06_23-22_39_08.tar.gz /root/Odoo/.
lxc image import --alias=proxmox-106-debian-bookworm-odoo-image /root/Odoo/metadata.tar.gz /root/Odoo/vzdump-lxc-106-2024_06_23-22_39_08.tar.gz
lxc launch proxmox-106-debian-bookworm-odoo-image debian-bookworm-odoo -c boot.autostart=true
lxc exec debian-bookworm-odoo bash
```
```bash Sun Jun 23 2024 20:54:13 GMT-0700 (Mountain Standard Time)
mkdir /root/UpTimeKuma
scp root@192.168.11.12:/tmp/100-metadata.tar.gz /root/UpTimeKuma/metadata.tar.gz
scp root@192.168.11.12:/tmp/vzdump-lxc-100-2024_06_23-22_49_01.tar.gz /root/UpTimeKuma/.
lxc image import --alias=proxmox-100-ubuntu-noble-up-time-kuma-image /root/UpTimeKuma/metadata.tar.gz /root/UpTimeKuma/vzdump-lxc-100-2024_06_23-22_49_01.tar.gz
lxc launch proxmox-100-ubuntu-noble-up-time-kuma-image ubuntu-noble-up-time-kuma -c boot.autostart=true
lxc exec ubuntu-noble-up-time-kuma bash
```
```bash Sun Jun 23 2024 20:54:13 GMT-0700 (Mountain Standard Time)
mkdir /root/CasaOS
scp root@192.168.11.12:/tmp/101-metadata.tar.gz /root/CasaOS/metadata.tar.gz
scp root@192.168.11.12:/tmp/vzdump-lxc-101-2024_06_23-22_55_55.tar.gz /root/CasaOS/.
lxc image import --alias=proxmox-101-ubuntu-noble-casa-os-image /root/CasaOS/metadata.tar.gz /root/CasaOS/vzdump-lxc-101-2024_06_23-22_55_55.tar.gz
lxc launch proxmox-101-ubuntu-noble-casa-os-image ubuntu-noble-casa-os -c boot.autostart=true
lxc exec ubuntu-noble-casa-os bash
```
```bash Sun Jun 23 2024 20:54:13 GMT-0700 (Mountain Standard Time)
mkdir /root/Emby
scp root@192.168.11.12:/tmp/102-metadata.tar.gz /root/Emby/metadata.tar.gz
scp root@192.168.11.12:/tmp/vzdump-lxc-102-2024_06_23-23_10_03.tar.gz /root/Emby/.
lxc image import --alias=proxmox-102-ubuntu-noble-emby-image /root/Emby/metadata.tar.gz /root/Emby/vzdump-lxc-102-2024_06_23-23_10_03.tar.gz
lxc launch proxmox-102-ubuntu-noble-emby-image ubuntu-noble-emby -c boot.autostart=true
lxc exec ubuntu-noble-emby bash
```
```bash Tue Jun 25 2024 19:58:22 GMT-0700 (Mountain Standard Time)
mkdir /root/PhotoPrism
scp root@192.168.11.12:/tmp/metadata.tar.gz /root/PhotoPrism/.
scp root@192.168.11.12:/tmp/vzdump-lxc-103-2024_06_25-18_54_52.tar.gz /root/PhotoPrism/.
lxc image import --alias=proxmox-103-ubuntu-noble-photoprism-image /root/PhotoPrism/metadata.tar.gz /root/PhotoPrism/vzdump-lxc-103-2024_06_25-18_54_52.tar.gz
lxc launch proxmox-103-ubuntu-noble-photoprism-image ubuntu-noble-photoprism -c boot.autostart=true
lxc exec ubuntu-noble-photoprism bash
```
```bash Tue Jun 25 2024 19:58:22 GMT-0700 (Mountain Standard Time)
mkdir /root/VaultWarden
scp root@192.168.11.12:/tmp/metadata.tar.gz /root/VaultWarden/.
scp root@192.168.11.12:/tmp/vzdump-lxc-108-2024_06_25-19_56_58.tar.gz /root/VaultWarden/.
lxc image import --alias=proxmox-108-ubuntu-noble-vaultwarden-image /root/VaultWarden/metadata.tar.gz /root/VaultWarden/vzdump-lxc-108-2024_06_25-19_56_58.tar.gz
lxc launch proxmox-108-ubuntu-noble-vaultwarden-image ubuntu-noble-vaultwarden -c boot.autostart=true
lxc exec ubuntu-noble-vaultwarden bash
```
```bash Tue Jun 25 2024 20:28:11 GMT-0700 (Mountain Standard Time)
mkdir /root/OwnCast
scp root@192.168.11.12:/tmp/metadata.tar.gz /root/OwnCast/.
scp root@192.168.11.12:/tmp/vzdump-lxc-109-2024_06_25-20_27_52.tar.gz /root/OwnCast/.
lxc image import --alias=proxmox-109-ubuntu-noble-owncast-image /root/OwnCast/metadata.tar.gz /root/OwnCast/vzdump-lxc-109-2024_06_25-20_27_52.tar.gz
lxc launch proxmox-109-ubuntu-noble-owncast-image ubuntu-noble-owncast -c boot.autostart=true
lxc exec ubuntu-noble-owncast bash
```
```bash Mon Jun 24 2024 15:26:49 GMT-0700 (Mountain Standard Time)
lxc launch ubuntu:24.04 ubuntu-noble-immich-
lxc list
lxc exec ubuntu-noble-immich- bash
```
```bash Wed Jun 26 2024 17:13:38 GMT-0700 (Mountain Standard Time)
mv /home/syncthing/Proxmox/immich*.tar.gz Immich/.
# /home/syncthing/Proxmox/immich_redis_export.tar.gz
lxc image import --alias=docker-alpine-3-20-immich-redis-image /root/Immich/metadata.tar.gz /root/Immich/immich_redis_export.tar.gz
lxc launch docker-alpine-3-20-immich-redis-image alpine-3-20-immich-redis -c boot.autostart=true
lxc exec alpine-3-20-immich-redis sh
# /home/syncthing/Proxmox/immich_postgres_export.tar.gz
lxc image import --alias=docker-alpine-3-20-immich-postgres-image /root/Immich/metadata.tar.gz /root/Immich/immich_postgres_export.tar.gz
lxc launch docker-alpine-3-20-immich-postgres-image alpine-3-20-immich-postgres -c boot.autostart=true
lxc exec alpine-3-20-immich-postgres bash
# /home/syncthing/Proxmox/immich_machine_learning_export.tar.gz
lxc image import --alias=docker-alpine-3-20-immich-machine-learning-image /root/Immich/metadata.tar.gz /root/Immich/immich_machine_learning_export.tar.gz
lxc launch docker-alpine-3-20-immich-machine-learning-image alpine-3-20-immich-machine-learning -c boot.autostart=true
lxc exec alpine-3-20-immich-machine-learning bash
# /home/syncthing/Proxmox/immich_server_export.tar.gz
lxc image import --alias=docker-alpine-3-20-immich-server-image /root/Immich/metadata.tar.gz /root/Immich/immich_server_export.tar.gz
lxc launch docker-alpine-3-20-immich-server-image alpine-3-20-immich-server -c boot.autostart=true
lxc exec alpine-3-20-immich-server bash
```
```bash Wed Jun 26 2024 17:54:01 GMT-0700 (Mountain Standard Time)
apt install lxc-utils
```
```bash
lxc config set debian-bookworm-ansible boot.autostart false
lxc config set ubuntu-noble-casa-os boot.autostart false
lxc config set ubuntu-noble-emby boot.autostart false
lxc config set ubuntu-noble-home-assistant-core boot.autostart false
lxc config set ubuntu-noble-owncast boot.autostart false
lxc config set ubuntu-noble-up-time-kuma boot.autostart false
lxc file push /home/syncthing/Proxmox/*.png ubuntu-noble-emby/home/
```
```bash Wed Jun 26 2024 18:07:05 GMT-0700 (Mountain Standard Time)
# https://ubuntu.com/tutorials/how-to-run-docker-inside-lxd-containers#4-test-your-docker-container
lxc storage create docker btrfs
lxc launch 91c12543d4f6 ubuntu-noble-docker
lxc storage volume create docker ubuntu-noble-docker
lxc config device add ubuntu-noble-docker docker disk pool=docker source=ubuntu-noble-docker path=/var/lib/docker
lxc config set ubuntu-noble-docker security.nesting=true security.syscalls.intercept.mknod=true security.syscalls.intercept.setxattr=true
lxc stop ubuntu-noble-docker
lxc rename ubuntu-noble-docker ubuntu-noble-docker-immich
lxc copy ubuntu-noble-docker-immich ubuntu-noble-docker-immich-copy
lxc start ubuntu-noble-docker-immich
lxc exec ubuntu-noble-docker-immich bash
sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg \
--dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
docker run -it ubuntu bash
exit
lxc exec ubuntu-noble-docker-immich bash
ps aux
mkdir ./immich-app
cd ./immich-app
wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
wget -O hwaccel.transcoding.yml https://github.com/immich-app/immich/releases/latest/download/hwaccel.transcoding.yml
wget -O hwaccel.ml.yml https://github.com/immich-app/immich/releases/latest/download/hwaccel.ml.yml
docker compose up -d
docker compose pull && docker compose up -d
exit
lxc snapshot ubuntu-noble-docker-immich ubuntu-noble-docker-immich-2024-06-26
```
```bash Thu Jun 27 2024 15:28:53 GMT-0700 (Mountain Standard Time)
mkdir /root/Dockge
scp root@192.168.11.12:/tmp/metadata.tar.gz /root/Dockge/.
scp root@192.168.11.12:/tmp/vzdump-lxc-111-2024_06_27-15_28_21.tar.gz /root/Dockge/.
lxc image import --alias=proxmox-111-ubuntu-noble-dockge-immich-image /root/Dockge/metadata.tar.gz /root/Dockge/vzdump-lxc-111-2024_06_27-15_28_21.tar.gz
lxc launch proxmox-111-ubuntu-noble-dockge-immich-image ubuntu-noble-dockge-immich -c boot.autostart=true
lxc exec ubuntu-noble-dockge-immich bash
```
```bash Thu Jun 27 2024 15:48:31 GMT-0700 (Mountain Standard Time)
mkdir /root/HomeAssistant
scp root@192.168.11.12:/tmp/metadata.tar.gz /root/HomeAssistant/.
scp root@192.168.11.12:/tmp/vzdump-lxc-112-2024_06_27-15_47_44.tar.gz /root/HomeAssistant/.
lxc image import --alias=proxmox-112-ubuntu-noble-dockge-home-assistant-image /root/HomeAssistant/metadata.tar.gz /root/HomeAssistant/vzdump-lxc-112-2024_06_27-15_47_44.tar.gz
lxc launch proxmox-112-ubuntu-noble-dockge-home-assistant-image ubuntu-noble-dockge-home-assistant -c boot.autostart=true
lxc exec ubuntu-noble-dockge-home-assistant bash
```
```bash
lxc export ubuntu-noble-gogs /backups/lxd/ubuntu-noble-gogs-backup-$(date +'%m-%d-%Y').tar.xz --optimized-storage
```