Server Installation Guide
Learn how to install, configure, and initialize the AllSafeX server stack using Docker Compose on Linux.
System Prerequisites
Before proceeding, ensure your target host meets the minimum hardware and software requirements:
| Specification | Minimum Requirement | Production Recommended |
|---|---|---|
| Operating System | Ubuntu 22.04 LTS / Debian 12 / Linux Mint 21+ | Ubuntu 24.04 LTS / Debian 12 |
| CPU Cores | 2 vCPUs | 4 to 8 vCPUs |
| System Memory (RAM) | 4 GB RAM | 8 to 16 GB RAM |
| Disk Storage | 20 GB SSD | 100+ GB SSD (for session audit logs) |
| Container Runtime | Docker Engine 24.0+ & Compose v2 | Docker Engine 26.0+ & Compose v2 |
Docker Compose Setup
Create the designated application directory and download the official deployment manifests:
# Create directory structure for AllSafeX
sudo mkdir -p /opt/allsafex
cd /opt/allsafex
# Create required storage and configuration directories
sudo mkdir -p config data logs
Create a docker-compose.yml file in /opt/allsafex/:
version: '3.8'
services:
core:
image: allsafex/core:latest
container_name: allsafex_core
restart: unless-stopped
environment:
- SECRET_KEY=${SECRET_KEY}
- BOOTSTRAP_TOKEN=${BOOTSTRAP_TOKEN}
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=allsafex
- DB_USER=allsafex
- DB_PASSWORD=${DB_PASSWORD}
- REDIS_HOST=redis
- REDIS_PORT=6379
volumes:
- ./config:/opt/allsafex/config
- ./data:/opt/allsafex/data
depends_on:
- postgres
- redis
gateway:
image: allsafex/gateway:latest
container_name: allsafex_gateway
restart: unless-stopped
ports:
- "2222:2222"
environment:
- CORE_HOST=http://core:8080
- BOOTSTRAP_TOKEN=${BOOTSTRAP_TOKEN}
volumes:
- ./data/recordings:/opt/allsafex/data/recordings
depends_on:
- core
web:
image: allsafex/web:latest
container_name: allsafex_web
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./config/nginx:/etc/nginx/conf.d
depends_on:
- core
- gateway
postgres:
image: postgres:16-alpine
container_name: allsafex_postgres
restart: unless-stopped
environment:
- POSTGRES_DB=allsafex
- POSTGRES_USER=allsafex
- POSTGRES_PASSWORD=${DB_PASSWORD}
volumes:
- ./data/postgres:/var/lib/postgresql/data
redis:
image: redis:7-alpine
container_name: allsafex_redis
restart: unless-stopped
command: redis-server --appendonly yes
volumes:
- ./data/redis:/data
Environment Variables
Generate secure random credentials in a .env file:
# Generate cryptographically secure keys
SECRET_KEY=$(openssl rand -hex 32)
BOOTSTRAP_TOKEN=$(openssl rand -hex 16)
DB_PASSWORD=$(openssl rand -base64 24)
cat <<EOF > /opt/allsafex/.env
SECRET_KEY=${SECRET_KEY}
BOOTSTRAP_TOKEN=${BOOTSTRAP_TOKEN}
DB_PASSWORD=${DB_PASSWORD}
EOF
# Restrict file permissions
chmod 600 /opt/allsafex/.env
Launching the Stack
Pull the official container images and start all services in the background:
cd /opt/allsafex
docker compose pull
docker compose up -d
During the very first launch, the core container automatically executes database schema migrations and seeds default system roles. This may take 30 to 60 seconds.
Initial Login & Setup
Once containers report a healthy status, access the web administration console:
- Open your browser and navigate to:
http://your-server-ip/ - Log in with default administrator credentials:
- Username:
admin - Password:
admin
- Username:
- You will be prompted immediately to set a new, strong password and enroll your multi-factor authenticator app (Google Authenticator, Microsoft Authenticator, or 1Password).
Service Verification
Confirm that all services are operational:
# Check container statuses
docker compose ps
# Verify AllSafeX SSH gateway is listening on port 2222
nc -zv localhost 2222
# Inspect Core logs for any errors
docker compose logs core --tail=50