InfiniSynapse Private Deployment Guide

One-click deployment with Docker Compose. Follow the steps below to go live.

1. Requirements

  • Hardware: Recommended 8 cores / 32 GB RAM / 100 GB disk (minimum 16 GB RAM; lower InfiniSQL memory settings if needed)
  • OS: Linux (Ubuntu 22.04 LTS recommended)
  • Software: Docker ≥ 24, Docker Compose plugin ≥ 2.20 (use the docker compose command)
  • Network: Access to Docker Hub, official npm/pip registries, and infinisynapse.oss-cn-shanghai.aliyuncs.com
  • Ports to expose externally: 8088 (main app), 80 (admin console), 3000 (auth API, browser-accessible)

If Docker is not installed, run:

curl -fsSL https://get.docker.com | sudo bash
sudo systemctl enable --now docker
sudo usermod -aG docker "$USER"

Log in again, then verify with docker --version and docker compose version.

2. Get the code

git clone https://github.com/chaozwn/infini_docker.git
cd infini_docker

For offline delivery, unpack the archive you received and enter that directory.

3. Configure .env

mkdir -p __data/mysql __data/mongo __data/redis
mkdir -p datas persist auto-coder upload tasks
cp .env.example .env

Open .env and at minimum adjust:

# Database and cache passwords (strongly change in production)
DB_PASSWORD=infinisynapse@123
REDIS_PASSWORD=ChangeMeRedisPassword!
MONGO_PASSWORD=infinisynapse2025
# URI-encoded Mongo password; if it has no @ : / ? # & = etc., same as MONGO_PASSWORD
MONGO_PASSWORD_URIENC=infinisynapse2025

# JWT secret (required, length ≥ 32)
JWT_SECRET=ChangeMeJwtSecretAtLeast32Chars

# Account service address and JWT issuer (required — see notes below)
SSO_API_BASE=http://<SERVER_IP_OR_DOMAIN>:3000/api
AUTH_ISSUER=http://<SERVER_IP_OR_DOMAIN>:3000/api

# RS256 signing private key (required — without it the account service cannot issue tokens)
JWT_PRIVATE_KEYS_B64=

⚠️ SSO_API_BASE / AUTH_ISSUER rules (most common pitfall)

SSO_API_BASE is the account service API root that the frontend and the main app dial. AUTH_ISSUER is the identity written into the token's iss claim: the account service writes it when signing, every service compares it verbatim when verifying, and it is also used to build ${AUTH_ISSUER}/auth/.well-known/jwks.json to fetch the public key. On a single-host deployment both take the same value.

  • Must be reachable by the browser — use the server IP or domain, not a container name or 127.0.0.1.
  • Port is always 3000, path always /api, no trailing /.
  • With HTTPS reverse proxy, use https://<domain>/api and route /api to infini-proxy-server:3000.
  • The two must match verbatim. Changing only one produces tokens that no service accepts — everyone fails to log in, and the logs give no hint why.

Example (server IP 192.168.1.10):

SSO_API_BASE=http://192.168.1.10:3000/api
AUTH_ISSUER=http://192.168.1.10:3000/api

Generating JWT_PRIVATE_KEYS_B64

Login tokens are signed with RS256 and you must generate the key yourself — there is deliberately no default, otherwise every deployment would share the same key:

docker compose run --rm --entrypoint "" infini-proxy-server pnpm gen:jwt-keys

Paste the whole JWT_PRIVATE_KEYS_B64= line from the output into .env. To rotate later, append -- --rotate: the new key goes first and is used for signing, while old keys stay behind it for verifying existing tokens, so logged-in users are not kicked out immediately.

4. Start services

docker compose up -d --build

The first run builds images and runs MySQL migrations; expect 10–30 minutes. Then check status:

docker compose ps

Except infini-synapse-mysql-migrate showing Exited (0) (one-off job, normal), all other containers should be running.

5. Initialize admin

bash deploy/init-admin.sh

By default this creates admin / 123456. Custom username or password:

ADMIN_USERNAME='your_admin' ADMIN_PASSWORD='YourStrongPassword' bash deploy/init-admin.sh

The script upserts by username; run again to reset the password.

6. Access the system

Assuming server IP 192.168.1.10:

Sign in with the account from step 5.

7. Common operations

# Logs
docker compose logs -f infini-synapse

# Restart one service
docker compose restart infini-synapse

# Stop / start all
docker compose stop
docker compose start

# Backup persistent data
tar czvf infini-backup-$(date +%F).tgz __data persist datas upload

# Upgrade
git pull && docker compose up -d --build

Persistent paths: __data/ (MySQL/Mongo/Redis), persist/ (main app), datas/, upload/.

8. Troubleshooting

Login fails / API 401 / blank page

In most cases SSO_API_BASE is wrong. In the browser DevTools → Network, check the failing request URL; it should be http://<SERVER_IP_OR_DOMAIN>:3000/api/.... If not, fix per section 3 and restart:

docker compose up -d infini-synapse

Also confirm host port 3000 is open externally.

Logged in but every API returns 401

AUTH_ISSUER differs between services, or JWT_PRIVATE_KEYS_B64 is empty. Check:

# Did the account service start? Without an issuer it fails on boot and prints why
docker compose logs infini-proxy-server | tail -50

# Can JWKS serve a public key? An empty result means the private key is missing
curl http://<SERVER_IP_OR_DOMAIN>:3000/api/auth/.well-known/jwks.json

After editing .env, restart both the account service and the main app:

docker compose up -d infini-proxy-server infini-synapse

infini-sql fails or OOM

InfiniSQL uses a lot of RAM by default. On hosts with less than 32 GB RAM, lower settings in .env (example for 16 GB):

INFINI_SQL_SPARK_DRIVER_MEMORY=6g
INFINI_SQL_MEM_LIMIT=8g
INFINI_SQL_MEMSWAP_LIMIT=10g
docker compose up -d infini-sql

Port conflicts

Change APP_PORT, PROXY_ADMIN_PORT, etc. in .env, then run docker compose up -d.

9. Get help

InfiniSynapse Private Deployment Guide | InfiniSynapse