Skip to content

halilcengel/p22

Repository files navigation

p22

p22

A web-based remote server management tool with SSH file browsing, terminal access, and Docker administration — all from your browser.

Named after port 22, the default SSH port.

Node.js React License

Why p22?

Managing remote servers often means juggling multiple SSH terminals, SCP/SFTP clients, and separate Docker tools. p22 brings all of that into a single web interface:

  • Connect to any SSH server — manage all your remote machines from one dashboard
  • No SSH client needed — deploy p22 and access your servers from any device with a browser
  • Manage multiple servers — add all your connections and switch between them instantly
  • Edit files, check logs, restart Docker containers — all without leaving your browser
  • Self-hosted & lightweight — run it locally or on a server, no heavy dependencies

Screenshots

Add Server

Save your connections with password or SSH key authentication.

Add Server

File Explorer & Editor

Browse files, edit with Monaco Editor, and use the integrated terminal.

File Explorer

Docker Management

Manage containers, images, volumes, networks and stream logs in real-time.

Docker

Features

  • SSH Connection Manager — Save and manage multiple server connections with password or private key authentication
  • Remote File Browser — Browse, create, rename, and delete files and folders on remote servers via SFTP
  • Code Editor — Edit remote files with Monaco Editor (VS Code's editor engine) with syntax highlighting
  • Web Terminal — Full terminal emulation in the browser powered by xterm.js
  • Run Scripts — Execute scripts directly on the server with support for Shell, Python, Node.js, Go, C/C++, Ruby, PHP, and more
  • Docker Management — List, start, stop, restart, inspect, and remove containers, images, volumes, and networks
  • Docker Compose — Discover compose projects and manage services (up, down, restart)
  • Container Logs — Stream container logs in real-time

Quick Start

With Docker (Recommended)

git clone https://github.com/halilcengel/p22.git
cd p22
docker compose up -d

The app will be available at http://localhost:3001.

To manage Docker on the host machine, the Docker socket is mounted into the container. If you only need SSH features, you can remove the socket volume from docker-compose.yml.

Manual Setup

git clone https://github.com/halilcengel/p22.git
cd p22
npm install

Development (with hot-reload):

npm run dev

Frontend runs on http://localhost:5173, backend on http://localhost:3001.

Production:

npm run build
npm start

App runs on http://localhost:3001.

Tech Stack

Layer Technology
Frontend React, Vite, Monaco Editor, xterm.js
Backend Node.js, Express, WebSocket (ws)
SSH ssh2
Database SQLite (better-sqlite3)
Docker Docker, Docker Compose

Project Structure

p22/
├── src/                    # React frontend
│   ├── components/
│   │   ├── docker/         # Docker management UI
│   │   └── modals/         # Dialog components
│   ├── hooks/              # React hooks
│   ├── api.js              # API client
│   ├── dockerApi.js        # Docker API client
│   └── App.jsx             # Main application
├── server/                 # Node.js backend
│   ├── routes/             # REST API routes
│   │   ├── connections.js  # Connection CRUD
│   │   ├── sessions.js     # SSH session management
│   │   ├── files.js        # Remote file operations
│   │   └── docker.js       # Docker operations
│   ├── terminal.js         # WebSocket terminal handler
│   ├── runner.js           # WebSocket command runner
│   ├── db.js               # SQLite setup
│   └── index.js            # Server entry point
├── docker-compose.yml
├── Dockerfile
└── package.json

Configuration

Variable Default Description
PORT 3001 Backend server port

Connection credentials are stored in a local SQLite database at data/connections.db, created automatically on first run.

Contributing

Contributions are welcome! Feel free to open issues and pull requests.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages