15年,一台服务器,8GB内存和50万用户 – Webminal如何屹立不倒
15 years, one server, 8GB RAM and 500k users – how Webminal refuses to die

原始链接: https://community.webminal.org/t/15-years-one-server-8gb-ram-and-500k-users-how-webminal-refuses-to-die/8803

## webminal.org:一个持续15年的Linux学习平台 webminal.org是一个非常坚固的在线平台,自2011年以来一直在浏览器中提供真实的Linux终端,运行在一个单独的8GB CentOS服务器上——没有云服务、微服务或自动扩展。该网站由一位自学Linux的开发者创建,旨在为练习命令和系统管理技能提供一个无风险的环境。 最近,webminal.org经过重新设计,采用了现代、轻量级的前端,现在提供“Root Labs”,利用用户模式Linux实现完全root权限和使用`fdisk`和`systemctl`等工具进行真实练习。一个实时命令滴答器显示匿名化的实时用户活动,由eBPF提供支持。 该平台使用一种故意过时的(但功能完善!)技术栈构建——Python 2.7、Flask 0.12.5和令人惊讶的强大的Shellinabox,已经服务了超过50万用户。完全由创始人的个人储蓄资助,webminal.org仍然是免费的,优先考虑学生的可访问性,并继续运行,只要它能帮助哪怕一个学习者。该项目正在寻求赞助,以升级服务器资源并扩展对其流行的Root Labs的访问权限。

## Webminal:在极简资源下坚持15年 Webminal (webminal.org) 仅用一台服务器、8GB内存,却令人瞩目地运行了15年,目前已服务50万用户。该项目源于资金有限的必要性,优先考虑巧妙的优化而非横向扩展。 其成功的关键在于用户模式Linux (UML),以及SELinux、XFS等技术,以及细致的资源管理(如MySQL配额)。创始人最初在家中托管服务器,依靠Linux社区的信任,之后迁移到云提供商,利用可用额度。 该服务提供基于浏览器的终端,因其易用性和零配置而备受推崇,尤其吸引初学者。尽管由于服务器位置(新加坡)存在延迟,但该项目仍在蓬勃发展,证明了一个“足够好”的解决方案,加上一个专注的社区,可以胜过资源密集型的替代方案。它证明了足智多谋的工程技术,并提醒人们互联网的 simpler 时代。该项目目前由Github Sponsors支持。
相关文章

原文

The server

webminal.org runs on a single CentOS Linux box with 8GB RAM. That’s it. No Kubernetes, no microservices, no auto-scaling. One server since 2011. It has survived:

  • A datacenter fire in 2021 (we lost 150k user accounts)
  • Multiple power outages in the Netherlands
  • That one time in 2017 when a Spanish tech blog sent 10,000 users in one day
  • My friend Freston’s insistence that Slackware is the only real distro

The idea

The idea was simple. I was sitting at my Windows machine at work, wanting to learn Linux. What if I could open a browser, practice on a real Linux terminal - no “Run” button, no “Execute” button, just a real server- gain the confidence, and then spin my chair to a real Linux machine and actually use it? No fear, no hesitation, because I already know what I’m doing.

What’s new

We just gave the entire site a redesign. Every page, from scratch. Here’s what changed:

  • New modern UI - clean, fast, no Bootstrap or jQuery CDN dependencies. Self-hosted fonts, mobile responsive.

  • Root Lab - practice real sysadmin skills with full root access. We use User Mode Linux to give you a complete kernel with real block devices. Practice fdisk, LVM, RAID, mkfs, systemctl,crontab, firewalld, SSH keys, awk & sed - things you can’t do on a shared terminal.

  • Live command ticker - that scrolling bar on the homepage? It’s real. Powered by eBPF (execsnoop) tracing commands in real-time. 28 million and counting.

The journey

Linode → DigitalOcean → AWS → GCP → OVH → IBM Cloud → Linode

Full circle. Along the way we built: a browser IDE with VS Code/Theia, Docker-over-LXC root environments, Asciinema screencasting, a shared file pool, ttyrec-to-GIF publishing, a custom useradd binary (the default was too slow with 300k+ users), and an OpenVZ-based VM provisioning system. Some still running, some killed by time or money.

The co-founder I never saw

I’m from India. Freston is from the Netherlands. We met on LinuxForums.org in 2010. Until 2015, we had never seen each other’s face — not even on Skype. All communication happened over SSH into our server in a screen session.

$ screen -x chat
$ cat > /dev/null
hey, should we add MySQL support?

That’s how an entire platform was built. No Slack, no Zoom, no Jira tickets. Just two guys writing messages in a terminal.

The tech stack nobody recommends

Python:       2.7 (yes, really)
Framework:    Flask 0.12.5
Terminal:     Shellinabox (abandoned in 2017, still works perfectly)
Root labs:    User Mode Linux (a technology from 2001)
Monitoring:   eBPF/execsnoop (the only modern thing)
Database:     MySQL on a server that survived a fire
Frontend:     No React, no Vue, no npm. Just HTML and inline CSS.

Every tech conference talk would tell you this stack is wrong. But it serves 500k users and has been up for 15 years.

Shellinabox vs the world

We tried replacing Shellinabox with the modern WebSocket-based terminal. It lasted a few hours in production before users reported blank screens and Firefox incompatibility.

Shellinabox is from 2005. It’s ugly, it’s slow, and it works through every firewall, proxy, and corporate network on earth. We switched back. Sometimes the old thing is the right thing.

User Mode Linux — the technology nobody uses

Everyone uses Docker. We use User Mode Linux — a full Linux kernel running in userspace, created by Jeff Dike in 2001.

Why? Because when a student types fdisk /dev/sdb, they need a real block device. Docker can’t give you that. UML can.

Each user gets:

  • A full Linux kernel (not a container, an actual kernel)
  • 4 virtual block devices (64MB each) for practicing LVM, RAID, fdisk
  • 256MB RAM
  • Copy-on-write overlay - one golden image shared by everyone

When the student types poweroff, the UML exits, and they’re back in their normal shell. Total isolation. Zero risk to the host.

The COW overlay means 100 concurrent users add only ~2GB of disk. The golden image is shared.

eBPF - the one modern thing

That 28,469,041 commands executed counter on the homepage? It’s real. We use execsnoop2 from bcc-tools.

The live ticker you see scrolling on the homepage — those are real commands being typed by real users right now. Anonymized, safe commands only. No arguments, no paths, no passwords. Just $ ls, $ gcc, $ vim flowing by like a heartbeat.

The Linux kernel itself tells us when someone runs their first ls.

What users say

“I am a Windows system admin without a lot of free time and this site has really helped me get familiar with Linux. I even use the site on my tablet. The tutorials you offer are really great too. Thanks for all you do.”

“I am a student studying Electronic Engineering in Korea. I am studying Linux by your site and it really helped me a lot!”

“The tutorial is great! I also laughed at some points. Your site is absolutely amazing. Please make more! Keep the great work up!”

Cost

Webminal has zero revenue. No ads, no tracking, no VC funding. I pay for the server from my savings. I’ve spent more money on this project than on personal or family stuff.

More than once, I thought about killing it. 15 years is a long time. There were months when I was between jobs, watching my savings shrink, and the server bill kept coming. Every month I’d think - maybe this is the month I pull the plug. Then I’d get a job, the thought would go away, and Webminal would live another year. I applied to YC. Rejected. Tried to monetize - PayPal, Stripe, paid plans. Never worked. The users who need Webminal most are students who can’t afford $4/month. So it stays free.

500,000 people have typed their first ls on Webminal. Some of them are sysadmins now. Some run their own servers. One of them probably manages more infrastructure than I ever will.

As long as it helps a single student, Webminal will run.

If you want to help to upgrade from 8GB to 128GB so more students can run root labs at the same time. Every bit counts: Sponsor @Lakshmipathi on GitHub Sponsors · GitHub

.

联系我们 contact @ memedata.com