Articles
What the one-line install does and puts on your server
The script the install command downloads, what it does step by step, what it leaves alone, and what is on the server once it has finished.
About 4 min read · Last updated
In this article
Before you install anything on a server with curl … | sudo sh, you want to know what that command does. This article goes through Lightning VM's install command from beginning to end.
The command
curl -fsSL https://lightningvm.app/install.sh | sudo shThe file at that address is a copy of scripts/get.sh from the panel's repository. It is a POSIX sh script, and you can read it before you run it:
curl -fsSL https://lightningvm.app/install.sh | lessThe script does a small job: it checks that it runs as root, installs git if it is missing, fetches the source into /opt/lightning-vm, switches to the tag of the latest stable release and runs the actual installer (scripts/install.sh). If no release has been published, it installs the main branch and says so in a warning.
Options go after the pipe. The first -- starts the script's own options, the second -- starts those passed on to the installer:
curl -fsSL https://lightningvm.app/install.sh | sudo sh -s -- --version v1.2.0 -- --domain panel.example.com --lang en| Option | What it does |
|---|---|
--version v1.2.0 | Installs a particular release |
--branch main | Follows a branch instead of releases (test servers) |
--dir /srv/lightning-vm | The directory the source goes into |
--repo URL | Another repository, for example your own fork |
--token-file FILE | A read-only access token for a private repository |
--lang tr / --lang en | The language of the script and the installer; without it, the script asks once on a terminal |
The repository is public; an access token is needed only if you install from a private fork.
What the installer does, in order
- It checks the operating system and the resources. It stops if the system is not Ubuntu 22.04, 24.04 or 26.04, or if memory is under 2 GB or free disk under 10 GB. If one of the pre-flight checks fails, it exits without creating a single file.
- If Docker is missing, it installs it from Docker's official apt repository.
- It generates the secrets with
openssl randand writes them to.envwith mode 600. Secrets are not printed to the terminal. - It builds the services from source, starts them and waits until they are ready.
- It sets up access. With
--domainthat name is used; without it, if the server has a public IPv4 address,<ip>.sslip.iois used. In both cases Caddy obtains a Let's Encrypt certificate. With no public IP, or with--local, the panel is reachable only at127.0.0.1:8080. - If memory is 3.8 GB or more, it switches the monitoring stack on (Prometheus, Grafana, Loki).
- It creates the first admin with a random password.
- It installs the daily backup timer and takes the first backup.
- It sums up the panel's address and the admin's e-mail address and password.
The first admin's password is shown once and is also written to secrets/initial-admin.txt. Change the password after your first sign-in and delete the file.
What is on the server afterwards
/opt/lightning-vm: a git checkout of the source. Updates are made from here..env: settings and secrets.secrets/: the master key, the backup key (backup.key) and the first admin's file.backups/: encrypted backups and their signature files.data/: maintenance requests, their results, and persistent data.- Docker containers and volumes: web, API, worker, the adapter services, the console gateway, PostgreSQL, Redis and Caddy.
- systemd units: the timer for backups and automatic updates, and the agent that carries out the panel's maintenance requests.
What the script leaves alone
It does not touch the firewall, the SSH settings, an existing Nginx / Caddy / Traefik setup or the system's packages. The one exception is Docker.
If it stops halfway
Run the same command again. .env is created only once; later runs add missing keys and never change existing secrets. The database and the admin account are kept.
If you run the same command on a server that is already installed, it does not reinstall: when the installation is complete it runs install.sh update, which means a backup is taken first and the previous version comes back if the new one does not become ready.
Checking only
If you have fetched the source by hand, there is a check that changes nothing:
git clone https://github.com/syildirim689/lightning-vm.git
cd lightning-vm
sh scripts/install.sh checkThings to know
- The installation does not come as signed, versioned images; installing and updating build from source. The first installation therefore takes a while, depending on how fast the server is.
- Do not expose the panel to the internet without HTTPS. On a server without a public IP, use an SSH tunnel:
ssh -L 8080:127.0.0.1:8080 USER@SERVER. - To stay clear of Let's Encrypt's rate limits you can try a test certificate first with
--acme-staging.
Sources: docs/setup.md, docs/updates.md (Turkish), scripts/get.sh.
