메인 콘텐츠로 건너뛰기
☁️ Option 0: Cloud (Zero Setup) 자체 호스팅을 원하지 않으신가요? cloud.fim.ai에서 FIM One을 즉시 시도하세요 — Docker 없음, API 키 없음, 구성 없음. 로그인하면 바로 시작할 수 있습니다. 얼리 액세스.
No local Python or Node.js required — everything is built inside the container.
Open http://localhost:3000 — on first launch you’ll be guided through creating an admin account. That’s it. After the initial build, subsequent starts only need:
Data is persisted in the bind-mounted ./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 compose up -d brings up everything you need — no manual service configuration required:

ARM64 Hosts

The images build for both linux/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):
A non-native architecture is built under QEMU emulation and takes several times longer. Docker Desktop includes QEMU; on Linux, register it once with 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).
On a host without internet access:
  • postgres:16-alpine and redis:7-alpine are not in the archive. Pull them for the target architecture on a connected machine and transfer them with docker save / docker load.
  • With CODE_EXEC_BACKEND=docker, JavaScript execution uses node: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.sh there: it always rebuilds (up -d --build), which needs the network. Use docker 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:
Multi-worker requirements:
  • PostgreSQL — SQLite is single-writer and does not support concurrent writes. Docker Compose already runs PostgreSQL and points DATABASE_URL at it; on bare metal, set DATABASE_URL to a PostgreSQL connection string.
  • Redis — already included in Docker Compose (auto-configured). Handles cross-worker interrupt/inject relay.
With 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:
The API runs internally on port 8000 — Next.js proxies /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 bundled docker-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:
Do not add the socket to the 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 인증서를 관리하거나, 방화벽 규칙을 구성할 필요가 없습니다.
중국 본토 사용자: Cloudflare Free/Pro/Business 요금제는 중국 본토에 PoP(Points-of-Presence)가 없습니다. 중국 본토의 트래픽은 해외 엣지(일반적으로 미국 서부)로 라우팅되어 빈번한 502 오류와 높은 지연 시간이 발생합니다. 주요 사용자가 중국 본토에 있는 경우 Cloudflare Tunnel을 사용하지 마세요. 중국 본토에 안정적으로 접근하려면 Cloudflare Enterprise with China Network(JD Cloud 파트너십)이 필요합니다.
설정:
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 섹션을 제거하거나 주석 처리하세요. 트래픽은 이제 터널을 통해서만 흐르므로 인바운드 포트가 필요하지 않습니다.
Cloudflare Tunnel은 Free를 포함한 모든 요금제에서 무료입니다. 대역폭이나 트래픽 제한이 없습니다.

스크립트 배포 (베어 메탈)

베어 메탈 서버 또는 사용자 정의 프로세스 관리자의 경우 ./start.sh를 직접 사용하세요:
이 모드에서는 Redis가 자동으로 포함되지 않습니다. 시스템은 기본적으로 단일 워커, 인프로세스 모드로 실행되며 — 저트래픽 배포에 적합합니다. Redis를 로컬에서 다중 워커로 활성화하려면: