How can i use lxc on macos


I’m confused about lxc on mac. Can i install lxc to macos ?

there is no information about installing lxc to macos here

so lxd has information about installation. It says brew install lxc (

after install it i get this message:

"This client hasn’t been configured to use a remote LXD server yet.

As your platform can’t run native Linux instances, you must connect to a remote LXD server.

If you already added a remote server, make it the default with “lxc remote switch NAME”.

To easily setup a local LXD server in a virtual machine, consider using:"

so i just want to learn can i use lxc(standalone) or lxd in macos? If it is ok how can i do that ?

The message from the client tells you exactly what todo, you need to get a linux (virtual) machine running (With LXD Installed)

The lxc command is used to interact with an LXD server, typically this would be local to your machine, but your machine doesnt support LXD.

Because lxc only sends http / socket requests it can run on your mac and be connected to a remote LXD instance

thank you


I suggest to install VM with Ubuntu, then use LXD according those many guides that explain how to use LXD in Ubuntu.

Once you are more familiar, you can install the LXD client (brew install lxc) and configure it to use the LXD server in the VM.

Because Linux containers require a Linux kernel and cannot run directly on the Mac kernel.

1 Like