gotty: the official container runs a writable shell
Share your terminal as a web application
At a glance
- What is it?
- A command line tool that serves your terminal to a browser over a websocket. The readme is careful about the security model, and the default configuration honours that care: clients cannot type. The container image does not. It starts a writable interactive shell as its entry point, which is the opposite setting on the same binary.
- Who is it for?
- This is a small tool with a well-documented risk surface, and the readme tells you plainly that permitting remote input is dangerous for most commands. Take the documentation literally rather than the defaults.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.
Star history
- sorenisanerd/gotty2,574 ★ · +26
| Repository | 2026-09-30 | 2026-11-22 |
|---|---|---|
| sorenisanerd/gotty | 2.5k | 2.6k |
26 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The default listener is every interface, and the image overrides the one safety setting
The option list says the listen address defaults to all interfaces, on port 8080.
The readme then states the security default clearly: clients cannot send keystrokes or commands, with the single exception of resizing the terminal window.
Those two facts together describe a service that is reachable from the whole network and that anyone can watch. For a tool whose purpose is to share a terminal, that is not a small exposure. The command you run prints whatever it prints, and a read-only view of it is still a view of whatever your terminal is doing at that moment.
The container definition then changes one of those two defaults, and it changes the one that matters:
CMD ["gotty", "-w", "bash"]That flag is the permit-write switch, and its own help text describes it as dangerous and shouts about it in capitals. So the published image, built by the project's own Dockerfile, starts a writable interactive shell as its default process, with the credential option off and the random-URL option off.
Nothing else in the readme contradicts the security guidance. It is one line in a build file, and it happens to select the exact configuration the readme spends a section warning against.
The mitigation the readme recommends cannot be set from the command line
The security section offers a hierarchy of options and is honest about their relative strength.
The first is simply not permitting write access, which is the default. The second is a credential for basic authentication, which the readme immediately qualifies: the credentials travel between the server and clients in plain text. The third is transport-layer security, and it is described as client certificate authentication for stricter cases.
Here is the problem. The option list has six entries: the listen address, the port, the base path, the write switch, the credential, and the random URL string. There is no transport security flag.
So the strongest mitigation the document offers is reachable only through the configuration file, where it appears as a boolean that enables TLS. A user who has read the security section and is running the binary from a shell has no way to act on the third option at all.
That is an odd omission for a feature the readme thinks is important enough to recommend. It suggests the configuration file was written first and the command-line surface was added afterwards without revisiting which flags were worth promoting.
Three mitigations exist and all three default off, while the bind address defaults open
It is worth putting the security surface on one page, because the defaults point in one direction and the available controls point in the other.
Three things restrict access. A random string can be appended to the path, so the URL is not guessable. A username and password can be required. And write access can be left disabled.
All three default to off. Meanwhile the listen address defaults to every network interface and the port defaults to a fixed, well-known number.
The result is a default posture where the only protection is the unguessability of the address of the machine, which on most networks is not unguessable at all. A random path segment would fix that in one flag, and it defaults off.
Two of the three are per-client concerns and one is per-session, which means they compose poorly. A shared read-only session is protected by nothing. A writable session with a credential is protected by plain-text basic auth. A writable session on a loopback address needs none.
The readme's advice for sharing with multiple clients is to start the tool inside a terminal multiplexer. That is the right instinct and it sidesteps the whole question, because the multiplexer owns the session and the tool is a window onto it.
The options table in the readme is generated from the binary
The readme's option list is not written by hand. The build file has a target that runs the built binary with its help flag, strips everything above the global options heading, and splices the remainder into the readme with a script.
That is good practice. The defaults shown in the documentation are the defaults the binary actually has, because they were copied out of it. And the annotation after each option in brackets is the command-line framework's own convention for naming the environment variable that sets it.
Which means something the readme never says in prose: every listed option also has an environment variable equivalent, named after it with a prefix. The listen address, the port, the base path, the write switch, the credential, and the random-URL switch can all be set from the environment, and the documentation reveals this only as punctuation in a generated block.
The repository root also contains the project's own configuration file, and the readme points at it as the reference for the full list of options. So the canonical configuration documentation is a file that configures the tool it documents, which is tidy and also means you cannot tell from that file which options are meant for general use.
The fork depends on a commit from 2015 in its original author's own fork
The readme credits the original project and its author by name, and says plainly that the tool would not exist without him.
The dependency list explains what that means in practice. Among seven direct dependencies, one is a configuration-format library hosted under the original author's account, pinned to a pseudo-version. A pseudo-version of zero minor and patch with a build suffix encodes a date and a commit hash, and the date it encodes is in 2015.
So the maintained fork parses its configuration file with a decade-old commit of a library that its own upstream author forked. That is not necessarily a problem; the format is stable and the library is small and has no dependencies. But it does mean the configuration parser is the one part of this project that cannot be updated through normal dependency management without forking someone else's fork.
The other direct dependencies are current and well chosen: a websocket library, a pseudoterminal library, a gzip handler for the web side, a configuration-struct helper, a command-line framework, and an error package. That last one is the community's traditional error wrapper, and its own repository has been archived in favour of the standard library's built-in errors, which have covered the same ground since a Go release in the middle of the last decade.
A Go binary with a JavaScript bundle embedded in it, which needs Node to build
The release artefact is a single binary with no runtime dependencies, and the build that produces it needs a JavaScript toolchain.
The build file has an assets target that copies static files from a resources directory into a generated directory and then invokes the JavaScript bundler. The bundler's output and its source map are produced by webpack, run over the sources in a JavaScript subdirectory, with a dependency install step first if the modules are not present.
The container definition makes the dependency explicit with a first stage on a Node image that builds the bundle, and a second stage on a Go image that copies the built JavaScript and the installed modules across before building the binary with cgo disabled. The generated files are committed to the repository alongside the sources they are built from.
The cgo line is the interesting part. Disabling it is what makes the binary portable and what lets the final image be a minimal Linux distribution with no C library, which is the right trade. The cost is a build that spans two languages and two images for a tool that ships as one file.
The cross-compilation target list is similarly unglamorous and slightly dated: four Unix-likes and macOS, at an ARM architecture version of 5, which is the oldest 32-bit ARM the Go toolchain will still emit code for.
The formatting check reformats your working tree and then reports failure
The test target is one line and it is wrong in a way that will annoy someone.
It runs the formatter across every package except a vendor directory, captures the output, counts the lines, and exits with an error if the count is greater than zero. Then it runs the tests.
The formatter's behaviour is to rewrite the files it formats and print the names of the files it changed. So the count is non-zero exactly when the working tree was not correctly formatted, and the formatter has just fixed it. The check therefore fails while silently leaving the tree in a passing state.
The second run passes, which means a developer running the suite twice sees a green result and concludes everything is fine. A continuous integration job with a fresh checkout fails every time any file is unformatted, which is the intended outcome, and the developer is left with a modified working tree they did not intend to commit as part of a test run.
The intended shape is the standard one: check formatting without writing, fail if it differs, and never mutate during verification. The rest of the build file is careful about incremental behaviour, so this reads as an oversight rather than a philosophy.
Editorial conclusion
This is a small tool with a well-documented risk surface, and the readme tells you plainly that permitting remote input is dangerous for most commands. Take the documentation literally rather than the defaults. Two things to change before you run it anywhere but your own machine. First, bind the listener to loopback unless you genuinely need remote access, because the default address is every interface. Second, if you do need it, put it behind a real authenticating proxy rather than using the built-in basic-auth credential, which the readme says travels in plain text. And if you are evaluating it against a newer alternative, note that this is a maintained fork of an older project and much of its dependency graph is inherited rather than chosen.
Frequently asked questions
What is sorenisanerd/gotty?
A command line tool that turns a terminal program into a web application, serving the session over a websocket so you can watch it in a browser. It is written in Go, with the browser client embedded in the binary, and it is a maintained fork of an earlier project by a different author.
What does gotty allow by default?
By default clients cannot send keystrokes or commands, with the only exception being terminal window resizing. The listen address defaults to all network interfaces on port 8080, so the session is reachable from the local network unless you change it.
How do I let remote clients type into a gotty session?
Pass the permit-write switch. The readme warns that accepting input from remote clients is dangerous for most commands and suggests starting the tool inside a terminal multiplexer and running the command on that instead, so the multiplexer owns the session.
Can gotty use TLS?
Yes, but only through the configuration file, where a boolean setting enables it. There is no command-line flag for it, so a user following the readme's recommendation for stricter authentication cannot apply it while running the binary from a shell.
What does the official gotty container image run?
Its default command is the tool with the permit-write switch and an interactive shell as arguments, so the published image starts a writable session rather than the read-only default the readme describes. It also sets no credential and no random path.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/sorenisanerd-gotty)Star history chart for your README
[](https://hysenlabs.com/projects/sorenisanerd-gotty)Was this useful?