一位开发者将闲置的CMF Phone 1智能手机改造成个人服务器,用以替代原本的虚拟专用服务器。[1]该手机搭载八核ARM处理器、8GB内存、128GB存储、Wi-Fi 6和5G调制解调器。[1]作者保留了Android系统,在Termux环境中运行Linux应用,并通过chroot创建兼容容器实现应用隔离,而非采用Docker。[1]
为确保服务稳定运行,作者采取了多项关键配置措施。[1]系统启用了持久唤醒锁、禁用深度休眠和Wi-Fi防暂停功能,并将Tailscale配置为始终在线VPN。[1]使用runit进行服务管理,通过Ansible从Git仓库实现完整的基础设施即代码管理。[1]在网络方面,作者通过Cloudflare Tunnel处理HTTP应用的入站流量,并使用WebSocket包装Surf远程浏览器的TLS连接以支持移动性。[1]目前该手机已运行Surf远程浏览器、个人财务追踪器等多个应用服务。[1]
A developer has repurposed an unused CMF Phone 1 smartphone as a personal server to replace a traditional virtual private server, according to a post on Hacker News [1]. The device features an eight-core ARM processor, 8GB of memory, 128GB of storage, Wi-Fi 6, and a 5G modem [1].
Rather than flashing a complete Linux distribution onto the phone, the developer retained the Android operating system and deployed Linux applications within Termux, a terminal emulator that provides a Linux environment on Android [1]. To achieve application isolation without using Docker containers, the setup employs private mount namespaces and chroot technology [1]. Service management is handled through runit, with all configurations and versions controlled via Ansible directly from a Git repository [1].
The phone now hosts multiple applications, including Surf, a remote browser service, and a personal finance tracker [1]. To manage inbound traffic for HTTP applications, the setup utilizes Cloudflare Tunnel, while Surf's TLS connections are wrapped in WebSocket to support mobility [1]. Key system configurations include persistent wake locks, disabled deep sleep, Wi-Fi pause prevention, and Tailscale configured as an always-online VPN [1].