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.Configuration
FIM One fonctionne avec n’importe quel fournisseur de LLM compatible avec OpenAI — OpenAI, DeepSeek, Anthropic, Qwen, Ollama, vLLM, et bien d’autres.
Jina AI déverrouille la recherche/récupération web, l’intégration vectorielle et le pipeline RAG complet (niveau gratuit disponible).
Fichier
.env minimal :
Déploiement en production
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.
Tunnel Cloudflare
Pour une configuration sans ports ouverts, utilisez Cloudflare Tunnel à la place de Nginx. Tout le trafic transite par les serveurs périphériques de Cloudflare — pas besoin d’exposer les ports 80/443, de gérer les certificats SSL ou de configurer les règles de pare-feu.1
Créer un tunnel
Allez sur Cloudflare Zero Trust → Networks → Tunnels → Create a tunnel.
Choisissez Cloudflared comme type de connecteur.
2
Configurer le nom d'hôte public
Dans la configuration du tunnel, ajoutez un nom d’hôte public :
Laissez tous les autres paramètres (HTTP Host Header, Chunked Encoding, Timeouts, Access) à leurs valeurs par défaut.
L’URL utilise le nom du service Docker
fim-one, pas localhost, car cloudflared s’exécute en tant que conteneur séparé dans le même réseau Docker.3
Copier le jeton du tunnel
Sur la page Configure du tunnel, trouvez la commande d’installation — elle contient un jeton commençant par
eyJ.... Copiez-le.4
Ajouter le jeton à .env
5
Déployer avec la surcouche tunnel
docker-compose.tunnel.yml ajoute un conteneur sidecar cloudflared. Le fichier docker-compose.yml de base reste inchangé — les utilisateurs de la communauté sans Cloudflare peuvent continuer à utiliser docker compose up -d comme avant.6
Supprimer l'ancien enregistrement DNS
Si votre domaine avait précédemment un enregistrement A pointant vers l’adresse IP de votre serveur, supprimez-le dans le DNS Cloudflare. Le tunnel crée automatiquement un enregistrement CNAME pointant vers son point de terminaison périphérique.
7
Fermer les ports du serveur
Supprimez (ou commentez) la section
ports de docker-compose.yml sur votre serveur. Le trafic transite maintenant exclusivement par le tunnel — aucun port entrant n’est nécessaire.Déploiement de script (Bare Metal)
Pour les serveurs bare-metal ou les gestionnaires de processus personnalisés, utilisez./start.sh directement :