💾 Archived View for gemini.susa.net › notes_on_lxc.gmi captured on 2020-09-24 at 01:28:06. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2021-11-30)

-=-=-=-=-=-=-

LXC configuration notes

These are commands I use to manage my minetest container.

Show the config

~$ lxc config show minetest
architecture: x86_64
config:
  image.architecture: amd64
  image.description: Debian buster amd64 (20190924_05:24)
  image.os: Debian
  image.release: buster
  image.serial: "20190924_05:24"
  image.type: squashfs
  volatile.base_image: c3f9ea9ffec588fda978a3eb41cab91b9867c1ba204f0204e8b537d4d5686
  volatile.eth0.host_name: veth7c96a...
  volatile.eth0.hwaddr: 00:16:3e:3d:..:..
  volatile.idmap.base: "0"
  volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000, ...
  volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000, ...
  volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000, ...
  volatile.last_state.power: RUNNING
devices:
  mtserv:
    connect: tcp:127.0.0.1:30000
    listen: tcp:192.168.178.202:30000
    type: proxy
  mtsudp:
    connect: udp:127.0.0.1:30000
    listen: udp:192.168.178.202:30000
    type: proxy
ephemeral: false
profiles:
- default
stateful: false
description: ""

Specifically show network device config

~$ lxc config device show minetest
mtserv:
  connect: tcp:127.0.0.1:30000
  listen: tcp:192.168.178.31:30000
  type: proxy
mtsudp:
  connect: udp:127.0.0.1:30000
  listen: udp:192.168.178.31:30000
  type: proxy

Change some config

The following reconfigures listening IP/ports of the container, for example.

lxc config device set minetest mtserv listen=tcp:192.168.178.202:30000
lxc config device set minetest mtsudp listen=udp:192.168.178.202:30000