Method 1: Docker
Prerequisites: Docker Engine 24+ with the Compose plugin, and git.
Step 1: Install Docker (skip if docker compose version already works):
curl -fsSL https://get.docker.com | sudo shStep 2: Get Flock
git clone https://github.com/Pourii83/Flock.gitcd FlockStep 3: Configure
cp .env.example .envnano .envSet at least these values:
| Variable | What to put |
|---|---|
JWT_SECRET |
A long random string: run openssl rand -hex 32 and paste the result |
POSTGRES_PASSWORD |
A strong database password |
DOMAIN |
Your domain, e.g. chat.example.com (only for HTTPS in step 4) |
Step 4: Start
With HTTPS (recommended; needs DOMAIN, DNS and ports 80/443):
docker compose --profile https up -d --buildWithout a domain (for testing on a local network):
docker compose up -d --buildThe first build takes a few minutes. Check that everything is running:
docker compose ps # every service should be "running" or "healthy"Step 5: Create the admin account. It asks for a password (at least 8 characters); like every password, it’s stored only as a bcrypt hash:
docker compose exec server node src/create-admin.js adminStep 6: Open it: https://chat.example.com (with HTTPS) or http://<server-ip>:8080 (without), and sign in as admin.
Updating, backups and uninstalling (Docker)
# Update to the latest versiongit pulldocker compose --profile https up -d --build # drop "--profile https" if you don't use it
# Back up the databasedocker compose exec db pg_dump -U flock flock > flock-backup.sql
# Restore a backupdocker compose exec -T db psql -U flock flock < flock-backup.sql
# Logsdocker compose logs -f server
# Stop and remove the containers (data volumes are kept)docker compose --profile https down# ...and also delete all data (database, uploads, certificates)docker compose --profile https down -v