Option A: Docker (Recommended)
No local Python or Node.js required — everything is built inside the container../data and ./uploads directories and in the postgres_data / redis_data named volumes, and survives container restarts.
Note: Docker mode does not support hot reload. Code changes require rebuilding the image (docker compose up --build -d). For active development with live reload, use Option B below.
Option B: Local Development
Prerequisites: Python 3.11+, uv, Node.js 18+, pnpm.구성
FIM One은 모든 OpenAI 호환 LLM 제공자와 함께 작동합니다 — OpenAI, DeepSeek, Anthropic, Qwen, Ollama, vLLM 등.
Jina AI 는 웹 검색/페치, 임베딩 및 전체 RAG 파이프라인을 활성화합니다(무료 티어 사용 가능).
최소
.env:
프로덕션 배포
Docker (Recommended)
docker compose up -d brings up everything you need — no manual service configuration required:
ARM64 Hosts
The images build for bothlinux/amd64 and linux/arm64 (e.g. Kunpeng servers) from the same Dockerfile and Dockerfile.sandbox. Every base image is multi-arch and every Python dependency in uv.lock ships a Linux ARM64 wheel, so nothing is compiled from source. On an ARM64 host, docker compose up --build -d or ./deploy.sh builds ARM64 images with no extra steps.
To build on one machine and run on another, for example ARM64 images for an offline server, use scripts/build-images.sh (requires docker buildx):
docker run --privileged --rm tonistiigi/binfmt --install arm64 (or amd64). The container is privileged because it registers the emulator in the host kernel.
On the target host, load the archive and give the images the names Docker Compose uses, then start without rebuilding. docker compose config --images prints those names; the app image is <project>-fim-one, where <project> is the Compose project name (the checkout directory name, lowercased and without characters such as dots).
postgres:16-alpineandredis:7-alpineare not in the archive. Pull them for the target architecture on a connected machine and transfer them withdocker save/docker load.- With
CODE_EXEC_BACKEND=docker, JavaScript execution usesnode:20-slim, which is not in the archive either. Transfer it the same way, or the first JavaScript run fails on the image pull. - Do not use
./deploy.shthere: it always rebuilds (up -d --build), which needs the network. Usedocker compose up -d --no-build.
Scaling with Workers
By default, the API runs with a single worker process. To handle more concurrent users, increase workers via.env:
- PostgreSQL — SQLite is single-writer and does not support concurrent writes. Docker Compose already runs PostgreSQL and points
DATABASE_URLat it; on bare metal, setDATABASE_URLto a PostgreSQL connection string. - Redis — already included in Docker Compose (auto-configured). Handles cross-worker interrupt/inject relay.
WORKERS=1 (default) outside Docker Compose, no Redis or PostgreSQL is needed — SQLite works fine.
Nginx Reverse Proxy
For HTTPS and custom domain, put an Nginx reverse proxy in front:/api/* requests automatically. Only port 3000 needs to be exposed.
Behind a reverse proxy, set FORWARDED_ALLOW_IPS to the proxy’s address or network so FIM One sees the real client address. Without it every request appears to come from the proxy, which is what IP rules (admin Security → IP Rules) and login history would then record.
Code Execution Sandbox
With the bundleddocker-compose.yml, code execution runs in throw-away sandbox containers without a network (CODE_EXEC_BACKEND=docker, the compose default). The application container does not get the Docker socket. A small docker-socket-proxy service holds it and only starts sandbox containers:
fim-one service: access to it is equivalent to root on the host. The application runs as an unprivileged user (fim, uid 10001); on first start the entrypoint hands ./data and ./uploads over to that user. See Security → Code execution and the Docker socket, which also has the upgrade steps for an existing deployment.
Cloudflare Tunnel
포트를 열지 않는 설정을 위해 Nginx 대신 Cloudflare Tunnel을 사용하세요. 모든 트래픽이 Cloudflare의 엣지를 통해 흐르므로 포트 80/443을 노출하거나, SSL 인증서를 관리하거나, 방화벽 규칙을 구성할 필요가 없습니다.1
터널 생성
Cloudflare Zero Trust → Networks → Tunnels → Create a tunnel로 이동하세요.
커넥터 유형으로 Cloudflared를 선택하세요.
2
공개 호스트명 구성
터널 구성에서 공개 호스트명을 추가하세요:
다른 모든 설정(HTTP Host Header, Chunked Encoding, Timeouts, Access)은 기본값으로 두세요.
URL은
localhost가 아닌 Docker 서비스 이름 fim-one을 사용합니다. cloudflared가 같은 Docker 네트워크의 별도 컨테이너로 실행되기 때문입니다.3
터널 토큰 복사
터널의 Configure 페이지에서 설치 명령을 찾으세요 —
eyJ...로 시작하는 토큰이 포함되어 있습니다. 복사하세요.4
.env에 토큰 추가
5
터널 오버레이로 배포
docker-compose.tunnel.yml 오버레이는 cloudflared 사이드카 컨테이너를 추가합니다. 기본 docker-compose.yml은 변경되지 않으므로 Cloudflare가 없는 커뮤니티 사용자는 계속 docker compose up -d를 사용할 수 있습니다.6
이전 DNS 레코드 제거
도메인에 이전에 서버의 IP를 가리키는 A 레코드가 있었다면 Cloudflare DNS에서 삭제하세요. 터널이 자동으로 엣지 엔드포인트를 가리키는 CNAME 레코드를 생성합니다.
7
서버 포트 닫기
서버의
docker-compose.yml에서 ports 섹션을 제거하거나 주석 처리하세요. 트래픽은 이제 터널을 통해서만 흐르므로 인바운드 포트가 필요하지 않습니다.스크립트 배포 (베어 메탈)
베어 메탈 서버 또는 사용자 정의 프로세스 관리자의 경우./start.sh를 직접 사용하세요: