Skip to Content
LogiStackDocs
Reference

Installer reference (install.sh)

Every install.sh flag and environment variable, what the LogiStack installer changes on the server, how to upgrade, repair and uninstall.

install.sh installs, repairs and upgrades LogiStack on one Linux server. It installs Docker if needed, starts a Docker Swarm, creates the secrets, deploys the logistack stack and prints how to reach the setup wizard. It is idempotent: re-running it repairs a broken install, restarts nothing that already matches, and never rotates existing secrets. For a first install, follow Install LogiStack; this page lists every option.

Usage

curl -fsSL https://stack.logicaltech.it/install.sh | sudo bash

Pass options after bash -s --:

curl -fsSL https://stack.logicaltech.it/install.sh | sudo bash -s -- --version 0.3.0 --yes

Preview what it would do, without changing anything:

curl -fsSL https://stack.logicaltech.it/install.sh | sudo bash -s -- --dry-run

Flags

FlagWhat it does
--version XRelease to install or upgrade to: 0.3.0, v0.3.0 or latest. Without it, the installer keeps the release that runs now (read from the api's image, so in-app updates count), else the release in /etc/logistack/version, else the release this copy of the script is pinned to, else the latest release on GitHub. A plain re-run never upgrades.
--advertise-addr IPIPv4 address other Swarm nodes use to reach this one. Default: the address of the interface holding the default route. Loopback addresses are refused. Ignored with a warning if the server is already in a swarm.
--yes, -ySkip the confirmation prompt. Required when no terminal is attached, such as in cloud-init.
--dry-runRun every check, print the plan (→ would ...), change nothing.
--no-ingressLeave Caddy at 0 tasks and ports 80/443 to another proxy. The dashboard is reachable only through the SSH tunnel. Remembered on re-runs until --enable-ingress.
--enable-ingressTurn Caddy on after --no-ingress. Ports 80 and 443 must be free by then. Cannot be combined with --no-ingress.
--public-setupServe the setup wizard on the server's public address before setup, guarded by a one-time setup token printed at the end. Not remembered: a re-run without it is private again. Cannot be combined with --no-ingress.
--public-url URLThe dashboard URL the api uses for sign-in and links (BETTER_AUTH_URL, LOGISTACK_PUBLIC_URL, WEB_ORIGIN), such as https://logistack.example.com. Without it, a re-run keeps the value set earlier, and a new install uses http://<public IP>.sslip.io.
--api-replicas NRun N api replicas, from 1 to 9. Without it, the installer keeps the count that runs now, else 1. In-app updates keep the count too. See Several api replicas.
--local-buildBuild the four images from the checkout the script runs from, instead of pulling them from ghcr.io. Single node only. For development; pass it on every re-run.
--help, -hPrint the usage.

Environment variables

VariableDefaultWhat it does
LOGISTACK_TUNNEL_PORT3000 (3001 next to Dokploy)Loopback port of the logistack-api-tunnel container, the private way into the dashboard.
LOGISTACK_WAIT_TIMEOUT300Seconds the installer waits for every service and the api's health check before it gives up. Raise it on slow disks or networks.
LOGISTACK_STACK_URL_BASEhttps://raw.githubusercontent.com/logical-tech/logistackWhere the installer downloads install/stack.yml for the chosen release, when the file is not next to the script. Point it at a mirror if GitHub is unreachable.

Set them for the bash that runs the script:

curl -fsSL https://stack.logicaltech.it/install.sh | sudo LOGISTACK_TUNNEL_PORT=3300 bash

Checks before it changes anything

CheckFails when
RootNot root (a dry run only warns).
Operating systemNever fails. Ubuntu 22.04+ and Debian 12+ are supported; others get a warning and need Docker 26+ already installed.
ArchitectureNot amd64 or arm64.
ResourcesLess than about 2 GB of RAM, or less than 10 GB free on /var/lib/docker (or /).
Ports80/tcp, 443/tcp or 443/udp already in use, unless ingress is off or LogiStack's own Caddy holds them.
NetworksAn existing Swarm overlay overlaps a local network (relevant next to Coolify).
AddressNo IPv4 address can be detected, or only a loopback one.

Then it prints the plan and asks to continue, unless you pass --yes.

What it changes on the server

ObjectDetails
DockerInstalled from download.docker.com when missing (Ubuntu and Debian only).
Swarmdocker swarm init --advertise-addr <ip> when the server is not in a swarm. An existing swarm is reused if this node is a manager.
Node labelslogistack.ingress=true and logistack.data=true on this node, only when no node carries them yet. logistack.ingress=pending records --no-ingress.
Docker secretslogistack-master-key, logistack-postgres-password, logistack-better-auth-secret, logistack-redis-password, logistack-agent-token, logistack-setup-token. Created only when absent.
/etc/logistack/credentialsThe generated secret values, mode 600.
/etc/logistack/stack.yml, /etc/logistack/versionThe deployed stack file and the release the installer last deployed.
/var/log/logistack-install.logFull output of every command the installer ran, mode 600.
/etc/update-motd.d/99-logistackA login banner that shows how to reach the setup wizard on every SSH login until setup is done.
Stack logistackpostgres, redis, logistack-api, logistack-worker, logistack-agent (one per node) and caddy (one per ingress node).
Container logistack-api-tunnelThe api on 127.0.0.1:3000, loopback only. Absent with --public-setup.
Networksls-control (10.247.0.0/16, control plane), ls-ingress, ls-storage, ls-db, ls-game. See Architecture.
Volumeslogistack_pgdata, logistack_redisdata, logistack_workerdata, logistack_agentdata.
/etc/sysctl.d/60-logistack-userns.confOnly where kernel.apparmor_restrict_unprivileged_userns is 1 (Ubuntu 23.10 and later). Sets it to 0, because rootless BuildKit needs unprivileged user namespaces.

Back up /etc/logistack/credentials. The master key in it encrypts every secret LogiStack stores, and Docker secrets cannot be read back. Without it, a restored database cannot decrypt your variables, keys and passwords.

If the server has /etc/logistack/credentials but no Docker secrets, for example a new server where you copied the file, the installer creates the secrets from the file instead of generating new values. That is the manual disaster recovery path.

The worker later creates ls-buildkit (rootless BuildKit, on the first git build) and, if you turn it on, the local registry. They live outside the stack.

Reach the setup wizard

By default the dashboard is private until setup is done: Caddy answers every request with 404, and the api is published only on the server's loopback. From your machine:

ssh -L 3000:127.0.0.1:3000 [email protected]
# then open http://localhost:3000

With --public-setup, the wizard is at http://<ip-with-dashes>.sslip.io/setup#token=<token>. The token is printed at the end of the install, shown in the login banner and stored as LOGISTACK_SETUP_TOKEN in /etc/logistack/credentials. It stops working once an owner exists. See The setup wizard.

Install with cloud-init

Paste this into your provider's User data or Cloud config field when you create the server:

#cloud-config
runcmd:
  - curl -fsSL https://stack.logicaltech.it/install.sh | bash -s -- --yes

Follow the install with tail -f /var/log/cloud-init-output.log. SSH in when it finishes: the login banner shows how to reach the wizard.

Next to Dokploy or Coolify

The installer detects Dokploy (Swarm service dokploy or /etc/dokploy) and Coolify (a running coolify container), explains its plan and asks first. In both cases ingress stays off so the existing proxy keeps ports 80 and 443, setup is private, and the api gets read-only access to the old platform's database for the migration wizard. Next to Dokploy, the tunnel uses port 3001 because Dokploy's dashboard holds 3000. See Migrate from Dokploy and Migrate from Coolify.

Upgrade

From the dashboard, an admin opens Settings > Updates and selects Update to vX. See Updates. From the server:

curl -fsSL https://stack.logicaltech.it/install.sh | sudo bash -s -- --version 0.3.0

The api and worker roll with start-first updates and roll back on failure. The installer waits until every service has finished its update, not only until it has a running task. If Swarm rolled a service back, the installer stops and names it:

  ✗ logistack-worker did not start on 0.3.0; Swarm put back the previous version
    logistack-worker: task: non-zero exit (1)
See why with: docker service logs logistack_logistack-worker   (re-running the installer is safe)

The instance keeps running the previous release of that service. Read the logs, fix the cause, and run the installer again. Postgres, Redis and Caddy stop the old task first, because they own a data directory or host ports. The api runs database migrations at startup. A release that changes stack.yml (a new service or variable) says so in its notes and needs the installer; an in-app update swaps images only.

Repair

Run the installer again with no options. It recreates missing secrets from /etc/logistack/credentials, redeploys the stack at the running release, and recreates the loopback tunnel:

curl -fsSL https://stack.logicaltech.it/install.sh | sudo bash

After setup, a re-run ends with Setup is done. Open the dashboard at https://... and the SSH tunnel command. If the dashboard's domain stops working, this is also how you get back in: the tunnel on 127.0.0.1:3000 comes back and you reach it over SSH.

Uninstall

Download uninstall.sh and run it:

curl -fsSL https://raw.githubusercontent.com/logical-tech/logistack/main/install/uninstall.sh -o uninstall.sh
sudo bash uninstall.sh

It removes the logistack stack, the ls-buildkit service, the logistack-api-tunnel container, the login banner and the ls-control and ls-ingress networks (when no app service still uses them). Volumes, secrets and /etc/logistack stay, so running the installer again brings LogiStack back with its data. Your app services are not removed.

To delete everything, including the database:

sudo bash uninstall.sh --purge

--purge permanently deletes the LogiStack database, Redis data, build cache, the Docker secrets, the node labels and /etc/logistack. It asks you to type purge; --yes skips the question. Docker and the swarm stay installed. Volumes on other nodes must be removed there.

Firewall

Docker publishes ports through iptables, which bypasses UFW and firewalld. Ports 80 and 443 are open even if UFW says otherwise; the installer warns when it sees an active host firewall. Before you add a second server, open the Swarm ports only between LogiStack nodes:

PortPurpose
2377/tcpSwarm management
7946/tcp and 7946/udpNode discovery
4789/udpOverlay network traffic
UFW, for each peer node
ufw allow from 198.51.100.20 to any port 2377 proto tcp
ufw allow from 198.51.100.20 to any port 7946
ufw allow from 198.51.100.20 to any port 4789 proto udp

On this page