Lightweight Self-Hosted Software Distribution System
A lightweight, self-hosted solution for versioned software distribution and automated updates. OmniUpdate provides both server and client components for seamless application version management.
- Server Component: REST API for serving versioned tar.gz archives
- Client Component: Automatic update checking and installation
- Version Management: Automatic sorting and validation of semantic versions
- Secure: Protected against directory traversal and path manipulation
- Cross-Platform: Works anywhere Node.js runs
- Desktop application auto-updates
- Mobile app patch distribution
- IoT device firmware management
- Internal tool deployment
- Game client version control
- Enterprise software distribution
- No third-party dependencies or services required
- Full control over your update infrastructure
- Simple integration with existing applications
- Open source and freely customizable
- Enterprise-ready security features
Simplify your software distribution with a self-hosted, reliable update system.
/Project-directory/
├── Package Updates/ # Server Component
│ ├── Updates-Server.js # Main server file
│ └── TARer.js # Archive utility
└── app/ # Application versions (hosted on server)
├── 1.0.0/ # Versioned application folders
├── 1.1.0/
├── 2.0.0/
└── 2.1.0/
/Project-directory/
├── Package Updates/ # Client Component
│ ├── Updates-Client.js # Main client file
│ └── TARer.js # Archive utility
└── app/ # Current application (will be replaced during updates)
- Node.js 18+
- npm or yarn
-
Server Setup
# On your version host server git clone https://github.com/Muad-Bohmosh/OmniUpdate.git cd OmniUpdate/"Package Updates" npm install express tar
-
Client Setup
# On client machines git clone https://github.com/Muad-Bohmosh/OmniUpdate.git cd OmniUpdate/"Package Updates client" npm install axios tar
-
Prepare Application Versions (on server)
# Create version folders in the server's app directory mkdir -p ../app/{1.0.0,1.1.0,2.0.0} # Add your application files to each version folder
cd "Package Updates"
# Set port via environment variable (optional)
export PORT=3000
node Updates-Server.jsServer will start on http://localhost:3000 (or specified PORT)
cd "Package Updates client"
# Set server URL (if different from default)
export UPDATE_SERVER_URL=http://your-server.com:3000
# Update to latest version
node Updates-Client.js
# Update to specific version
node Updates-Client.js 2.0.0
# Check for updates without applying
node Updates-Client.js --check| Endpoint | Method | Description |
|---|---|---|
/versions |
GET | List all available versions |
/updates?version={version} |
GET | Download specific version as tar.gz |
/health |
GET | Server health check |
# Basic update to latest
node Updates-Client.js
# Update to specific version
node Updates-Client.js 1.2.3
# Check for updates without applying
node Updates-Client.js --check
# Set custom server URL
export UPDATE_SERVER_URL=http://your-server.com:3000
node Updates-Client.jsServer:
PORT: Server port (default: 3000) - Optional for now
Client:
UPDATE_SERVER_URL: Server URL (default: http://localhost:3000)
Versions should follow semantic versioning format: X.Y.Z
- Example:
1.0.0,2.1.3,1.0.0-beta.1
- Directory traversal protection
- Path validation and sanitization
- Secure file handling
- Error handling and validation
- CORS support for cross-origin requests
OmniUpdate automatically:
- Discovers version folders in the server's app directory
- Sorts versions numerically (newest first)
- Validates version format (X.Y.Z)
- Tracks currently installed version on client
- Check: Client queries server for available versions
- Download: Client downloads the selected version as tar.gz
- Verify: Client validates the downloaded archive
- Replace: Client safely replaces the current application
- Record: Client records the new version in version.txt
# Test server endpoints
curl http://localhost:3000/versions
curl http://localhost:3000/health
# Test download
curl http://localhost:3000/updates?version=LATEST -o update.tar.gzWe welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📣 Use It as you please under LICENSE terms
Like everything else, I Built it Because I Needed it.
- Built with Express.js and Node.js
- Uses tar for archive operations
- Inspired by modern software update systems