Overview
Kooper Server (ks) is a small web server for working on websites on your own machine. It has a terminal UI where you browse your folders, choose the one to serve and open its pages in your browser, all from the keyboard. Save a file and the page in your browser updates.
ks # browse from the current folder; serve nothing yet
ks ~/sites/blog # serve a folder and open it
ks ~/sites/blog/a.html # serve the folder a.html is in, and open a.html
ks -s --port 3000 # serve the current folder on port 3000, no UIIt's one binary with no dependencies. Copying a URL uses pbcopy on macOS and clip.exe on Windows; on Linux and FreeBSD, install wl-clipboard, xclip or xsel.
Download
Kooper Server 1.0.0 — First Release · v1.0.0 · released 5 December 2026 · release notes · all releases
| macOS | Intel 4.0 MB Apple silicon 3.7 MB |
|---|---|
| Linux | x86-64 4.0 MB ARM64 3.6 MB |
| Windows | x86-64 4.1 MB ARM64 3.7 MB |
| FreeBSD | x86-64 4.0 MB |
Unpack the archive and put ks (ks.exe on Windows) somewhere on your PATH. SHA256SUMS has the checksum of every file: sha256sum -c SHA256SUMS --ignore-missing (shasum -a 256 -c on macOS).
The binaries aren't signed, so macOS may refuse to open one downloaded with a browser: allow it under System Settings → Privacy & Security, or run xattr -d com.apple.quarantine ks. On Windows, SmartScreen may ask you to choose More info → Run anyway.
go install github.com/colboycolinmeeks/kooperserver/cmd/ks@latestScreenshots
ks 1.0.0 http://127.0.0.1:8080/ serving ~/sites/blog · default page index.html · 8 requests 1 … Requests: the last 8, newest first TIME METHOD STATUS PATH TOOK 19:02:41 GET 404 /missing.css 100µs 19:02:41 GET 200 /walks.html 100µs 19:02:41 GET 404 /favicon.ico 100µs 19:02:41 GET 200 /css/site.css 100µs 19:02:41 GET 200 /about.html 100µs 19:02:41 GET 200 /img/kooper.jpg 200µs 19:02:41 GET 200 /css/site.css 200µs 19:02:41 GET 200 / 2.8ms ════════════════════════════════════════════════════════════════════════════════════════════════════ Request log 1 failed since this folder was served ↑↓ scroll · f shows only failed requests · L or esc goes back to the files Last request: 19:02:41 GET /missing.css 404 ↑↓ scroll f failures only L esc back to files q quit
Browsing never changes what's served
You can wander anywhere: go into folders, go up as far as you like, jump home. The server keeps serving whatever it was serving, or nothing. The line above the list shows where you are, and ● served marks the folder being served. Something is served only when you ask:
- by naming a folder or file on the command line;
- with
s, which serves the folder you're in and opens it in the browser; - with
Enteron a file, oroon anything, which opens it in the browser, first serving its folder if needed. If that would replace a folder you're already serving, the hint says so and you press the key twice.
x stops serving. Failed requests, such as a missing stylesheet, stay on the status line until you press a key, even while other requests succeed, so you won't miss them. The request log (L) shows the last 500 requests, and f filters it to failures.
Live reload
Save a file the page uses and the page reloads. Save a stylesheet and the new one is swapped in without a reload, so you keep your scroll position. Kooper Server only checks the files the browser actually loaded, a few times a second while a page is open, so even huge folders cost nothing.
It adds one <script> tag to HTML pages and keeps URLs under /__ks/ for itself. --no-reload turns this off and sends pages exactly as they are on disk. Switching or stopping the served folder reloads open pages too, so a tab showing "nothing served" turns into your site when you press s.
How files are served
- A folder's URL serves its
index.html, or else itsindex.htm. A folder with neither gets a list of its files to choose from. - It listens on
127.0.0.1:8080; if that port is taken it uses the next free one. - Files are sent with
Cache-Control: no-cacheand an exactETag: a reload always shows your latest edit, but unchanged files come back as a short "not modified" reply instead of being downloaded again. --spasends the site's index page for any page URL without a file, for single-page apps.
Keys
| Key | Action |
|---|---|
↑ ↓ / j k, pgup pgdn, g G | Move |
→ / l | Go into the folder under the cursor |
← / h / backspace / u | Go up a level |
enter | Open the file in the browser, or go into the folder |
o | Open what's under the cursor in the browser |
s / x | Serve the folder you're in / stop serving |
b | Open the served site's home page |
~ | Go to your home folder |
a | Show and serve hidden files |
/ | Filter the list as you type |
y / Y | Copy the URL / its address on your network |
L | Request log |
c | Switch colours (blue / black and white) |
w | What's new in this version |
? | Help: every key, and the version and build |
r / q | Refresh / quit |
Options
| Option | Meaning |
|---|---|
-p, --port N | Port to listen on (default 8080, or the next free one) |
--host ADDR | Address to listen on; 0.0.0.0 shares the site on your network |
--allow-host NAMES | More host names to answer to, such as a tunnel |
-n, --no-open | Don't open the browser |
-s, --serve | Serve without the UI, logging requests to the terminal |
-a, --all | Show and serve hidden files |
--follow-links | Serve through symlinks that lead out of the served folder |
--no-reload | Turn off live reload |
--spa | Single-page app mode |
--theme NAME | blue (default) or bw |
-v, --version | Print the version, release and build information |
KS_HOST, KS_ALLOW_HOST and KS_THEME set the defaults, and KS_BROWSER picks the browser, for example KS_BROWSER="firefox --new-tab".
Safe by default
Kooper Server is for development, not production, but it's careful anyway:
- Only what you ask for is served. It listens on 127.0.0.1 only, and serves nothing until you choose a folder.
- Broad folders take two presses. Serving your home folder or the top of a disk needs the key pressed twice, and the title warns while it's served.
- Web pages can't read your files. To block DNS rebinding attacks it only answers requests addressed to
localhost,*.localhostor an IP address, unless you allow another name. - Hidden files such as
.gitand.envare neither listed nor served unless you ask. - Symlinks can't reach outside the served folder unless you start it with
--follow-links. - Listings stay out of search engines if you share through a tunnel.
- Only
GETandHEADare allowed, and every response saysX-Content-Type-Options: nosniff.
Building from source
Kooper Server needs Go 1.27 or later.
make # build bin/ks
make run ARGS=~/sites/blog
make serve ARGS=~/sites/blog # without the UI
make check # gofmt check, vet, tests with the race detector
make release # cross-compile for macOS, Linux, Windows, FreeBSD
make package # release archives and SHA256SUMS in dist/