Skip to content

Docker LXC

Docker LXC Setup

Overall process:

  1. Proxmox helper script

    bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/docker.sh)"
    
    LXC settings
    Using Advanced Settings
    Using Distribution: debian
    Using debian Version: 12
    Using Container Type: 0
    Using Root Password: bbchops57
    Container ID: 101
    Using Hostname: docker
    Using Disk Size: 50
    Allocated Cores: 2
    Allocated RAM: 4096
    Using Bridge: vmbr0
    Using IP Address: dhcp
    Using Gateway IP Address: Default
    Disable IPv6: no
    Using Interface MTU Size: Default
    Using DNS Search Domain: Host
    Using DNS Server IP Address: Host
    Using Vlan: Default
    Enable Root SSH Access: yes
    Enable Fuse Overlayfs (ZFS): no
    Enable Verbose Mode: no
    Creating a Docker LXC using the above advanced settings
    
  2. Copy SSH keys

    Get IP address
    ip addr | grep 192
    
    Add to SSH config
    Host jdl-docker
        HostName 192.168.1.21
        User root
    Host *
        IdentityFile ~/.ssh/id_rsa
    
    Copy SSH keys
    cat ~/.ssh/id_rsa.pub | ssh jdl-docker "cat >> ~/.ssh/authorized_keys"
    
  3. Tailscale setup1

    curl -fsSL https://tailscale.com/install.sh | sh
    
    Tunneling from an LXC2

    Need to pass the tunnel device from the Proxmox host into the LXC.

    Get the numbers
    root@pve:~# ls -l /dev/net
    total 0
    crw-rw-rw- 1 root root 10, 200 Nov 17 08:46 tun
    
    Add to config file in /etc/pve/lxc
    lxc.cgroup.devices.allow: c 10:200 rwm
    lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
    
  4. Avahi setup

    apt install -y avahi-daemon
    
  5. Install GitHub CLI

    type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
    curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
    && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
    && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
    && sudo apt update \
    && sudo apt install gh -y
    
  6. Zigbee stack install

    git clone https://github.com/jsl12/zigbee-stack
    ./zigbee-stack/scripts/setup.sh
    
  7. Dashboard stack install

    git clone https://github.com/jsl12/pve-dashboards
    ./pve-dashboards/scripts/setup.sh
    
  8. Connect PVE metric server

    • Needs the token from ./influxdb/config/.write-token