Lxc with some page

If i have more than one webpage. It better one lxc container for every webpage or its better only one lxc conteiner interfaces with all webpage

I would recommend you to keep each website in their own container, some of the advantages to do so are:

  • it provides better security and isolation between them
  • easy to backup/recover using snapshots (otherwise it takes more time to revert a single website if you have many in a single container).
  • its easier to copy websites and do modifications (like updates, tests) to them in a separated environment.
  • Creating new websites is easier by copying a base container with all prepared software.
  • its easier to maintain (e.g. shutting down or removing specific sites, installing specific software, etc)
  • Server configuration is more simple (as you just have to take care of a single webpage per container).
  • You can give the final user shell access to their own space if required, without exposing other websites.
  • You can control limits (cpu, memory, hdd) for each website.


  • Updating web server, database server and other tools have to be done in all containers (easy to fix with a script).
  • It may take more resources (more memory, more hdd space)
  • migration to another server may take more time as each of the containers need to be moved (instead of a single one).