A new server, no commands to memorise.

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.

illustration

    

Four steps, no guesswork

You stay in control. Nothing on the server changes before you agree.

  1. Run it

    Install with one command, then just type sudo vps-setup. Or clone the repo and run setup.sh.

  2. Pick from the menu

    Tick what you need: web server, database, domains and more.

  3. Answer questions

    Only simple ones, like a domain name or a database name.

  4. Review, then run

    See the summary first. If it looks right, go ahead.

The commands you will use most

After the curl install, the vps-setup command works from any folder. In a cloned repo, use ./setup.sh inside the repo instead.

Clone and run

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

Preview without changing anything

--dry-run only shows what would be done.

$ sudo vps-setup --dry-run

Use Bahasa Indonesia

Menus and questions in Indonesian. English is the default.

$ sudo vps-setup --lang id

Add a website later

Server already running? Add a new domain any time.

$ sudo vps-setup --add-domain

Create a database later

Add a database and user from the interactive menu.

$ sudo vps-setup --add-database

Run a Node, Python or Go app

A proxy site can get an app-DOMAIN service too: it starts at boot and restarts itself after a crash.

$ sudo vps-setup --add-domain

Unattended mode for scripts

Skip the questions with a preset, for example a PostgreSQL database.

$ sudo vps-setup --yes --preset database --engine postgresql --db myapp

Check the server's health

Read-only checks: SSH, firewall, services, certificates and backups.

$ sudo vps-setup --doctor

Update or undo

Get the newest version, or roll back what vps-setup configured.

$ sudo vps-setup --update $ sudo vps-setup --uninstall --dry-run

Safe to try, easy to undo

Changing a server's configuration is scary. That is why there is a safety net at every step.

Files are backed up

Every replaced file is saved to /var/backups/vps-setup/. A file is only rewritten when its content really changes.

Everything is logged

Every step goes to /var/log/vps-setup.log. Passwords are never written to it.

Roll back

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.

Day-to-day operations too

Beyond the first setup, there are tools to keep the server healthy.

Database backups with rotation Health monitoring (vps-setup-health) Health check: vps-setup --doctor App services (systemd) for Node, Python, Go Laravel scheduler + queue worker Opt-in HSTS per site Real visitor IPs behind Cloudflare fail2ban jails for Nginx: http-auth, botsearch, bad-request

Ready to set up your first server?

Open source. Read the code, try it, send feedback.

Open on GitHub