Install on a server
Installing Slasha is one command on a fresh Linux server, after two DNS records. The Quickstart has the short version; this page has the details.
Requirements
- A 64-bit Linux server with systemd. Ubuntu LTS or Debian is the most tested. The script also supports the RHEL family (CentOS, Fedora, Rocky, AlmaLinux, Amazon Linux), Arch and SLES/openSUSE.
- Root or sudo access.
- Ports 80, 443 and 2019 free. Slasha’s reverse proxy needs them (2019 is its admin API, on localhost only). Don’t install next to an existing Nginx or Apache.
- A domain you can create DNS records for.
- Docker 24 or newer, if Docker is already installed. Otherwise the script installs it. Docker from snap isn’t supported; remove it first.
python3, which the script uses to edit firewall rules. Most distributions have it.
Use a fresh server if you can. Slasha expects to manage Docker, the firewall and ports 80/443 on its own.
Choosing a server
Any VPS provider works: Hetzner, DigitalOcean, Vultr, Linode, AWS Lightsail, OVH, or a machine in your closet with a public IP. x86_64 and ARM (aarch64) both work.
| Server | Good for |
|---|---|
| 1 GB RAM | One or two light apps, maybe Redis. Builds can run short on memory; add swap. |
| 2 GB RAM | A few small apps plus a PostgreSQL or MySQL database. A good default. |
| 4 GB RAM or more | Several apps with databases, MongoDB, or heavy builds (large Next.js or Rust projects). |
Memory runs out before CPU does, and builds use the most. A server that runs your apps fine can still fail a big build. Databases default to between 256 MiB (Redis) and 1 GiB (MongoDB); see Managed databases.
Plan for at least 25 GB of disk. Slasha keeps the last 10 images of each app for rollbacks and lets the Docker build cache grow to 10 GiB, on top of your databases and volumes.
You can add more servers later as nodes, so you don’t need a big one up front.
Add swap on a 1 GB server
A 2 GB swap file prevents most out-of-memory build failures:
sudo fallocate -l 2G /swapfile && sudo chmod 600 /swapfile
sudo mkswap /swapfile && sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstabDNS records
Pick a platform domain. The dashboard lives there, and every app gets a subdomain of it. These docs use ship.acme.dev.
Point two records at your server’s public IP:
| Type | Name | Value | Used for |
|---|---|---|---|
A |
ship.acme.dev |
203.0.113.10 |
The dashboard, the API and git pushes |
A |
*.ship.acme.dev |
203.0.113.10 |
Apps, at <slug>.ship.acme.dev |
If your server has an IPv6 address, add matching AAAA records too.
Create them before running the setup script. Let’s Encrypt certificates only work once the domain resolves to your server. Both of these should print your server’s IP:
dig +short ship.acme.dev
dig +short anything.ship.acme.dev
Cloudflare
Set these records to DNS only (grey cloud) during setup so certificates can be issued directly. Your own custom domains can be proxied later; Slasha detects that and shows them as “Proxied”.
Run the setup script
SSH into the server as root (or a user with sudo) and run:
curl -fsSL https://slasha.com/setup.sh | bash
It takes a few minutes, mostly installing Docker. Answer the prompts:
| Prompt | Answer |
|---|---|
slasha is not installed. do you want to run the automatic install script? (Y/n) |
Press Enter (yes). |
platform domain (e.g. slasha.example.com) |
Your platform domain without https://, for example ship.acme.dev. |
press enter to use it, or enter your own jwt secret |
Press Enter to use the random value shown. It signs login sessions. |
press enter to use it, or enter your own encryption key |
Press Enter to use the random value shown. This is SLASHA_KEY, which encrypts secrets at rest. |
When it’s done you’ll see:
setup complete!
domain https://ship.acme.dev
service slasha.service
env /etc/slasha/.env
data /var/lib/slasha
The summary reminds you to point an A record at the server. You need the wildcard record as well.
Back up your encryption key
SLASHA_KEY encrypts environment variables, database passwords, S3 credentials, node SSH keys and the GitHub App configuration. If you lose or change it, Slasha can’t decrypt them. Copy /etc/slasha/.env somewhere safe, like a password manager.
Run it without prompts
Set SLASHA_DOMAIN and the script skips every question. It installs the binary, uses that domain, and generates a new JWT secret and encryption key. Useful for provisioning scripts and coding agents.
curl -fsSL https://slasha.com/setup.sh | SLASHA_DOMAIN=ship.acme.dev bash
Run it as root, or as a user with passwordless sudo, so nothing stops to ask for a password.
If /etc/slasha/.env already exists, the script keeps the JWT secret and encryption key from it, with or without SLASHA_DOMAIN.
First login
Open https://ship.acme.dev. On a new server you’ll see Set up Slasha. Enter an email and a password of at least 8 characters to create the first admin account.
Only the first account is created this way. After that, admins add users from Users in the dashboard. There are no email invites.
You can also create the first admin from the CLI: slasha auth login notices there’s no admin yet and asks for an email and password. See Install the CLI.
What the script changes
In order:
- Checks ports 80, 443 and 2019 are free. If another process holds one, it stops and names it. An existing Slasha proxy is fine.
- Installs
curl,ufwandopenssh-serverif missing, and makes sure SSH is running. - Installs Docker, Docker Compose and Docker Buildx if missing, and checks Docker is 24 or newer. On Ubuntu with
needrestart, it stopsneedrestartfrom restarting containerd during upgrades, which would kill running containers. - Installs Railpack to
/usr/local/bin, for apps without a Dockerfile. - Installs the
slashabinary to/usr/local/bin, after asking you. - Creates a
slashasystem user with home/var/lib/slasha, no login shell, in thedockergroup. - Asks for configuration: platform domain, JWT secret and encryption key.
- Writes
/etc/slasha/.env, readable only by theslashauser (mode 600). - Registers
slasha.servicewith systemd, running/usr/local/bin/slasha serveas theslashauser, restarting on failure. - Configures ufw: deny all incoming traffic except SSH (22), HTTP (80) and HTTPS (443), and allow Docker’s bridge networks to reach the host so the proxy can reach Slasha.
- Configures fail2ban to ban an IP for an hour after 5 failed SSH logins in 10 minutes.
- Starts Slasha and prints a summary.
Slasha then starts the Caddy reverse proxy as a Docker container named slasha-proxy.
Firewall
Only ports 22, 80 and 443 are open to the internet:
- The dashboard goes through the proxy on 443. Slasha’s own port (3000) isn’t exposed.
- Databases are never public. They live on each app’s private Docker network. From your laptop, use
slasha services proxy, which tunnels over HTTPS. - Port 2019 (the proxy’s admin API) listens on
127.0.0.1only.
Check two things:
- Custom SSH port. The script only opens 22. If SSH listens elsewhere, open that port before you log out:
sudo ufw allow 2200/tcp(with your port). - Cloud firewalls. Some providers (AWS security groups, Hetzner Cloud firewalls, Oracle Cloud) filter traffic before it reaches your server. Allow inbound 80 and 443 there too.
Managing the service
Slasha is a normal systemd service:
sudo systemctl status slasha # is it running?
sudo systemctl restart slasha # restart after changing /etc/slasha/.env
sudo systemctl stop slasha # stop the dashboard and API
sudo journalctl -u slasha -f # follow the server's own logs
sudo journalctl -u slasha -n 100 # last 100 lines
Stopping Slasha doesn’t stop your apps; their containers keep running under Docker. While it’s stopped, the dashboard, CLI, git pushes, crons and alerts are unavailable.
Configuration lives in /etc/slasha/.env. Server configuration lists every variable.
Where data lives
To move or rebuild a server, you need these:
| Path | What’s there |
|---|---|
/etc/slasha/.env |
Configuration and secrets (domain, JWT secret, SLASHA_KEY) |
/var/lib/slasha/.slasha/ |
Slasha’s data: users, apps, deployments, env vars, logs, metrics, app git repositories, node details and local database backups |
| Docker volumes | App /data volumes and database files (usually under /var/lib/docker/volumes) |
The simplest safety net is backing up your databases to S3; see Backups & restores.
Upgrading
Don't re-run the setup script to upgrade
It skips the binary because it’s already installed, and it rewrites /etc/slasha/.env, dropping any variables you added. See Upgrading for the right command.
Running Slasha in Docker instead
There’s also a container image, ghcr.io/slashacom/slasha, with a docker-compose.yml in the repository’s docker/ folder. It uses host networking, mounts the Docker socket, stores data in the slasha-data and slasha-ssh volumes, and runs its own SSH server for git on port 2222.
The systemd install is recommended. It sets up the firewall and fail2ban, and the rest of these docs assume it.