A dedicated LXC on Proxmox is now prepared for the children’s Minecraft server and has been added as a server in Coolify. It has its own address in the server VLAN and separate resources. This entry records the setup commands, including a locale warning that appeared again. Deploying Minecraft itself is still to follow.
A dedicated LXC for Minecraft#
The Coolify instance already runs in
LXC 120 at 10.10.10.20. Minecraft gets a second LXC. This allows separate CPU
and RAM limits, and lets me restart or back up the Minecraft guest independently
of the management instance.
Proxmox manages the LXC. Coolify will connect to that guest through SSH and manage Docker there, with Minecraft running inside it. This does not require another Coolify installation. An LXC still uses the Proxmox host’s kernel; the basics are covered in Understanding LXC containers.
| Setting | Value |
|---|---|
| Proxmox node | pve01 |
| CT ID and hostname | 121, minecraft |
| System | Ubuntu 24.04 LTS, amd64 |
| CPU and RAM | 4 cores, 6144 MiB RAM |
| Storage | 32 GiB on local-lvm |
| Swap limit | 512 MiB |
| Container type | unprivileged |
| Additional features | nesting=1,keyctl=1 for Docker inside LXC |
| Address and gateway | 10.10.10.21/24, 10.10.10.1 |
| DNS and search domain | Pi-hole 10.10.10.3, xlab.internal |
These resources are a starting point for the family server. Actual requirements will depend on the edition, player count, view distance and mods, among other things.
Download the Ubuntu template#
All shell commands below run on the Proxmox host as root, in this case on
pve01. With pct exec 121 -- ..., the command after -- runs inside the new LXC;
there is no need to enter the container first.
This setup uses local for templates, local-lvm for the container disk and
vmbr0 as its bridge. Before repeating it, make sure CT ID 121 and IP address
10.10.10.21 are available. The address must be outside the dynamic DHCP pool
or have a matching reservation.
pveam update
MC_TEMPLATE=$(pveam available --section system \
| awk '$2 ~ /^ubuntu-24\.04-standard_.*_amd64/ {print $2; exit}')
pveam download local "${MC_TEMPLATE:?No Ubuntu 24.04 template found}"The template name comes from the current catalog, so the command does not hardcode a particular archive version. Proxmox: template management
Create and start the container#
After the download succeeds, run this in the same shell:
pct create 121 "local:vztmpl/${MC_TEMPLATE:?Template missing}" \
--hostname minecraft \
--ostype ubuntu \
--unprivileged 1 \
--features nesting=1,keyctl=1 \
--cores 4 \
--memory 6144 \
--swap 512 \
--rootfs local-lvm:32 \
--net0 name=eth0,bridge=vmbr0,ip=10.10.10.21/24,gw=10.10.10.1 \
--nameserver 10.10.10.3 \
--searchdomain xlab.internal \
--onboot 1 \
--start 1--start 1 starts the LXC immediately; --onboot 1 also starts it when the host
boots. --swap 512 sets the permitted swap limit; it does not create a swap file.
Proxmox: pct command reference
Server VLAN 10 is already carried
as the native, untagged VLAN on the Proxmox uplink. That is why net0 has no
additional tag=10. This setting belongs to my switch and bridge configuration;
an IP address in the server subnet alone does not establish VLAN membership.
Prepare SSH for Coolify#
Coolify needs an SSH connection to the new guest. The packages can be installed directly from the Proxmox host:
pct exec 121 -- apt-get update
pct exec 121 -- apt-get install -y openssh-server curl ca-certificates
pct exec 121 -- systemctl enable --now sshThe last command produced the same warning as the earlier Coolify LXC setup:
perl: warning: Setting locale failed.
LANG = "en_US.UTF-8"The locale was selected in the environment but was not available in the fresh container. That alone does not mean SSH failed to start.
Fix the locale warning#
This fix also runs from the Proxmox host:
pct exec 121 -- env LC_ALL=C apt-get install -y locales
pct exec 121 -- locale-gen en_US.UTF-8
pct exec 121 -- update-locale LANG=en_US.UTF-8Here, LC_ALL=C applies only to the package installation. Then locale-gen
generates the missing locale and update-locale sets the container default.
This resolved the warning.
Ubuntu: locales
Check SSH separately:
pct exec 121 -- systemctl is-active sshThe expected output is active. To open an interactive shell inside the LXC:
pct enter 121After pct enter, commands run directly inside the container. Use exit
to return to the Proxmox host.
Add the guest to Coolify#
The new server has now been added to the existing Coolify instance. The connection
uses the guest IP 10.10.10.21 and SSH port 22. To authenticate, the public part
of the SSH key stored in Coolify must be present in the Minecraft LXC’s
/root/.ssh/authorized_keys file.
In Coolify, the flow is Servers → Add → Manual. Enter 10.10.10.21 as the
server address, root as the user and select the matching SSH key. Through
Validate Server & Install Docker Engine, Coolify checks the connection and
can set up Docker on the guest. After successful validation, the server can be
selected as a deployment destination.
Coolify: add a server
Access for the children follows with deployment#
The Minecraft LXC stays in server VLAN 10, while the children’s devices stay
in Kids VLAN 25. The game will need a targeted
firewall exception from the
Kids network 10.10.25.0/24 to the new server IP 10.10.10.21, limited to the
game port. This rule must precede the general block from Restricted to Internal.
For a Java server using the default port, that would be TCP 25565. The rule must match the host port actually published; the Coolify Minecraft template maps that port to the game port inside the Docker container. The children then connect directly to the Minecraft LXC. Access from the home network needs no port forwarding on the internet connection.
The LXC preparation, locale fix and addition of the server in Coolify are complete. Choosing the Minecraft edition, deploying it with persistent world storage and backups, adding the firewall exception and testing a connection from the Kids network are still to follow.