-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the Fortrx-Server wiki! This wiki provides detailed information and guides for setting up, configuring, and managing the Fortrx-Server.
The Fortrx-Server is the backend component of the Fortrx secure communication system. It facilitates Post-Quantum-Resistant Double Ratchet + X3DH key exchanges, handles encrypted message routing, user presence, and live delivery. The server is built with a robust stack including FastAPI, PostgreSQL, Redis, MinIO, Caddy, and DuckDNS.
To install and run the Fortrx-Server, follow these steps:
-
Clone the repository:
git clone https://github.com/Fortrx/Fortrx-Server.git cd Fortrx-Server -
Run the launch script:
bash ops/launch.sh
This script will guide you through the installation of Docker and Docker Compose v2 (if needed) and help you choose between
local(development) orprod(production) deployment modes.
Configuration for the Fortrx-Server is handled through environment variables. Depending on your chosen deployment mode (local or prod), the launch.sh script will either create a local .env file or export runtime secrets from Infisical into .env.runtime.
-
SERVER_URL: The base URL for the Fortrx-Server API. -
DATABASE_URL: Connection string for the PostgreSQL database. -
REDIS_URL: Connection string for the Redis instance. -
MINIO_ACCESS_KEY,MINIO_SECRET_KEY: Credentials for MinIO object storage. -
INFISICAL_TOKEN: (Production only) Token for Infisical secret management.
- Purpose: Ideal for development and testing.
-
Setup: Choose
localduringops/launch.shexecution. -
Endpoints:
- API:
http://localhost:8000 - MinIO API:
http://localhost:9000 - MinIO Console:
http://localhost:9001
- API:
- Purpose: For live, secure, and scalable deployments.
-
Setup: Choose
prodduringops/launch.shexecution. -
Requirements:
- Repository linked to an Infisical project with
prodenvironment secrets. -
INFISICAL_TOKENrecommended for non-interactive authentication.
- Repository linked to an Infisical project with
-
Features: Installs Docker, Docker Compose v2, cron,
restic, exports production secrets, starts production stack, and configures nightly backups.
To perform a manual backup of the server data:
bash ops/backup.shThis will back up the PostgreSQL database, MinIO volume, and environment metadata.
To restore the server from a previous snapshot:
bash ops/restore.sh <snapshot-id>Backups are managed using restic, supporting various backends. Ensure RESTIC_REPOSITORY and RESTIC_PASSWORD (along with any other backend-specific environment variables) are configured in Infisical for production backups.
If you encounter issues with the Fortrx-Server, consider the following:
-
Check Docker container status: Ensure all services are running (
docker compose ps). -
Review logs: Examine container logs for error messages (
docker compose logs <service_name>). - Verify environment variables: Confirm that all necessary environment variables are correctly set for your deployment mode.
- Database connectivity: Ensure PostgreSQL and Redis are accessible and properly configured.
- Firewall rules: Check if any firewall rules are blocking necessary ports.
- Consult the Fortrx-Server GitHub Issues for known issues or to report a new one.