Install
One command installs Supaffi on a Linux server.
Before you install
- A Linux server with a public IPv4 address,
gitandopenssl. The full list is in Requirements. - Docker 24 or newer. If Docker is missing, the installer asks before installing it with Docker's official script.
- Port 3443 allowed in your hosting provider's firewall, and ports 80 and 443 for your affiliate portals.
You need no domain and no DNS record to install. The owner dashboard is served on the server's own address. Each product's affiliate subdomain is added later, from the dashboard.
Run the installer
On the server, run:
curl -fsSL https://raw.githubusercontent.com/ugolbck/supaffi/main/install.sh | sudo bashIt asks nothing in a normal run. In a few minutes it:
- Clones the newest release into
/opt/supaffi. It always installs an exact released version, never a branch. - Writes
/opt/supaffi/.env, readable by root only, and generates the database password, the session secret and theMASTER_ENCRYPTION_KEYthat encrypts your Stripe keys. Later runs never regenerate them. - Picks the proxy mode. If ports 80 and 443 are free, Supaffi brings its own proxy and handles HTTPS. If either is in use, it prints
Port 80 or 443 is already in use, so Supaffi will not bring its own proxy.and leaves them to your proxy. See Reverse proxy and HTTPS. - Pulls the images, starts the stack and waits for the setup token.
When it finishes, it prints an address and a setup token:
Supaffi 0.4.0.
Open https://203.0.113.10:3443/setup and paste this token:
kX2mQ9vT4rLw8NcY3pHs
Your browser will warn about the certificate. Continue past it. The
warning means it cannot verify who this server is, which you already
know. The connection is encrypted.
If that address does not load, your hosting provider is blocking port
3443. Allow it in their firewall, not on the server.The installer only asks a question when it has to: to install a missing Docker, or for the server's public IP when it cannot detect it. Without a terminal, for example in a provisioning script, set SUPAFFI_INSTALL_DOCKER=yes and SUPAFFI_HOST_IP instead.
Create the owner account
Open the address
Open the
/setupaddress the installer printed, for examplehttps://203.0.113.10:3443/setup.Continue past the certificate warning
The dashboard uses a certificate your server signs itself, so the browser cannot verify who the server is. You already know, and the connection is encrypted. To skip the warning for good, give the dashboard a domain with
SUPAFFI_DOMAIN.Paste the setup token
Paste it into Setup token. The token works until an owner exists, and a restart issues a new one. If you lost it, the last one in the log is valid:
cd /opt/supaffi && docker compose logs app | grep "setup token"Create your login
Enter your Email and a Password of at least 12 characters, then press Create account. You are signed in and taken to add your first product.
An instance has one owner. Once the owner exists, /setup closes and no token is issued again. Log in at /login on the same address.
Installer options
Options are environment variables. Put them on bash, not on curl, or they only reach the download:
curl -fsSL https://raw.githubusercontent.com/ugolbck/supaffi/main/install.sh | sudo SUPAFFI_DOMAIN=supaffi.yourserver.com bashEvery variable, with defaults, is in Configuration. To change one later, run the installer again with it. Your data and secrets are kept.