Have you ever heard of LXC servers?


What is an LXC server?

LXC (Linux Containers) is an operating system-level virtualization technology used to create and manage containers on Linux systems. It allows isolating one or more applications and their dependencies in separate containers, each with its own file system, network, process space, etc. LXC provides a lightweight virtualization solution with lower overhead and faster startup time compared to traditional virtual machines.


An LXC server is a server that runs LXC technology. These servers use LXC to create and manage containers, allowing users to easily deploy, run, and manage multiple applications or services. LXC servers are commonly used in virtualized server environments, providing higher resource utilization and more flexible deployment options.

Further reading:

Not only LXC, but also LXD, what is LXD?#

LXD is a container management tool based on LXC that provides a simpler and more powerful way to manage Linux containers. LXD is built on top of LXC and provides additional features and tools to make container management and deployment easier.

Compared to traditional LXC, LXD has the following advantages and features:

  1. Ease of use: LXD provides a simple command-line interface and RESTful API that allows users to easily create, start, stop, delete, and manage containers.
  2. Performance: LXD offers more efficient container management, including faster startup time, lower resource consumption, and better performance.
  3. Security: LXD provides a range of security features, including container isolation, resource limitations, and access control, to protect the security of containers and the host system.
  4. Scalability: LXD supports clustering and distributed deployment, allowing users to easily scale and manage large container infrastructures.
  5. Overall, LXD provides a simple, efficient, and secure container management solution suitable for various scenarios, including development, testing, deployment, and operations.

Further reading:

Main Content:#

I previously wrote an article: Docker Installation of Multiple Baota + Business Ideas Everyone can take a look. This article can be considered as a follow-up.

I saw a virtual host selling Baota on Bilibili, but it is not a conventional virtual host. It has independent Root permissions and can build Java, Node, and Python projects other than PHP. At that time, I couldn't open the website of the sales platform, so I didn't experience it and didn't know the technical principles behind it.

Yesterday, I saw another advertisement with the same slogan, but there was no inventory. So I came to the first one and bought one to play with. I always thought it was using Docker to virtualize the virtual machine. Today, when I logged into the server, I found out that the system architecture is LXC (I saw it through the fusion monster benchmark script). At that time, I was verifying whether the system was running in a Docker container.


Both LXC and KVM can control the actual number of cores used by the virtual machine, and both the upstream and downstream bandwidth and disk can be controlled. However, KVM cannot oversell memory and hard disk directly, but it can be oversold through other methods. LXC is more abnormal. It seems that the hard disk cannot be oversold, but the memory can be oversold.

I saw on the One-Click LXD Script GitHub that the author said:

  • Tested: Oracle's 2C2G60G can open 30 1H512M1.5G
  • DigitalOcean's 4C8G160G, when the hard disk is not fully consumed, can open 135 1H512G2GSSD
  • Normally, a general 1C1G20GSSD VPS can open about 15

Although the script is based on LXD, the architecture of the virtual machine opened is still LXC. You can check it on GitHub: https://github.com/MXCCO/lxdpro

There is also another script: https://github.com/oneclickvirt/lxd This script has more detailed documentation. I played with it myself, but I didn't test the functionality of the VPS opened by the container carefully. I won't make many comments on stability, but the playability is very high, and it supports allocating IPv6 to the virtual machine, but I'm not sure about IPv4 allocation.

Pros and Cons:#

The created container may have no network. I tested it and found that disabling the firewall solved the problem.

The advantage is that you can oversell like crazy, and if you have a VPS, you can play with it. You don't need your server to support virtualization like opening KVM virtual machines. Each virtual machine can have a different system, and each system is a clean system with lower performance loss compared to Docker. It can also allocate the number of cores and actual usage of cores, limit bandwidth, disk, etc., like other virtualization technologies.

The disadvantage is that (no independent IPv4, I'm not sure if this can be considered a disadvantage, but IPv6 can be allocated.) It is a bit unstable. The Baota virtual host I purchased, I upgraded it to a cracked version in the terminal, and then restarted it in the service provider's console, and the server crashed directly. After reinstalling and upgrading, there were no problems, but the restart was a bit slow. Other disadvantages are currently unknown and not deeply understood.

For those who want to play, you can directly go to the GitHub above and use the script to play.

Business Ideas:#

I looked at it and realized that people have been selling LXC servers a few years ago. There are probably not many people selling them now, and the prices are relatively cheap and niche.

But as I wrote in the previous article Docker Installation of Multiple Baota + Business Ideas, you can reproduce it by replacing Docker technology with LXC. Create your own pre-installed cracked version of Baota image, and the idea is similar to this article. Map the SSH, FTP, and MySQL ports of the container to the host machine.

The LXC server I purchased is accessed by binding a domain name to another server. Let's stop here for now. I was constantly interrupted while writing this article...

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.