← 전체로 돌아가기
프로젝트 메모 linux -home-son

son-wtr server config

GUI 다 날리고 headless 서버로 변신시킨 기록

ubuntuheadlessvncxfceserver

son-wtr machine setup (Ubuntu 24.04, ZFS root)

headless server conversion

systemctl set-default multi-user.target

  • multi-user.target: CLI 부팅 (headless)
  • graphical.target: GUI 부팅 (원복할 때 사용)

GNOME 삭제 (지저분해서 다 밀어버림)

apt purge gdm3 gnome-shell ubuntu-desktop apt autoremove --purge

*주의: autoremove 돌리면 필수 유틸까지 같이 날아갈 수 있음. apt-mark manual [package]로 미리 살려둬야 함. - fdisk, gdisk, fonts-noto-cjk, cloud-init 등 - 삭제 전 apt-get -s로 뭘 지울지 미리 확인 필수

Remote Desktop (XFCE + TightVNC)

vncserver@1.service

  • display :1 (port 5901)
  • geometry 1280x800
  • xstartup에서 startxfce4 실행하도록 설정
  • systemd로 부팅 시 자동 부활

Network info

  • LAN IP: 192.168.1.121
  • UFW: 5901 포트 허용됨

여기서 배울 것

  1. GUI 날릴 때 autoremove 조심할 것. 필수 패키지 apt-mark manual로 박아두기
  2. headless 서버는 multi-user.target으로 부팅함
  3. VNC는 systemd 서비스로 등록해두면 편함
원본 파일 보기 (.claude/projects/-home-son/memory/son-wtr-server-config.md)
---
name: son-wtr-server-config
description: "How the son-wtr machine is configured as a headless server (CLI boot, XFCE/VNC, GNOME removed)"
metadata: 
  node_type: memory
  type: project
  originSessionId: c591e3d9-1cf7-482b-a934-46b7e9bc6fca
---

`son-wtr` is a bare-metal Ubuntu 24.04 box (ZFS root: `rpool/ROOT/ubuntu_cbj4ty`) installed from the desktop ISO but used as a server.

On 2026-06-15 it was converted from GUI-boot to headless:
- Default boot target set to `multi-user.target` (CLI). Revert with `sudo systemctl set-default graphical.target`.
- GNOME fully removed (gdm3, gnome-shell, ubuntu-desktop + ~244 orphans via `apt autoremove --purge`).
- Remote desktop is XFCE over TightVNC. Autostarts on boot via `vncserver@1.service` (`/etc/systemd/system/vncserver@.service`), display `:1`, port `5901`, geometry 1280x800. Config in `~/.vnc/` (xstartup runs `startxfce4`).
- LAN IP `192.168.1.121` (other 172.x are Docker bridges). UFW active, 5901 allowed.

**Why:** wanted a minimal server that boots to CLI but keeps occasional VNC access.

**How to apply:** When removing a desktop on Ubuntu, `apt autoremove` after GNOME removal also pulls base utils as orphans — protect keepers first with `apt-mark manual` (here: fdisk, gdisk, fonts-noto-cjk for Korean, cloud-init, cloud-guest-utils). Always simulate with `apt-get -s` and grep for xfce/vnc/ssh/network/xorg before purging.