Run the Fortrx backend from a fresh clone with one guided command.
fortrx: FastAPI app, serving as the core backend for the secure communication engine.postgres: PostgreSQL database for durable message and authentication data storage.redis: Redis for managing live delivery and presence updates, ensuring real-time communication.minio: S3-compatible object storage for sealed blob storage, enhancing data security.caddy: Caddy server for HTTPS and WebSocket reverse proxy in production environments.duckdns: Dynamic DNS updater for production deployments, ensuring continuous accessibility.
After cloning the repo on a Debian/Ubuntu machine, run the launch.sh script:
bash ops/launch.shThe script automates the setup process:
- Installs Docker and Docker Compose v2 if not already present.
- Prompts you to choose between
local(development) orprod(production) mode. - Automatically creates a local
.envfile forlocalmode. - For
prodmode, it prompts for Infisical login and exports.env.runtime. - Launches the entire stack using the
compose.ymlconfiguration.
Select local when running ops/launch.sh.
Endpoints:
- API:
http://localhost:8000 - MinIO API:
http://localhost:9000 - MinIO Console:
http://localhost:9001
Select prod when running ops/launch.sh.
Requirements:
- Your repository must be linked to the correct Infisical project.
- The
prodenvironment in Infisical should contain all necessary runtime secrets. - Optional but Recommended: Provide
INFISICAL_TOKENas an environment variable for non-interactive authentication.
The production script will:
- Install Docker, Docker Compose v2, cron, and
restic. - Utilize
INFISICAL_TOKENif available, otherwise fallback to Infisical login. - Export production secrets into
.env.runtime. - Start the production stack with all
prodservices enabled. - Configure nightly backups.
Manual Backup:
bash ops/backup.shRestore a Snapshot:
bash ops/restore.sh <snapshot-id>Backup Contents:
- A logical PostgreSQL database dump.
- A MinIO volume archive.
- Metadata related to the current environment.
The remote backup script leverages restic, allowing any backend supported by restic to be used. Configure the necessary environment variables in Infisical alongside RESTIC_REPOSITORY and RESTIC_PASSWORD.