The Sys.
A simple markdown blog viewer running on EC2. Built to stay focused.
What This Is
A Node.js/Express server that renders markdown files with a clean UI. All your personal docs (system reference, letters, blog posts) accessible via browser at port 3000.
Setup
Components:
- Express server (
server.js) - Serves markdown files as HTML - Request logging - Every visit logged to
access.log - systemd service - Runs as system service, auto-starts on boot, auto-restarts on crashes
Files:
server.js- Main server codepackage.json- Node dependencies*.md- Markdown files (your docs)access.log- Request logs (who's visiting, when, from where)server.log- Server output logs/etc/systemd/system/blog.service- systemd service configuration
Accessing the Blog
From work Mac (or any browser on same network):
http://[EC2-PUBLIC-IP]:3000
Get your EC2 public IP:
curl -s ifconfig.me
Useful Commands
Service Management:
# Check if running
sudo systemctl status blog
# Start/stop/restart
sudo systemctl start blog
sudo systemctl stop blog
sudo systemctl restart blog
# Disable/enable auto-start on boot
sudo systemctl disable blog
sudo systemctl enable blog
Viewing Logs:
# Server logs (startup, errors)
tail -f ~/yap/server.log
# Access logs (who's visiting)
tail -f ~/yap/access.log
# systemd logs
sudo journalctl -u blog -f
# Last 50 lines of systemd logs
sudo journalctl -u blog -n 50
After Making Changes:
# If you edit server.js or markdown files
sudo systemctl restart blog
# If you edit the service file (/etc/systemd/system/blog.service)
sudo systemctl daemon-reload
sudo systemctl restart blog
Access Log Format
Each line in access.log:
[timestamp] | [IP address] | [method] [URL] | [user agent]
Example:
2025-10-19T20:50:42.434Z | 127.0.0.1 | GET / | curl/8.5.0
2025-10-19T21:15:30.123Z | 192.168.1.100 | GET /blog-post-ssh-to-sanity.md | Mozilla/5.0...
How It Works
- systemd starts the service on boot (because we ran
systemctl enable blog) - server.js runs on port 3000, binding to
0.0.0.0(accessible from network) - Every request gets logged to
access.logvia middleware - Markdown files are converted to HTML using
markedlibrary - If server crashes, systemd automatically restarts it after 10 seconds
Adding New Docs
Just add a .md file to /home/ubuntu/yap/. It'll show up on the homepage automatically.
No restart needed - the server scans for markdown files on each homepage load.
systemd Service Configuration
Located at /etc/systemd/system/blog.service:
[Unit]
Description=The Sys - Blog Server
After=network.target
[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu/yap
ExecStart=/usr/bin/node /home/ubuntu/yap/server.js
Restart=always
RestartSec=10
StandardOutput=append:/home/ubuntu/yap/server.log
StandardError=append:/home/ubuntu/yap/server.log
[Install]
WantedBy=multi-user.target
What each part does:
After=network.target- Wait for network before startingUser=ubuntu- Run as ubuntu user (not root)Restart=always- Auto-restart if crashesRestartSec=10- Wait 10 seconds before restartingStandardOutput/StandardError- Append logs to server.logWantedBy=multi-user.target- Start on boot
Troubleshooting
Server not responding:
sudo systemctl status blog # Check if running
sudo journalctl -u blog -n 50 # Check for errors
After EC2 restart: Service should auto-start. If not:
sudo systemctl start blog
Port 3000 not accessible from browser:
- Check EC2 security group allows inbound TCP on port 3000
- Verify server is listening:
sudo netstat -tlnp | grep 3000
Can't write to access.log:
ls -l access.log # Check permissions
# Should be owned by ubuntu user
The System (What This Whole Thing Is About)
This blog documents a system for staying focused:
- Locked phone (parental controls, 4+ apps only)
- Parent Mac with sister (different state)
- EC2 server for dev work (SSH only, no GUI)
- No social media, no browser on personal devices
The markdown files in this directory are the core documentation for that system.
Read phone-system-reference.md to understand the full context.
Built With
- Node.js + Express
- marked.js (markdown to HTML)
- systemd (process management)
- Pure CSS (no frameworks)
Philosophy: Simple. No frameworks. No complexity. Just markdown files and a basic server.
Like the phone system - remove options, make it automatic.
Last updated: October 2025