Lightweight SSH & SFTP Manager: Web Terminal, File Explorer (ZIP/Upload).
2.7K
A modern, lightweight, and secure web-based SSH connection manager. Manage your servers directly from your browser with a built-in terminal and a full-featured file manager.
š Source Code: GitHub Repositoryā
services:
ssh-manager:
image: alexmaltz/ssh-manager:latest
container_name: ssh-manager
ports:
- "8080:8080"
volumes:
- ./data:/root/data
environment:
- APP_ENV=prod
- DB_TYPE=sqlite
- SESSION_SECRET=[CREATE_A_SECRET]
- ENCRYPTION_KEY=[GENERATE_32_BYTE_HEX]
- INITIAL_ADMIN_USER=admin
- INITIAL_ADMIN_PASSWORD=admin
restart: unless-stopped
services:
app:
image: alexmaltz/ssh-manager:latest
ports:
- "8080:8080"
environment:
- APP_ENV=prod
- DB_TYPE=postgres
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=ssh_db
- DB_USER=postgres
- DB_PASSWORD=postgres_pass
- SESSION_SECRET=[CREATE_A_SECRET]
- ENCRYPTION_KEY=[GENERATE_32_BYTE_HEX]
depends_on:
- db
db:
image: postgres:16
environment:
POSTGRES_DB: ssh_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres_pass
volumes:
- ./pg_data:/var/lib/postgresql/data
docker run -d \
-p 8080:8080 \
-e APP_ENV=prod \
-e DB_TYPE=sqlite \
-e ENCRYPTION_KEY=[YOUR_KEY] \
-e SESSION_SECRET=[YOUR_SECRET] \
-v $(pwd)/data:/root/data \
--name ssh-manager \
alexmaltz/ssh-manager:latest
The service is fully compatible with PWA standards. You can "install" it via your browser (Chrome/Edge/Safari) to use it as a native-like application.
To enable Push Notifications, you need to provide VAPID keys. You can generate them using the following command (or any online tool):
# Example using npx (web-push)
npx web-push generate-vapid-keys
Once generated, add VAPID_PUBLIC_KEY and VAPID_PRIVATE_KEY to your environment variables.
Tip: You can also configure
PUSH_TTL(Time To Live). This defines how long (in seconds) the push server (Google/Apple) will keep the message if the user's device is offline. Default is3600(1 hour).
| Variable | Description | Default |
|---|---|---|
APP_ENV | Application environment (prod or debug). If prod, cookies are sent only over HTTPS | debug |
PORT | Web interface port | 8080 |
DB_TYPE | Database type (postgres or sqlite) | sqlite |
DB_NAME | DB name (or filename for sqlite) | ssh_manager |
ENCRYPTION_KEY | (Required) 32-byte Hex key for AES-256 | - |
SESSION_SECRET | (Required) Secret key for signing session cookies | - |
SESSION_TIMEOUT | Max life for abandoned sessions (e.g., 10m, 1h) | 10m |
CLEANUP_INTERVAL | Cleanup frequency for dead sessions (e.g., 2m) | 2m |
INITIAL_ADMIN_USER | Admin username on first startup | admin |
INITIAL_ADMIN_PASSWORD | Admin password on first startup | admin |
VAPID_PUBLIC_KEY | Public key for Push Notifications (Base64) | - |
VAPID_PRIVATE_KEY | Private key for Push Notifications (Base64) | - |
VAPID_EMAIL | Contact email for Push Notifications (e.g., mailto:[email protected]ā ) | - |
PUSH_TTL | Time-to-live for notifications in seconds | 3600 |
The application uses the APP_ENV variable to handle session security:
debug): Suitable for local testing. Cookies are sent over plain HTTP.prod): Recommended for public servers. Enables the Secure flag on cookies.
prod mode, the app requires HTTPS (except on localhost). Accessing via IP or non-secure domain will result in login failure.To run the application, you need to generate two random keys using your terminal:
openssl rand -hex 32
openssl rand -base64 32
Warning: Losing your
ENCRYPTION_KEYwill make it impossible to decrypt existing SSH keys stored in the database.
When adding a new host, you can specify:
/var/www/html or /home/user/logs).ENCRYPTION_KEY.The built-in file manager allows you to:
ENCRYPTION_KEY, the data is useless.bcrypt.Content type
Image
Digest
sha256:d6a24bc5aā¦
Size
15.6 MB
Last updated
6 months ago
docker pull alexmaltz/ssh-manager