{"id":27595686,"url":"https://github.com/rawpair/rawpair","last_synced_at":"2025-04-22T12:16:49.117Z","repository":{"id":287414121,"uuid":"961314348","full_name":"rawpair/rawpair","owner":"rawpair","description":"Real-time collaborative dev environment with shared terminal and code editor. Runs in isolated containers on your own infrastructure.","archived":false,"fork":false,"pushed_at":"2025-04-18T22:49:24.000Z","size":468,"stargazers_count":55,"open_issues_count":24,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T06:03:01.251Z","etag":null,"topics":["code-editor","collaborative-development","docker","elixir","monaco-editor","pair-programming","phoenix","remote-dev","self-hosted","terminal-sharing","tmux","ttyd","yjs"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rawpair.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-06T08:47:10.000Z","updated_at":"2025-04-18T23:56:49.000Z","dependencies_parsed_at":"2025-04-11T16:25:33.252Z","dependency_job_id":null,"html_url":"https://github.com/rawpair/rawpair","commit_stats":null,"previous_names":["rawpair/rawpair"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawpair%2Frawpair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawpair%2Frawpair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawpair%2Frawpair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawpair%2Frawpair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rawpair","download_url":"https://codeload.github.com/rawpair/rawpair/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250237844,"owners_count":21397403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-editor","collaborative-development","docker","elixir","monaco-editor","pair-programming","phoenix","remote-dev","self-hosted","terminal-sharing","tmux","ttyd","yjs"],"created_at":"2025-04-22T12:16:48.626Z","updated_at":"2025-04-22T12:16:49.110Z","avatar_url":"https://github.com/rawpair.png","language":"Elixir","readme":"# RawPair™\n\n[![Status: Pre-alpha](https://img.shields.io/badge/status-pre--alpha-orange)]()\n[![License: MPL-2.0](https://img.shields.io/github/license/rawpair/rawpair)](LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/rawpair/rawpair?style=social)](https://github.com/beyond-tabs/rawpair/stargazers)\n\n**RawPair™** is a self-hosted, real-time collaborative development environment.\nIt enables you to spin up isolated containers with a shared terminal and code editor for effective pair (or mob) programming.\n\nBuilt for fast, focused collaboration on your own infrastructure, RawPair also supports use cases like remote development, penetration testing, and red teaming, as long as it's done ethically and with proper authorization.\n\n**Join the Discord**: [discord.gg/muGYzJg3Aj](https://discord.gg/muGYzJg3Aj)\n\n---\n\n![image](https://github.com/user-attachments/assets/f4c790d9-6db7-47ec-9778-39687755ea93)\n\n\n---\n\n## Features\n\n- Collaborative code editing and shared terminal session in the browser\n- One container per session, fully isolated from others\n- Licensed under MPL v2.0\n\n---\n\n## Tech Stack\n\nRawPair is built on a modern, production-grade foundation:\n\n- [Phoenix](https://github.com/phoenixframework/phoenix) ([Elixir](https://github.com/elixir-lang/elixir)) - handles real-time collaboration and session management\n- [Monaco](https://github.com/microsoft/monaco-editor) + [Yjs](https://github.com/yjs/yjs) - collaborative code editing in the browser\n- [ttyd](https://github.com/tsl0922/ttyd) + [tmux](https://github.com/tmux/tmux) - shared terminal sessions\n- [docker](https://github.com/docker) - isolated containers per user session\n- [Nginx](https://github.com/nginx/nginx) - reverse proxy and traffic routing for ttyd\n- [PostgreSQL](https://github.com/postgres/postgres) - workspace metadata persistence\n- [Vector](https://github.com/vectordotdev/vector) + [Loki](https://github.com/grafana/loki) + [Grafana](https://github.com/grafana/grafana) - observability for logs and metrics\n- [Portainer CE](https://github.com/portainer/portainer) - (optional) convenient docker management\n\n---\n\n## Supported Tech Stacks\n\n| Stack                                                    | Docker Repository                                                                     | Notes                                          |\n|----------------------------------------------------------|---------------------------------------------------------------------------------------|------------------------------------------------|\n| **[Ada](https://www.gnu.org/software/gnat/)**            | [rawpair/ada](https://hub.docker.com/repository/docker/rawpair/ada)                   | Includes GNU GNAT                              |\n| **[Clojure](https://clojure.org/)**                      | [rawpair/clojure](https://hub.docker.com/repository/docker/rawpair/clojure)           | Runs on Temurin (OpenJDK)                      |\n| **[COBOL](https://gnucobol.sourceforge.io/)**            | [rawpair/gnucobol](https://hub.docker.com/repository/docker/rawpair/gnucobol)         | Includes GNU COBOL                             |\n| **[Elixir](https://elixir-lang.org/)**                   | [rawpair/elixir](https://hub.docker.com/repository/docker/rawpair/elixir)             |                                                |\n| **[Haskell](https://www.haskell.org/)**                  | [rawpair/haskell](https://hub.docker.com/repository/docker/rawpair/haskell)           | Includes GHC                                   |\n| **[Julia](https://julialang.org/)**                      | [rawpair/julia](https://hub.docker.com/repository/docker/rawpair/julia)               |                                                |\n| **[.NET](https://dotnet.microsoft.com/)**                | [rawpair/dotnet](https://hub.docker.com/repository/docker/rawpair/dotnet)             | Includes C#, F#, VB.NET, Mono                  |\n| **[Liberty Eiffel](https://www.liberty-eiffel.org/)**    | [rawpair/liberty-eiffel](https://hub.docker.com/repository/docker/rawpair/liberty-eiffel) | Compiled from [source](https://github.com/LibertyEiffel/Liberty) |\n| **[Node.js](https://nodejs.org/)**                       | [rawpair/node](https://hub.docker.com/repository/docker/rawpair/node)                 | Managed via NVM                                |\n| **[OCaml](https://ocaml.org/)**                          | [rawpair/ocaml](https://hub.docker.com/repository/docker/rawpair/ocaml)               | Includes OPAM, OCaml 4.14.1, Dune, Menhir      |\n| **[PHP](https://www.php.net/)**                          | [rawpair-php](https://hub.docker.com/repository/docker/rawpair/php)                   | Includes FPM/CLI; PHP 8.0–8.3                  |\n| **[Python](https://www.python.org/)**                    | [rawpair/python](https://hub.docker.com/repository/docker/rawpair/python)             | 2 base images available: Trixie; NVIDIA CUDA   |\n| **[Ruby](https://www.ruby-lang.org/en/)**                | [rawpair/ruby](https://hub.docker.com/repository/docker/rawpair/ruby)                 |                                                |\n| **[Rust](https://www.rust-lang.org/)**                   | [rawpair/rust](https://hub.docker.com/repository/docker/rawpair/rust)                 |                                                |\n| **[Smalltalk](https://www.gnu.org/software/smalltalk/)** | [rawpair/gnusmalltalk](https://hub.docker.com/repository/docker/rawpair/gnusmalltalk) | Includes GNU Smalltalk                         |\n| **[Steel Bank Common Lisp](https://www.sbcl.org/)**      | [rawpair/sbcl](https://hub.docker.com/repository/docker/rawpair/sbcl)                 | Includes SBCL and Quicklisp                    |\n\nCan't see your favourite stack? Submit a PR or create an issue.\n\n---\n\n## System Requirements\n\nTo run RawPair smoothly in a self-hosted environment, you'll need:\n\n- 64-bit Linux host (Debian/Ubuntu recommended), works also on a Raspberry Pi\n- Docker (version 20.10+)\n- Docker Compose (v2+)\n- At least 2 CPU cores and 4 GB RAM (8 GB recommended for multiple sessions)\n- Persistent storage for PostgreSQL and logs\n- Optional (but recommended): Domain + TLS for secure public access (via Nginx or a reverse proxy)\n\n---\n\n## Set up\n\nIn case you haven't yet installed Erlang and Elixir.\n\n```bash\nasdf plugin add erlang\nasdf install erlang 27.3.2\nasdf set -u erlang 27.3.2\n\nasdf plugin add elixir\nasdf install elixir 1.18.3\nasdf set -u elixir 1.18.3\n```\n\n## An important note on Docker images\n\nRawPair provides Docker images to make development environments easier to spin up and work with—especially for collaborative or short-lived sessions. These images prioritize convenience over minimalism: they include a full toolchain, reasonable defaults, and everything needed to get started without extra setup. They're not security-hardened or optimized for production use, and that's by design.\n\nTo work properly with RawPair, containers **must** include the following packages:\n\n- `bash` - for shell consistency\n- `tmux` - to manage terminal sessions\n- `supervisor` - to coordinate background services\n- `vector` - to stream logs to the host\n- `ttyd` - to expose the terminal over HTTP\n\nThese are essential for enabling terminal access, log streaming, and reliable session orchestration. You're welcome to customize the images, but omitting these components will likely break core functionality. In short: build your own, but build smart.\n\nAdditionally, three configuration files are required for proper orchestration: `supervisord.conf`, `ttyd-wrapper.sh`, and `vector.toml`. These are provided in the `docker/` folder of the repository and should be copied into your image during the build process. They set up the necessary services and log routing for the container to behave as expected inside the RawPair environment.\n\nYou're welcome to customize the images, but omitting these components will likely break core functionality. In short: build your own, but build smart.\n\n### A note on named volumes\n\nAny files saved in `/home/devuser/app` will persist in the associated named volume. Everything else will be discarded when the container stops.\n\n## Quick Start (Development)\n\n```bash\ngit clone https://github.com/rawpair/rawpair\ncd rawpair\ndocker compose up -d\ncd phoenix-app\nmix deps.get\ncd assets\nnpm i\ncd ..\nmkdir -p priv/static/assets\n./dev.sh\n```\n\nThen open [http://localhost:4000](http://localhost:4000) to begin.\n\n## Quick Start (Production)\n\nSet the required ENV variables, based on `phoenix-app/.env.example`.\n\nThen run:\n\n```bash\ngit clone https://github.com/rawpair/rawpair\ncd rawpair\ndocker compose up -d\ncd phoenix-app\n./deploy.sh\n./start.sh\n```\n\nRefer to [deployment instructions/guidelines](./DEPLOYMENT.md) and [Ansible playbooks](./ansible/README.md)\n\n**Important**: You should generate your own `SECRET_KEY_BASE`\n\n```bash\nmix phx.gen.secret\n```\n\nThen open [http://localhost:4000](http://localhost:4000) to begin.\n\nIt is advisable to use a reverse proxy in production.\n\n---\n\n## How to scroll the terminal?\n\nttyd terminals run in the browser and don't support mouse scrollback.\nTo scroll, press:\n\n`Ctrl-b` followed by `[`\n\nIt is now possible to use the mouse wheel or the arrow keys. Press `q` to exit scroll mode.\n\n---\n\n## Security considerations\n\n### Mounting /var/run/docker.sock\n\nRawPair does **not** require Docker socket access by default. However, the current Phoenix backend uses System.cmd/3 to invoke Docker directly via the CLI. For this to work, the process must have permission to run docker commands, typically by having access to the Docker daemon—either directly on the host or via a mounted socket.\n\nIf you mount `/var/run/docker.sock` into the container running Phoenix (e.g., for local development), you're granting that container **full control over the host's Docker daemon**. This effectively means **root access to the host**. It's powerful, convenient, and generally unsafe in shared or exposed environments.\n\nFor safer setups, consider using [docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy), a minimal Go-based HTTP proxy that lets you expose only specific Docker API endpoints to containers. This allows for fine-grained access control, so you can limit what the Phoenix backend is allowed to do.\n\nUse socket access only if you understand the risks, and only in environments where trust boundaries are clear.\n\n---\n\n## Architecture Overview\n\n- **Phoenix** handles session logic, orchestration, and WebSocket communication\n- **Docker** is used to manage isolated workspace containers\n- **ttyd** provides web-based terminal access\n- **Monaco + Yjs** power the collaborative code editor\n- **Nginx** handles access to ttyd\n- **Volumes** allow optional persistent or disposable file systems\n\n---\n\n## Security Considerations\n\nRawPair provides real-time terminal and editor access to others via containers. Please use responsibly.\n\n\u003e - **Do not expose the service to the public internet without authentication**  \n\u003e - **Do not allow unknown users into active sessions**  \n\u003e - **Ensure Docker is secured on your host system**\n\n---\n\n## License\n\nThis project is licensed under the **Mozilla Public License 2.0 (MPL-2.0)**.\nIf you modify any source files covered by this license, you must make those files available under the same license, but you may combine them with proprietary code in separate files.\n\nSee [`LICENSE`](LICENSE) for details.\n\nThe RawPair™ name and logo are trademarks of Andrea Mancuso.  \nSee [TRADEMARK.md](./TRADEMARK.md) for details.\n\n---\n\n## Legal and Ethical Use\n\nRawPair is intended strictly for **authorized, collaborative development** and **educational** purposes.  \nAny use of this software to perform unauthorized access, surveillance, or exploitation of remote systems is **forbidden** and may violate applicable laws.\n\nYou are solely responsible for how you use this software.\n\nBy using RawPair, you agree to comply with all relevant laws and to use the software **only in environments where you have explicit permission**.\n\nThis project is licensed under the [Mozilla Public License 2.0](https://www.mozilla.org/MPL/2.0/), which ensures that **any modifications to MPL-licensed files must remain open-source**, while still allowing broader integration with proprietary systems.\n\n---\n\n## Contributing\n\nContributions are welcome. Please open issues and submit pull requests through GitHub.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawpair%2Frawpair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frawpair%2Frawpair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawpair%2Frawpair/lists"}