Interactive setup for the Linux server you just rented. Pick from a menu, answer a few simple questions, review, then run.
$ curl -fsSL https://raw.githubusercontent.com/orlinkzz/vps-setup/main/install.sh | sudo bash
Prefer to read it first? Use git clone or --dry-run.
Supports Ubuntu 22.04 / 24.04, Debian 12 and AlmaLinux / Rocky 8 / 9.
You stay in control. Nothing on the server changes before you agree.
Install with one command, then just type sudo vps-setup. Or clone the repo and run setup.sh.
Tick what you need: web server, database, domains and more.
Only simple ones, like a domain name or a database name.
See the summary first. If it looks right, go ahead.
After the curl install, the vps-setup command works from any folder. In a cloned repo, use ./setup.sh inside the repo instead.
The recommended way if you want to read the script first.
$ git clone https://github.com/orlinkzz/vps-setup.git
$ cd vps-setup && sudo ./setup.sh--dry-run only shows what would be done.
$ sudo vps-setup --dry-runMenus and questions in Indonesian. English is the default.
$ sudo vps-setup --lang idServer already running? Add a new domain any time.
$ sudo vps-setup --add-domainAdd a database and user from the interactive menu.
$ sudo vps-setup --add-databaseA proxy site can get an app-DOMAIN service too: it starts at boot and restarts itself after a crash.
$ sudo vps-setup --add-domainSkip the questions with a preset, for example a PostgreSQL database.
$ sudo vps-setup --yes --preset database --engine postgresql --db myappRead-only checks: SSH, firewall, services, certificates and backups.
$ sudo vps-setup --doctorGet the newest version, or roll back what vps-setup configured.
$ sudo vps-setup --update
$ sudo vps-setup --uninstall --dry-runChanging a server's configuration is scary. That is why there is a safety net at every step.
Every replaced file is saved to /var/backups/vps-setup/. A file is only rewritten when its content really changes.
Every step goes to /var/log/vps-setup.log. Passwords are never written to it.
vps-setup --uninstall removes the files and settings vps-setup created and restores files from backup where needed. Web server and SSH configs are tested before they are reloaded, so websites and SSH access stay up. Important data, like databases and the MySQL root login, is left alone on purpose.
Beyond the first setup, there are tools to keep the server healthy.
Open source. Read the code, try it, send feedback.