HUB
Sign inSign up

galteck/openvm

By galteck

•Updated 12 months ago

Image
0

108

galteck/openvm repository overview

ā šŸ–„ļø OpenVM

OpenVM is a lightweight, web-based Docker container manager that provides users with isolated virtual environments accessible via a web terminal.

Python Flask Docker License

⁠✨ Features

  • šŸ” User Management - Admin dashboard for creating/managing users
  • 🐳 Docker Containers - Each user gets isolated Docker containers
  • šŸ’» Web Terminal - Full PTY terminal access via browser (WebSocket)
  • šŸ“ File Explorer - Browse, upload, download, rename, delete files in containers
  • šŸ“Š Resource Monitoring - Real-time CPU, RAM, disk usage stats
  • āš™ļø Container Limits - Set RAM/CPU limits per container
  • šŸ“¦ Volume Management - Persistent storage with size limits
  • šŸ”’ User Blocking - Admins can block/unblock users

ā šŸš€ Quick Start

# Clone the repository
git clone https://github.com/GalTechDev/OpenVM.git
cd OpenVM

# Start with Docker Compose
docker-compose up -d

Then open http://localhost:5000⁠ and complete the setup wizard.

⁠Using Docker
docker run -d \
  --name openvm \
  -p 5000:5000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v openvm_data:/app/data \
  --privileged \
  galteck/openvm:latest
⁠Manual Installation
# Clone the repository
git clone https://github.com/GalTechDev/OpenVM.git
cd OpenVM

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
# or: venv\Scripts\activate  # Windows

# Install dependencies
pip install -r requirements.txt

# Run the application
python web_app.py

ā šŸ“‹ Requirements

  • Python 3.11+
  • Docker (installed and running)
  • Docker socket access (/var/run/docker.sock)

ā šŸ› ļø Configuration

On first launch, OpenVM will:

  1. Initialize the SQLite database
  2. Display a setup page to create the first admin account
  3. Detect Docker configuration (host mode or socket)

ā šŸ“ Project Structure

OpenVM/
ā”œā”€ā”€ web_app.py          # Main Flask application
ā”œā”€ā”€ docker_utils.py     # Docker CLI wrapper
ā”œā”€ā”€ manager.py          # CLI user management tool
ā”œā”€ā”€ server.py           # SSH server (optional)
ā”œā”€ā”€ templates/          # HTML templates
│   ā”œā”€ā”€ login.html
│   ā”œā”€ā”€ dashboard.html
│   ā”œā”€ā”€ admin.html
│   ā”œā”€ā”€ settings.html
│   └── setup.html
ā”œā”€ā”€ static/
│   ā”œā”€ā”€ css/style.css
│   └── js/
│       ā”œā”€ā”€ terminal.js
│       └── file_explorer.js
ā”œā”€ā”€ Dockerfile
ā”œā”€ā”€ docker-compose.yml
└── requirements.txt

ā šŸ”§ API Endpoints

⁠Admin Routes
MethodEndpointDescription
GET/adminAdmin dashboard
GET/api/admin/usersList all users
POST/api/admin/create_userCreate new user
POST/api/admin/delete_userDelete user
POST/api/admin/container/createCreate container
POST/api/admin/container/actionStart/stop/restart container
GET/api/admin/system_statsSystem resource stats
⁠User Routes
MethodEndpointDescription
GET/dashboardUser dashboard
POST/api/container/<action>Container actions
POST/api/container/filesList files
POST/api/container/uploadUpload file
GET/api/container/downloadDownload file
⁠WebSocket
NamespaceEventsDescription
/terminalconnect, input, resize, outputTerminal PTY connection

ā šŸ”’ Security Notes

  • Change the app.secret_key in production!
  • Use HTTPS in production (via reverse proxy)
  • Docker socket access grants significant privileges
  • Consider using Docker socket proxy for added security

ā šŸ“œ License

MIT License - See LICENSE⁠ for details.

Tag summary

Content type

Image

Digest

sha256:074b2c7e2…

Size

144.1 MB

Last updated

12 months ago

docker pull galteck/openvm