How to create Wordpress configuration LXC

Hi,

I have a problem, I want to create 2 containers :

  • First container with Nginx and PHP
  • Second container with MySQL and Wordpress

But I don’t know how to do this.

Thanks in advance.

Almost forgot: Do you really mean LXC?
Or LXD?
LXD is a lot easier to use imo.


Start with the getting started guide: https://linuxcontainers.org/lxd/getting-started-cli/

All you need for this is bascially:

  • start containers
  • install & configure the software inside containers (to automate this, you can use cloud-init for example)
  • use port-forwarding (so it can be accessed by your host or from outside, or whatever purpose you want):
    For port-forwarding you can use proxy devices for example (will forward traffic between host<=>container).
    Or you can use a different network type like macvlan to allow direct access to your container from your LAN.

For network access between containers it should be sufficient to add them to the same network :thinking:.

Hi,

Thanks for this information but I use Proxmox, can I create this with Proxmox ?

Edit: See answer from stgraber below:

Proxmox wraps around LXC much the same way LXD does, the end user doesn’t directly interact with LXC.

I don’t really see what the problem here is.
Just create two containers, install the services you wish in whatever container.

Proxmox should provide images for some of the most common distributions, then follow the instructions from whatever distribution you chose to actually install those services.

Most often this just involves installing packages with apt-get or similar tooling, just as you would inside a virtual machine or a physical server.

Interesting, ok then @Ragna you should look at proxmox documentation and ask further questions there :slight_smile:.