[TUTORIAL] Using a TCP/Telnet Serial Console for Proxmox VMs

longer

Member
Jun 23, 2026
73
22
8
.
As mentioned in the Serial Terminal wiki [0], you can configure a VM's serial console to listen on a local TCP port instead of the default socket:
Qemu also supports binding the emulated serial port to a telnet server. Look for the -chardev parameter in the qemu-kvm manual page. (With proxmox you would then use the "args:" parameter in vm.conf to specify extra args.) This would allow you to telnet to your host on a specific port to get a serial console. As with every telnet traffic remember that nothing is encrypted, so I wouldn't do this in a production setup.
By doing this, the Proxmox VE host exposes the VM's serial console through a raw TCP socket bound to the configured TCP port, which you can connect to using tools like telnet, nc, or socat

Tested with an AlmaLinux VM:
  • Manually edit the VM configuration and add the following parameter:
    Bash:
    root@pve:~# cat  /etc/pve/qemu-server/100.conf                
    args: -chardev socket,id=serial0,host=127.0.0.1,port=5555,server=on,wait=off,telnet=on -serial chardev:serial0
    ...
    See man qemu [1] for the details about -chardev.

  • Test to connect via telnet:
    Bash:
    root@pve ~# telnet 127.0.0.1 5555
    Trying 127.0.0.1...
    Connected to 127.0.0.1.
    Escape character is '^]'.
    
    AlmaLinux 8.10 (Cerulean Leopard)
    Kernel 4.18.0-553.76.1.el8_10.x86_64 on an x86_64
    
    Activate the web console with: systemctl enable --now cockpit.socket
    
    test1-alma login:

  • The full vm config for reference:
    Bash:
    root@pve ~# cat  /etc/pve/qemu-server/100.conf                
    args: -chardev socket,id=serial0,host=127.0.0.1,port=5555,server=on,wait=off,telnet=on -serial chardev:serial0
    boot: order=scsi0;net0
    cores: 2
    cpu: x86-64-v2-AES
    memory: 4096
    meta: creation-qemu=10.0.2,ctime=1755527854
    name: test1-alma-18-65
    net0: virtio=AA:XX:XX:XX:XX:F4,bridge=vmbr0,firewall=1
    numa: 0
    onboot: 1
    ostype: l26
    scsi0: local-zfs:vm-100-disk-0,iothread=1,size=12G
    scsihw: virtio-scsi-single
    ...

Check the article Set Up a Serial Terminal and/or Console in Red Hat [2] for more information.

Note:
You need to configure the entire serial section using the argument lines as shown above, which means you don't need to add the socket via the GUI.

Again Note:
Telnet is not secure, it sends data (including your passwords) in plain text over the network. To keep your system safe, always leave the host setting as 127.0.0.1 so it can only be accessed from inside the Proxmox machine itself. Never use this on a public network.


[0] https://pve.proxmox.com/wiki/Serial_Terminal
[1] https://manpages.debian.org/trixie/qemu-system-x86/qemu-system-x86_64.1.en.html
[2] https://access.redhat.com/articles/3166931#config910
.
 
Last edited:
Although everything is correct, why would you prefer the manual way over the UI way of configuring it? The UI way has already nice integration into the UI for the console to open the serial console in a browser windows. Accessing it over an unencrypted socket is as you already wrote a VERY bad idea. You can just access it via ssh -tq <pve> qm terminal <vmid> in a secure way if you want CLI.

By doing this, the Proxmox VE host exposes the VM's serial console through a Telnet server bound to the configured TCP port.
It's no telnet server, it's just a socket. You can access it via telnet or nc or socat or whatever you want even pure bash could work.
 
  • Like
Reactions: Onslow
Although everything is correct, why would you prefer the manual way over the UI way of configuring it? The UI way has already nice integration into the UI for the console to open the serial console in a browser windows. Accessing it over an unencrypted socket is as you already wrote a VERY bad idea. You can just access it via ssh -tq <pve> qm terminal <vmid> in a secure way if you want CLI.


It's no telnet server, it's just a socket. You can access it via telnet or nc or socat or whatever you want even pure bash could work.
Thanks for the input, you are completely right that a raw socket is not a Telnet server, and that it can be accessed via nc or socat.
I will edit it with that.


Although everything is correct, why would you prefer the manual way over the UI way of configuring it?
The reason for doing this is i encountered for specific external automation and legacy tools. it required a dedicated TCP port listener and cannot natively interact with Proxmox internal nix socketsm, browser UI or the qm terminal CLI.
 
The reason for doing this is i encountered for specific external automation and legacy tools. it required a dedicated TCP port listener and cannot natively interact with Proxmox internal nix socketsm, browser UI or the qm terminal CLI.
It should just work like that. PVE will create a socket on the filesystem with a predicatble name you can interact with. Just plug nc in there and you will have a network socket. Without any edit on the VM config side. You can also just use qemu-guest-agent for automating the VM, you can run commands through it so that you won't even have to configure a serial console. I love serial console too, but also SSH and cloudinit exist for automating.