Skip to content

wleci/vps-configuration

Repository files navigation

 __          ___           _         _
 \ \        / / |         (_)       | |
  \ \  /\  / /| | ___  ___ _   _ __ | |
   \ \/  \/ / | |/ _ \/ __| | | '_ \| |
    \  /\  /  | |  __/ (__| |_| |_) | |
     \/  \/   |_|\___|\___|_(_) .__/|_|
                        | |
                        |_|

🚀 VPS Configuration Tool

The Ultimate Ubuntu VPS Management Solution

Streamline your server administration with an elegant, interactive CLI interface

TypeScript Node.js Ubuntu License

🎯 Features⚡ Quick Start📖 Documentation🤝 Contributing🌐 Website


💎 What Makes It Special?

🎨 Beautiful UI

Colorful, centered menus with ASCII art that make server management enjoyable

⚡ Lightning Fast

Built with TypeScript for performance and type safety

🔒 Secure by Default

Follows security best practices with confirmation prompts

📦 Zero Dependencies

Compile to standalone binary - no Node.js required on target

🎯 Intuitive

Menu-driven interface - no commands to memorize

🚀 Production Ready

Battle-tested on real Ubuntu servers

📋 Overview

VPS Configuration is a comprehensive, production-ready CLI tool that transforms complex Ubuntu VPS management into simple menu selections. Whether you're a seasoned sysadmin or just getting started, this tool provides a consistent, user-friendly interface for all your server administration needs.

Built with modern TypeScript and designed specifically for Ubuntu servers, it handles everything from user management and system updates to firewall configuration and programming language installations - all through an elegant, interactive interface.


🎬 Quick Demo

# One command to rule them all
npm run dev

Main Menu

                    ╭────────────────────────────────────────────────╮
                    │                                                │
                    │              ◆ VPS Configuration               │
                    │     CLI Tool: configuration • automation       │
                    │                                                │
                    ├────────────────────────────────────────────────┤
                    │  1. Users (add, remove, password)              │
                    │  2. System Update (update & upgrade)           │
                    │  3. Programming (Node, Python, PHP, etc.)      │
                    │  4. Packages (install/uninstall)               │
                    │  5. Configuration (SSH, UFW firewall)          │
                    │                                                │
                    │  0. Exit                                       │
                    ╰────────────────────────────────────────────────╯

✨ Why Choose VPS Configuration?

  • 🎯 User-Friendly: Interactive menus with clear descriptions - no commands to memorize
  • Lightning Fast: Built with TypeScript for optimal performance
  • 🔒 Secure: Follows security best practices
  • 📦 Portable: Compile to standalone binary
  • 🎨 Beautiful: Colorful, centered UI with ASCII art

🎯 Features

👥 User Management

  • List all system users with details (UID, shell)
  • Create new users with home directories
  • Set passwords during user creation
  • Change user passwords (root privileges)
  • Remove users with optional home directory deletion

🔄 System Updates

  • One-click system update (apt update)
  • Automatic package upgrade (apt upgrade -y)
  • Reboot notification when required
  • Real-time progress display

💻 Programming Languages

  • Node.js - NVM & Node.js installation
  • Python - Python & pip setup
  • PHP - PHP & Composer installation
  • Go - Go language setup
  • Rust - Rust & Cargo installation
  • Java - OpenJDK installation
  • Docker - Docker Engine setup

📦 Package Manager

  • Manage packages via config.yml
  • Add/remove packages from config
  • Bulk install from configuration
  • Smart uninstall (shows only installed packages)
  • Pre-configured with essential tools

⚙️ System Configuration

SSH Configuration

  • Change SSH port
  • Disable root login
  • View current SSH settings
  • Automatic service restart

UFW Firewall

  • Enable/disable firewall
  • Allow/deny specific ports
  • View firewall status and rules
  • Interactive port management

🚀 Installation

📥 Option 1: Download Pre-built Binary (Recommended)

No Node.js required! Just download and run:

# Download from releases page
wget https://github.com/wleci/vps-configuration/releases/download/v1.0.0/vps-configuration-linux-x64

# Make it executable
chmod +x vps-configuration-linux-x64

# Run it
sudo ./vps-configuration-linux-x64

💡 Tip: Check Releases page for the latest version


🛠️ Option 2: Build from Source

Prerequisites

  • Ubuntu 20.04 or newer
  • Node.js 18+ and npm
  • sudo privileges

Quick Start

# Clone the repository
git clone https://github.com/wleci/vps-configuration.git
cd vps-configuration

# Install dependencies
npm install

# Run in development mode
npm run dev

Build for Production

# Compile TypeScript
npm run build

# Run compiled version
npm start

Create Standalone Binary

# Build Linux x64 binary
npm run build:pkg

# Binary will be created at: build/vps-configuration-linux

📖 Usage

Development Mode

npm run dev

Production Mode

# After building
npm start

# Or run the binary directly
./build/vps-configuration-linux

Configuration

Edit config.yml to customize package list:

packages:
  - htop
  - curl
  - wget
  - git
  - vim
  - nginx
  # Add your packages here

🗂️ Project Structure

vps-configuration/
├── src/
│   ├── cli/
│   │   ├── logger/          # Logging utilities
│   │   └── menu/            # Main menu system
│   ├── scripts/
│   │   ├── users.ts         # User management
│   │   ├── system.ts        # System updates
│   │   ├── programming.ts   # Language installers
│   │   ├── packages.ts      # Package manager
│   │   └── configuration.ts # SSH & Firewall
│   ├── utils/
│   │   └── cli-style.ts     # Colors & styling
│   ├── types/
│   │   └── config.ts        # TypeScript types
│   ├── config/
│   │   └── index.ts         # App configuration
│   └── index.ts             # Entry point
├── config.yml               # Package configuration
├── tsconfig.json            # TypeScript config
└── package.json             # Dependencies

🛠️ Tech Stack

Technology Purpose
TypeScript Type-safe development
Node.js Runtime environment
tsx TypeScript execution
@yao-pkg/pkg Binary compilation
js-yaml YAML parsing
signale Beautiful logging
dotenv Environment variables

📚 Documentation

Menu Navigation

  • Use number keys to select options
  • Press 0 to go back or exit
  • Follow on-screen prompts for input

Security Notes

⚠️ Important: This tool requires sudo privileges for:

  • User management
  • System updates
  • Package installation
  • SSH configuration
  • Firewall management

Always review changes before confirming operations.

Package Configuration

The config.yml file stores your preferred packages:

packages:
  - package-name-1
  - package-name-2

Use the Package Manager menu to:

  1. View current list
  2. Add new packages
  3. Remove packages
  4. Install all at once
  5. Uninstall installed packages

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

# Fork and clone the repo
git clone https://github.com/wleci/vps-configuration.git

# Create a feature branch
git checkout -b feature/amazing-feature

# Make your changes and commit
git commit -m "Add amazing feature"

# Push to your fork
git push origin feature/amazing-feature

# Open a Pull Request

📝 License

This project is licensed under the ISC License.


👤 Author

Jakub Włosek

GitHub Website

Full-stack developer passionate about DevOps and automation


🙏 Acknowledgments

  • Built with ❤️ for the Ubuntu community
  • Inspired by the need for simple VPS management
  • Thanks to all contributors and users
  • Special thanks to the open-source community

⭐ Star this repo if you find it helpful!

⬆ back to top


Made with ☕ and TypeScript by Jakub Włosek

Simplifying server management, one menu at a time

About

vps-configuration

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published