Skip to content

Straightforward interface to control the containers for your docker home server.

License

Notifications You must be signed in to change notification settings

ftsiadimos/SimpleDockerWebui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

53 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿณ LightDockerWebUI

LightDockerWebUI Logo

A lightweight, elegant web interface for Docker container management

Docker Pulls License: MIT Python Flask Bootstrap


๐ŸŽฏ Overview

LightDockerWebUI is a clean, fast, and simple web-based Docker management tool designed for home servers, development environments, and small deployments. No complex setup โ€” just run and manage your containers from any browser.

โœจ Features

๐Ÿ“Š Dashboard

  • Real-time container status
  • Quick status indicators (running, stopped, paused)
  • Port mappings with clickable links
  • Container images and names at a glance

๐ŸŽฎ Container Control

  • Start / Stop / Restart containers
  • Delete containers with confirmation
  • Bulk actions on selected containers
  • Instant feedback with flash messages

๐Ÿ“ Live Logs

  • Real-time log streaming
  • Auto-scroll with manual override
  • Timestamp display
  • Search and filter logs

๐Ÿ’ป Web Terminal

  • Interactive shell access:
    • Full server SSH terminal (via Terminal under Configuration)
    • Interactive container shell (full PTY via xterm.js) accessible from Containers โ†’ Terminal

๐ŸŒ Multi-Server Support

  • Connect to multiple Docker hosts
  • Easy server switching via dropdown
  • Local socket or remote TCP
  • Persistent server configuration

๐Ÿ“ฑ Responsive Design

  • Mobile-friendly interface
  • Tablet optimized
  • Touch-friendly controls
  • Works on any screen size

Screenshot

Dashboard

Dashboard โ€” View and manage all containers


๐Ÿš€ Quick Start

Get up and running in 30 seconds:

docker run -d --restart unless-stopped \
 -p 8008:8008 --name=DockerManager \
 -v $(pwd)/instance:/app/instance \
 ftsiadimos/lightdockerwebui:latest

Then open http://localhost:8008 in your browser. That's it! ๐ŸŽ‰


๐Ÿ“ฆ Installation Options

๐Ÿณ Docker (Recommended)
# Pull and run
docker pull ftsiadimos/lightdockerwebui:latest

docker run -d --restart unless-stopped \
-p 8008:8008 \
--name=DockerManager \
-v $(pwd)/instance:/app/instance \
ftsiadimos/lightdockerwebui:latest
๐Ÿ“„ Docker Compose
# docker-compose.yml
version: '3.8'

services:
  DockerManager:
    image: ftsiadimos/lightdockerwebui:latest
    container_name: DockerManager
    ports:
      - "8008:8008"
    volumes:
      - ./instance:/app/instance
    restart: unless-stopped
docker-compose up -d
๐Ÿ From Source (Development)
# Clone repository
git clone https://github.com/ftsiadimos/lightdockerwebui.git
cd lightdockerwebui

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

# Install dependencies
pip install -r requirements.txt

# Run application
flask run --host=0.0.0.0 --port=8008

โš™๏ธ Configuration

Connecting to Docker Hosts

LightDockerWebUI supports multiple Docker servers. Configure them through the web UI:

  1. Click Config in the navigation bar
  2. Add servers with a display name and connection details:
    • Local: Leave host empty to use /var/run/docker.sock
    • Remote: Enter IP/hostname and port (default: 2375 or 2376)
  3. Select the active server from the dropdown

Server Terminal (SSH)

  • A full interactive server terminal is available via the Terminal menu (under Configuration)
  • Container terminals are full PTY shells (using xterm.js) available from the Containers page; the legacy limited command terminal has been removed

Environment Variables

Variable Default Description
`FLASK_DEBUG` `0` Enable debug mode (development only)
`SECRET_KEY` (random) Flask secret key for sessions
`SQLALCHEMY_DATABASE_URI` `sqlite:///serverinfo.db` Database connection string

Exposing Remote Docker Daemon

To manage containers on a remote host, enable TCP on the Docker daemon:

# Create systemd override
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo tee /etc/systemd/system/docker.service.d/override.conf << EOF
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375
EOF

# Reload and restart
sudo systemctl daemon-reload
sudo systemctl restart docker

โš ๏ธ Security Warning: Use TLS (port 2376) for production. Unencrypted connections should only be used on trusted networks.


๐Ÿ—๏ธ Project Structure

lightdockerwebui/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ __init__.py          # Flask application factory
โ”‚   โ”œโ”€โ”€ main.py              # Routes, WebSocket handlers
โ”‚   โ”œโ”€โ”€ models.py            # SQLAlchemy models (DockerServer)
โ”‚   โ”œโ”€โ”€ forms.py             # WTForms (AddServer, SelectServer)
โ”‚   โ”œโ”€โ”€ static/              # CSS, JavaScript, images
โ”‚   โ””โ”€โ”€ templates/           # Jinja2 HTML templates
โ”œโ”€โ”€ config.py                # Flask configuration classes
โ”œโ”€โ”€ start.py                 # Application entry point
โ”œโ”€โ”€ requirements.txt         # Python dependencies
โ”œโ”€โ”€ Dockerfile               # Container build file
โ””โ”€โ”€ docker-compose.yml       # Compose configuration

๐Ÿ› ๏ธ Development

# Clone and setup
git clone https://github.com/ftsiadimos/lightdockerwebui.git
cd lightdockerwebui
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt

# Run with hot reload
export FLASK_DEBUG=1
flask run --host=0.0.0.0 --port=8008

Production deployment tips โš™๏ธ

For production use we recommend running Gunicorn with the threaded worker class and a higher timeout to avoid workers being killed during occasional slow operations. Example command:

# Example Gunicorn command (used in Dockerfile / docker-compose)
/usr/local/bin/gunicorn -b :8008 -k gthread --workers 3 --threads 4 --timeout 120 start:app

Also ensure the Docker Python SDK is available in the environment where the app runs (needed to talk to Docker):

pip install docker

Tech Stack

  • Backend: Flask 3.x, Flask-SQLAlchemy, Flask-Sock
  • Frontend: Bootstrap 5.3, DataTables, jQuery
  • Database: SQLite (persistent server configuration)
  • Container: Docker SDK for Python

๐Ÿค Contributing

Contributions are welcome! Here's how:

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

๐Ÿ“„ License

This project is licensed under the MIT License โ€” see LICENSE for details.


๐Ÿ’ฌ Support & Links

๐Ÿ› Report Bug โ€ข ๐Ÿ’ก Request Feature โ€ข ๐Ÿณ Docker Hub

โญ Star this repo if you find it useful! โญ


Made with โค๏ธ by Fotis Tsiadimos

About

Straightforward interface to control the containers for your docker home server.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published