{"id":17918969,"url":"https://github.com/wellwelwel/svps","last_synced_at":"2025-08-26T06:37:38.309Z","repository":{"id":47601021,"uuid":"456824934","full_name":"wellwelwel/svps","owner":"wellwelwel","description":"🚀 An easier tool to automate your Ubuntu Server setup and domain forwarding.","archived":false,"fork":false,"pushed_at":"2024-08-28T10:31:53.000Z","size":252,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-09T16:54:06.949Z","etag":null,"topics":["devops","hosts","kvm","rdp","server","setup","sftp","ssh","ubuntu","virtual","vps"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wellwelwel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["wellwelwel"]}},"created_at":"2022-02-08T07:20:09.000Z","updated_at":"2024-12-31T18:08:54.000Z","dependencies_parsed_at":"2023-10-10T18:39:21.607Z","dependency_job_id":"92536073-a576-4308-8d71-708b15bffb81","html_url":"https://github.com/wellwelwel/svps","commit_stats":{"total_commits":58,"total_committers":1,"mean_commits":58.0,"dds":0.0,"last_synced_commit":"7ab4894e138c5c981cd2da9ae81f1a9702b6ad1c"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/wellwelwel/svps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wellwelwel%2Fsvps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wellwelwel%2Fsvps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wellwelwel%2Fsvps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wellwelwel%2Fsvps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wellwelwel","download_url":"https://codeload.github.com/wellwelwel/svps/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wellwelwel%2Fsvps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272186211,"owners_count":24888333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","hosts","kvm","rdp","server","setup","sftp","ssh","ubuntu","virtual","vps"],"created_at":"2024-10-28T20:13:45.538Z","updated_at":"2025-08-26T06:37:38.286Z","avatar_url":"https://github.com/wellwelwel.png","language":"TypeScript","funding_links":["https://github.com/sponsors/wellwelwel"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eSVPS - Simplifying VPS\u003c/h1\u003e\n  \u003cp\u003e🚀 An easier tool to automate your \u003cb\u003eUbuntu Server\u003c/b\u003e setup and domain forwarding\u003c/p\u003e\n  \u003ca href=\"https://www.npmjs.com/package/svps\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/svps?style=flat\" alt=\"npm\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/wellwelwel/svps/actions/workflows/ci.yml?query=branch%3Amain\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/wellwelwel/svps/ci.yml?event=push\u0026style=flat\u0026label=ci\u0026branch=main\" alt=\"GitHub Workflow Status (with event)\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/svps\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/svps?style=flat\" alt=\"npm\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/wellwelwel/svps/blob/main/LICENSE\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/wellwelwel/svps/main/.github/assets/readme/license.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Table of Contents\n\n- [About](#about)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Automatic Installations](#automatic-installations)\n    - [Available **auto-installation**](#available-auto-installation)\n    - [Notes](#notes)\n  - [Personal Commands (Queuing)](#personal-commands-queuing)\n  - [Upload Files and Directories](#upload-files-and-directories)\n  - [**Virtual Hosts** (Domains Forwarding)](#virtual-hosts-domains-forwarding)\n    - [Basic Usage](#basic-usage-easier)\n    - [Advanced Usage](#advanced-usage-manual)\n  - [Turning **VPS Server** into **Desktop Server** (**RDP**)](#turning-vps-server-into-desktop-server-rdp)\n  - [Testing using a **Docker** Container](#testing-using-a-docker-container)\n  - [Close the Connection](#close-the-connection)\n- [Important](#important)\n  - [Known Issues](#known-issues)\n  - [Compatibility](#compatibility)\n- [Community](#community)\n  - [Contributing](#contributing)\n\n---\n\n## About\n\n**SVPS**, initially designed to simplify tasks for non-Unix users, works as an **ORM** for **Ubuntu Servers**.\n\nIt supports command automation, files and directories upload via **SFTP**, automatic installations and configurations, domain forwarding, local text files and template strings into _escaped quoted strings_ for dynamic remote file creation, among other features.\n\nAll this, using just a _single one_ connection 🧙🏻✨\n\n---\n\n## Installation\n\n```shell\n  npm i svps\n```\n\n## Usage\n\n```js\nimport { SVPS } from 'svps';\n\n/** Prepare the connection */\nconst svps = new SVPS({\n  access: {\n    host: '127.0.0.1',\n    username: 'root',\n    password: 'root',\n  },\n});\n\n/** For AWS */\nconst svps = new SVPS({\n  access: {\n    host: '***.amazonaws.com',\n    username: 'ubuntu',\n    privateKey: fs.readFileSync('./your_rsa.pem'),\n  },\n});\n\n/** Available methods\n * svps.mount\n * svps.commands\n * svps.createVirtualHosts\n * svps.upload\n * svps.end\n *\n * See about each below 🕵🏻\n */\n```\n\n---\n\n### Automatic Installations\n\n```js\nawait svps.mount({\n  php: true || { version: 8.2, composer: true },\n  node: true || { version: 18, packages: ['yarn'] },\n  apache: true,\n  docker: true,\n  // ...\n\n  /**\n   * ... Users, Desktop (RDP), Firewall,  etc.\n   *\n   * See all available automatic installations below 👇🏻\n   */\n});\n```\n\n#### Available auto-installation\n\n- [Repair common possible conflicts and vulnerabilities on **Ubuntu**](./src/lib/tasks/steps/repair.ts)\n- [Run common `apt` commands](./src/lib/tasks/steps/apt.ts)\n- [Set the most common **Firewall** (`ufw`) settings](./src/lib/tasks/steps/firewall.ts)\n  - This will activate the **SSH** port according to the entered port or `22` by default\n  - The **Firewall** has different behaviors when combined with **Desktop** and **MySQL**\n- [Create users and groups](./src/lib/tasks/steps/users/)\n- [**SFTP** by enabling it for any user](./examples/sftp/)\n- [**FTP** (`vsftpd`) by enabling it for any user](./examples/ftp/)\n- [**RSA Certificate**](./examples/rsa/)\n- [**Docker** and **Docker Compose**](./src/lib/tasks/steps/docker.ts)\n- [**PHP**](./examples/php/)\n- [**Node.js**](./examples/node/)\n- [**MySQL**](./examples/mysql/)\n- [**Crontab**](./examples/crontab/)\n- [**Remote Desktop Protocol** (**RDP**)](./examples/desktop/)\n- [Restart the **Server**](./src/lib/tasks/steps/reboot.ts)\n\n\u003e See some practical [examples](./examples/).\n\n#### Notes\n\n- The entire remote process is displayed on console in real time\n- Find all the commands behind **SVPS** in [_src/lib/tasks/steps_](./src/lib/tasks/steps/)\n- This may take a long time depending on your **VPS** specifications\n\n---\n\n### Personal Commands (Queuing)\n\nCreate your own commands and combine with other **SVPS** features.\n\n```js\nconst commands = ['echo \"🚀\"'];\n\nawait svps.commands(commands);\n```\n\n- You can use the `escapeQuotes` method to create multi-line escaped quoted strings. See an example [here](./examples/commands/ssh-welcome-message/).\n\n---\n\n### Upload Files and Directories\n\nTransfer your local files and directories and set permissions for each upload.\n\n```js\nawait svps.upload([\n  {\n    local: './my-app-dist',\n    remote: '/workspace',\n    permissions: {\n      user: 'my-user',\n    },\n  },\n]);\n```\n\n- It uses **SFTP** to send the content to remote server\n\n---\n\n### Download Files\n\nDownload your remote files.\n\n```js\nawait svps.download([\n  {\n    remote: '/workspace/backup.zip',\n    local: './my-local-path/backup.zip',\n  },\n]);\n```\n\n- It uses **SFTP** to get the content from remote server\n\n---\n\n### Virtual Hosts (Domains Forwarding)\n\n```js\nawait svps.createVirtualHosts([\n  // Basic or Advanced Virtual Hosts\n]);\n\n/**\n * This will create a log with the processed domains to ensure that only new domains are processed.\n * If you delete this log, the domains will be understood as new and will be overwritten.\n */\n```\n\n#### Basic Usage (easier)\n\n![Node.js](https://img.shields.io/badge/Node.js-LTS-green)\n![PHP](https://img.shields.io/badge/PHP-8.2-4F5B93)\n![MySQL](https://img.shields.io/badge/MySQL-8.x-blue)\n\nYou can automatically create **Node.js** (**LTS**) and **PHP** (**8.2**) services and work on them in `/var/containers/domains`**`/your_domain`**.  \nAlso, it allows to use an exclusive **MySQL** database for each domain.\n\n```js\nawait svps.createVirtualHosts([\n  {\n    domain: 'site.com',\n    port: 5000,\n    www: true /** creates an alias for \"www.site.com\" */,\n    server: {\n      language: 'node' | 'php',\n      mysql: {\n        database: 'db-name',\n        password: 'db-pass',\n        expose: 5001 /** expose port 5001 locally */,\n        isPublic: true /** expose port 5001 outside the VPS */,\n      },\n    },\n  },\n]);\n```\n\n- For **PHP**, you can flag the `server` option `buildFromScratch` as `true` to create the Virtual Host image from scratch, otherwise it will pull the images from my [Docker Hub](https://hub.docker.com/r/wellwelwel/php) 🙋🏻‍♂️\n\nTo create flexible **Basic Virtual Hosts**, **SVPS** uses **Docker** containers and **Apache2** to proxy their ports to your domains.\n\n\u003e **Apache2**, **Docker** and **Docker Compose** required.\n\u003e\n\u003e See some practical examples [here](./examples/virtual-hosts/basic/).\n\n---\n\n#### Advanced Usage (manual)\n\n![Everything](https://img.shields.io/badge/Everything-violet)\n\nBy using the **Virtual Hosts** solely to proxy your services, you can create services in any language you choose, by simply defining the port your service is on.\n\n```js\nawait svps.createVirtualHosts([\n  {\n    domain: 'site.com',\n    port: 5000,\n    www: true /** creates an alias for \"www.site.com\" */,\n  },\n]);\n\n// It will proxy your service at port 5000 to \"site.com\" and \"www.site.com\"\n```\n\n\u003e **Apache2** required.\n\n---\n\n### Turning VPS Server into Desktop Server (RDP)\n\n```js\nawait svps.mount({\n  desktop: true,\n});\n\n/** That's it 🤹🏻‍♀️ */\n```\n\n- It will install **Xubuntu Desktop** and **RDP Remote** in port `3389`\n- The desktop installation can take longer and take up more disk space (about 1GB to 3GB)\n- If you are using a **container**, remember to expose the port `3389`\n- To access, use your credentials in a Remote Desktop Software\n\n\u003e See a practical [example](./examples/desktop/) using a **Docker** container.\n\n---\n\n### Testing using a Docker Container\n\n- Create the container:\n\n  ```sh\n  docker run -d --privileged -p 22:22 --restart always wellwelwel/vps:latest\n  ```\n\n  - Add `-p 3389:3389` if you want to test it using **Remote Desktop Protocol**\n  - See more in [hub.docker.com/r/wellwelwel/vps](https://hub.docker.com/r/wellwelwel/vps)\n\n- Then, set the default access:\n\n  ```js\n  const svps = new SVPS({\n    access: {\n      host: '127.0.0.1',\n      username: 'root',\n      password: 'root',\n      port: 22,\n    },\n  });\n  ```\n\n---\n\n### Close the Connection\n\n```js\nawait svps.end();\n```\n\n---\n\n## Important\n\n- This package is designed for pre-built **VPS**, **KVM** and **Ubuntu Server** `\u003e=18.04`\n- The **SSH** user needs to be the **root** or a **super user**\n- Avoid running this tool on a server that is already in production, unless you know what you're doing 🧙🏻\n\n---\n\n### Known Issues\n\n- [**Node.js** `\u003e=18` is not compatible with **Ubuntu** `18.04`](https://github.com/nodesource/distributions/issues/1392)\n- I think it's not possible to use a **Docker** container with **RDP** inside a **VPS** without **RDP**\n  - Any help on this is welcome 🚀\n\n---\n\n### Compatibility\n\n![macOS](/.github/assets/readme/macos.svg)\n![Linux](/.github/assets/readme/linux.svg)\n![Windows](/.github/assets/readme/windows.svg)\n![node](/.github/assets/readme/node.svg)\n![npm](/.github/assets/readme/npm.svg)\n\n---\n\n## Community\n\nI'm continuously working to improve **SVPS**. If you've got something interesting to share, feel free to submit a [**Pull Request**](https://github.com/wellwelwel/svps/compare). If you notice something wrong, I'd appreciate if you'd open an [**Issue**](https://github.com/wellwelwel/svps/issues/new).\n\n---\n\n### Contributing\n\nPlease check the [_CONTRIBUTING.md_](./CONTRIBUTING.md) for instructions 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwellwelwel%2Fsvps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwellwelwel%2Fsvps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwellwelwel%2Fsvps/lists"}