Can't create LXC container in LuCI with space in a name

Hi guys,

currently is impossible to create a container in LuCI with the space in a name.

Steps to reproduce:

  1. Go to the LuCI to the LXC page (
  2. Choose Ubuntu Artful in a combo box
  3. Name it Ubuntu Artful
  4. Click Create button
  5. Nothing happened

Expected behavior
Container will be created.
Update Oct16: container will be created without spaces or they it will be replaced with some allowed character in LXC containers name (thank’s to @vlk Can’t create LXC container in LuCI with space in a name )

Try this again with UbuntuArtful and container will be created.

I tried it also with Turrris OS container and behaviour was the same.

1 Like

GUI doesn’t count on “names with spaces”, obviously. On UN*X/linux systems, there is strongly recomended use of file/folder names without spaces and/or other delimiters. Commonly used replacement of " " [SPACE] is “_” [UNDERSCORE]

I created issue here

1 Like

This is not a bug, in my point of view. Name of the container can be (as described in LXC documentation, for example here or here) alphanumeric string, that means only characters and numbers. No LXC util counts on spaces (lxc-start, lxc-stop, etc.) and can/will not work.

1 Like

I have not tested this, but what happens when you enclose the name in " (double quotation marks)?

Having said that; I would personally simply never use spaces in container names (or even in file-names for that matter, but that’s just me being old-fashioned I guess…).

In the end I agree with @vlk though; stick to the standard (for usability reasons the GUI could provide feedback to the user when an illegal character is used and/or fix erroneous input by character substitution though).

1 Like

Heh, true, not tested either and can’t test ATM, so I edit my previous post from “will not work” to “can/will not work” :slight_smile: - documentation says clearly alphanumeric string.

Honestly I don’t understand the need of making names of anything with spaces within them. Every time you need to work with them via command line or script, you are challenging troubles ;-). And any UN*X system is about command line, even if it is hidden behind GUI :-), but that is just mine, very personal, recomendation and point of view

Ah, my mistake then and I agree with you … I’ve reacted to topics “can’t create LXC containers in LuCI with space in a name” and statement “expected behavior: container will be created” -> so I thought you want to create a support for space in LXC containers names ;-(