本来想实现打开 WebUI 中的 shell / VNC 自动登入的,似乎自动登入是默认行为? 不需要下面的动作了,这个是给连接了显示器的真正“终端”使用的

在创建第二个用户之后就不是这样了。

root@pve:~# ps -H w
    PID TTY      STAT   TIME COMMAND
 153979 pts/0    Ss     0:00 /bin/login
 154066 pts/0    S      0:00   -bash
 154096 pts/0    R+     0:00     ps -H w
    874 tty1     Ss+    0:00 /sbin/agetty -o -p -- \u --noclear - linux

原先设置是 ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear - $TERM
https://superuser.com/a/1423805/2170973
getty - ArchWiki

# systemctl edit getty@.service --drop-in=autologin
# cat /etc/systemd/system/getty@.service.d/override.conf  
[Service]  
ExecStart=  
ExecStart=-/sbin/agetty --login-options '-p -- \\u' --noclear --autologin root $TERM

2025-08-09 设置后在服务日志中出现异常,先禁用了

pve systemd[1]: getty@tty1.service: Scheduled restart job, restart counter is at 124.  
pve systemd[1]: Started getty@tty1.service - Getty on tty1.  
pve agetty[8765]: /dev/linux: cannot open as standard input: No such file or directory

安装 Portainer

On root@docker
docker network create --driver ipvlan --opt parent=eth0 --ipv6 \
    --subnet 192.168.2.0/24 \
    public
echo 'net.ipv6.conf.all.forwarding=1' > /etc/sysctl.d/ipv6-forward.conf
iptables -P FORWARD ACCEPT
 
step ca certificate portainer.home.kokomi.site certs/portainer.pem certs/portainer-key
 
docker run -d -p 9443:9443 -p 8000:8000 \
    --name portainer --restart always \
    --network public --hostname portainer \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v portainer_data:/data \
    -v /root/certs:/certs \
    portainer/portainer-ce:latest \
    --sslcert /certs/portainer.crt \
    --sslkey /certs/portainer.key \
    --http-disabled --bind-https :443