Multiple Instances¶
One server can run several separate Strawly instances. Each instance has its own database, users, settings, cloud credentials and versions. A consultant might run one instance per client, so each client's data stays apart and each client gets its own address.
How instances are kept apart¶
| Part | Per instance | Shared |
|---|---|---|
| Database, users, credentials, backups | Yes | |
| Versions (core and modules) | Yes, each instance upgrades on its own | |
| Port on the server | Yes, 8080, 8081 and so on, picked automatically | |
| HTTPS certificates | One per domain | The edge proxy on ports 80 and 443 |
Each instance lives in its own folder, /opt/strawly/instances/<name>/, with its own .env and backups/.
Add an instance¶
Run the installer again and give the new instance a different name:
For example acme for a client called Acme, with the domain acme.strawly.example.com. Create the DNS record for each domain before you install.
The first instance with a domain starts the edge proxy, a small Caddy server that owns ports 80 and 443 and gets a certificate for each domain. Later instances add their domain to it.
Work with one instance¶
Commands take -i <name> when there is more than one instance:
strawly list # every instance, with address, versions and health
strawly status -i acme
strawly backup -i acme
strawly upgrade -i acme
Resources¶
Each instance runs its own database and, with the Azure module, its own collectors. Memory use grows with each instance, so check the server's free memory with docker stats before adding one. System requirements lists what one instance uses.
Remove an instance¶
Strawly offers a final backup, which it keeps in /opt/strawly/removed-backups/, then asks you to type the instance name before it deletes anything.