--- title: "LXC Install" slug: "fmadio-os-lxc-install" updated: 2025-04-22T07:42:08Z published: 2025-04-22T07:42:08Z canonical: "docs.fmad.io/fmadio-os-lxc-install" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.fmad.io/llms.txt > Use this file to discover all available pages before exploring further. # LXC Install FMADIO Supports multiple LXC containers, with a streamlined process to get up and running. ## Install Ubuntu22.04 Container In this example walk thru how to install the FMADIO Ubuntu 22.04 stock LXC container. ### Step 1) Download the LXC All LXCs are downloaded on the page [https://static.fmad.io/container.html](https://static.fmad.io/container.html) After downloading copy to the FMADIO system directory ```plaintext /opt/fmadio/lxc/ ``` ### Step 2) Extract Extract the container, example command shown below ```plaintext tar xfzv ubuntu22-20241223-0621.tar.gz ``` Example output shown below ```plaintext root@fmadio200v4-636:/mnt/store1/lxc/lib/lxc# tar xfzv ubuntu22-20241223-0621.tar.gz ubuntu22-20241223-0621/ ubuntu22-20241223-0621/install.lua ubuntu22-20241223-0621/config ubuntu22-20241223-0621/backup.lua ubuntu22-20241223-0621/rootfs/ ubuntu22-20241223-0621/rootfs/sys/ ubuntu22-20241223-0621/rootfs/proc/ ubuntu22-20241223-0621/rootfs/home/ ubuntu22-20241223-0621/rootfs/home/fmadio/ ubuntu22-20241223-0621/rootfs/home/fmadio/.bash_logout ubuntu22-20241223-0621/rootfs/home/fmadio/.vimrc ubuntu22-20241223-0621/rootfs/home/fmadio/.bashrc ubuntu22-20241223-0621/rootfs/home/fmadio/.profile ubuntu22-20241223-0621/rootfs/home/fmadio/.ssh/ ubuntu22-20241223-0621/rootfs/home/fmadio/.ssh/authorized_keys ubuntu22-20241223-0621/rootfs/home/ubuntu/ ubuntu22-20241223-0621/rootfs/home/ubuntu/.bash_logout ubuntu22-20241223-0621/rootfs/home/ubuntu/.bashrc ubuntu22-20241223-0621/rootfs/home/ubuntu/.profile ubuntu22-20241223-0621/rootfs/usr/ ubuntu22-20241223-0621/rootfs/usr/include/ ubuntu22-20241223-0621/rootfs/usr/include/mcheck.h ubuntu22-20241223-0621/rootfs/usr/include/tirpc/ ubuntu22-20241223-0621/rootfs/usr/include/tirpc/rpc/ ubuntu22-20241223-0621/rootfs/usr/include/tirpc/rpc/nettype.h ubuntu22-20241223-0621/rootfs/usr/include/tirpc/rpc/des.h ubuntu22-20241223-0621/rootfs/usr/include/tirpc/rpc/rpc_msg.h ubuntu22-20241223-0621/rootfs/usr/include/tirpc/rpc/svc_dg.h ubuntu22-20241223-0621/rootfs/usr/include/tirpc/rpc/rpcb_prot.x . . . ubuntu22-20241223-0621/rootfs/tmp/.XIM-unix/ ubuntu22-20241223-0621/rootfs/tmp/.X11-unix/ ubuntu22-20241223-0621/rootfs/opt/ ubuntu22-20241223-0621/rootfs/opt/fmadio/ ubuntu22-20241223-0621/rootfs/opt/fmadio/bin/ ubuntu22-20241223-0621/rootfs/opt/fmadio/bin/fmadio2eth ubuntu22-20241223-0621/rootfs/opt/fmadio/bin/fmadiolua ubuntu22-20241223-0621/rootfs/opt/fmadio/bin/lJSON.lua ubuntu22-20241223-0621/rootfs/opt/fmadio/bin/fmadio2stat ubuntu22-20241223-0621/rootfs/opt/fmadio/bin/pcap2fmadio ubuntu22-20241223-0621/rootfs/opt/fmadio/bin/fmadio2pcap ubuntu22-20241223-0621/rootfs/opt/fmadio/app/ ubuntu22-20241223-0621/rootfs/run/ ubuntu22-20241223-0621/rootfs/srv/ ubuntu22-20241223-0621/rootfs/sbin root@fmadio200v4-636:/mnt/store1/lxc/lib/lxc# ``` ### Step 3) Run the installer Enter the LXC directory, this requires changing to the root use ```plaintext sudo su cd ubuntu22-20241223-062 ``` There is an `install.lua` script in the directory. Run the script per below ```plaintext ./install.lua ``` Example output shown below ```plaintext root@fmadio200v4-636:/mnt/store1/lxc/lib/lxc/ubuntu22-20241223-0621# ./install.lua fmad fmadlua Apr  9 2025 (/opt/fmadio/bin/fmadiolua --nocal ./install.lua ) Disable cycle calibration man0 imported man0 ipv4 addr    [nil] man0 ipv4 netmask [nil] man0 ipv4 gw      [nil] man0 ipv4 dns     [nil] lxcname           [nil] lxcbuild          [nil] nat               [y] fmad fmadlua Apr  9 2025 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli version ) Disable cycle calibration done 0.005252Sec 0.000088Min ----------------------------------------------- [Sat Apr 12 14:26:24 2025] CmdLine [version] [Sat Apr 12 14:26:24 2025] Cmd [version ] ----------------------------------------------- fmadiocliPresent = true ubuntu22-20241223-0621 rm config mkdir /opt/fmadio/lxc/ubuntu22-20241223-0621/data/ -p mkdir /opt/fmadio/lxc/ubuntu22-20241223-0621/log/ -p ---------------------- IP     : nil CIDR   : nil GW     : nil DNS    : nil Nat    : y rm /opt/fmadio/lxc/ubuntu22-20241223-0621/rootfs/etc/resolv.conf touch /opt/fmadio/lxc/ubuntu22-20241223-0621/rootfs/etc/resolv.conf echo fmadio200v4-636-ubuntu22 > /opt/fmadio/lxc/ubuntu22-20241223-0621/rootfs/etc/hostname echo 127.0.0.1 fmadio200v4-636-ubuntu22 >> /opt/fmadio/lxc/ubuntu22-20241223-0621/rootfs/etc/hosts /opt/fmadio/bin/fmadiocli "config lxc add ubuntu22-20241223-0621" fmad fmadlua Apr  9 2025 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli config lxc add ubuntu22-20241223-0621 ) Disable cycle calibration [Sat Apr 12 14:26:24 2025] CmdLine [config lxc add ubuntu22-20241223-0621] [Sat Apr 12 14:26:24 2025] Cmd [config lxc add ubuntu22-20241223-0621 ] [Sat Apr 12 14:26:24 2025] Added container [ubuntu22-20241223-0621] to the configuration done 0.997916Sec 0.016632Min done done 1.024215Sec 0.017070Min root@fmadio200v4-636:/mnt/store1/lxc/lib/lxc/ubuntu22-20241223-0621# ``` ### Step 4) Start the LXC Using the LXC tools start the LXC using the following ```plaintext sudo lxc-start -n ubuntu22-20241223-0621 ``` Example output below ```plaintext root@fmadio200v4-636:/mnt/store1/lxc/lib/lxc/ubuntu22-20241223-0621# sudo lxc-start -n ubuntu22-20241223-0621 root@fmadio200v4-636:/mnt/store1/lxc/lib/lxc/ubuntu22-20241223-0621# ``` ### Step 5) Attach to the LXC Finally attach to the LXC using the lxc-attach command ```plaintext sudo lxc-attach -n ubuntu22-20241223-0621 ``` Example output shown below ```plaintext root@fmadio200v4-636:/mnt/store1/lxc/lib/lxc/ubuntu22-20241223-0621# sudo lxc-attach -n ubuntu22-20241223-0621 root@fmadio200v4-636-ubuntu22:/# ``` Can now configure the Ubuntu22 LXC without any major restrictions. CPU allocation / isolation may be recommended however it depends on what the use case is. --- ## Package Manger By default all FMADIO LXC Ubuntu containers are build using a static sourced .deb repo. This means `sudo apt-get install` will fail due to unable to find the static file repo. To enable usual ubuntu install follow the following steps [https://docs.fmad.io/docs/fmadio-lxc-ubuntu-repo](https://docs.fmad.io/docs/fmadio-lxc-ubuntu-repo)