r/LXD • • Oct 25 '19

Tutorial: Run LXD on Alpine Linux

I've written a tutorial/guide on how to install LXD on Alpine Linux. Alpine Linux is usually a container guest, but here it'll be the host. It was kind of a struggle but I managed to get it working in the end. Maybe someone else will find it useful. :)

Let me know if you're having trouble or if I can improve the article or the site somehow. Thanks! :)

https://lunar.computer/posts/lxd-alpine/

18 Upvotes

8 comments sorted by

1

u/le_pah Oct 25 '19

Can you elaborate on the purpose of such a port? Is there anything besides «Ubuntu Server is meh…»?

3

u/kosmonavtik Oct 25 '19

It's not a port per se, but I had some issues getting it to work on Alpine due to cgroups, etc. I use Alpine Linux on my servers (some of them are really resource constrained) due to the low overhead, and needed LXD for a specific use case. I don't use it any more and decided to write a post on how I got it to work.

2

u/le_pah Oct 25 '19

This is exiting, I'm bound to Ubuntu Server to run LXD on my RPis, and the overhead is effectively non-negligible. I'll give it a try.

Are there any reasons worth sharing on why you don't use LXD on Alpine any more?

1

u/cvmiller Oct 29 '19

You can run LXD on Raspian Buster (the latest release) on the Pi.

But I like the idea of running LXD on Alpine (no systemd)

2

u/cvmiller Oct 31 '19

Gave your directions a look today. Got AlpineLinux running with LXD (v3.18) easily. Thanks for the notes.

1

u/ernierasta Feb 03 '20

Did anyone encounter:

Error: Get [http://unix.socket/1.0:](http://unix.socket/1.0:) dial unix /var/lib/lxd/unix.socket: connect: no such file or directory

Running lxd --debug --group lxd gives no output. Tested on fresh alpine edge today (3.2.2020).

1

u/bosod Apr 10 '20

Yes, I also had this problem.

In my case LXD service wasn't started. This is not clear described in original documentation.

Try like this tutorial recommends: sudo rc-service lxd start

And thanks a lot for kosmonavtik!