Overview
Discover what makes farmOS powerful
farmOS is a **self‑hosted, web‑based farm management platform** that centralises planning, record keeping, and data analytics for agricultural operations. At its core, it is a **Drupal 10** application enriched with custom modules that expose rich data models (e.g., fields, plots, activities, sensors) and a REST‑first API. The system is intentionally modular: core functionality lives in the Drupal stack, while domain‑specific logic (crop calendars, soil testing workflows, weather integration) is delivered through contributed modules or third‑party services. This architecture allows developers to extend or replace components without touching the underlying CMS, making farmOS a versatile foundation for research prototypes, commercial SaaS offerings, or local farm dashboards.
Backend
Database
Frontend
Containerisation
Overview
farmOS is a self‑hosted, web‑based farm management platform that centralises planning, record keeping, and data analytics for agricultural operations. At its core, it is a Drupal 10 application enriched with custom modules that expose rich data models (e.g., fields, plots, activities, sensors) and a REST‑first API. The system is intentionally modular: core functionality lives in the Drupal stack, while domain‑specific logic (crop calendars, soil testing workflows, weather integration) is delivered through contributed modules or third‑party services. This architecture allows developers to extend or replace components without touching the underlying CMS, making farmOS a versatile foundation for research prototypes, commercial SaaS offerings, or local farm dashboards.
Technical Stack
- Backend: Drupal 10 (PHP 8.x), leveraging the JSON‑API module for a native, versioned REST interface. Custom entities and field types are defined in the
farmOSnamespace, with entity bundles representing agronomic concepts (e.g., Plot, Activity, Event). - Database: PostgreSQL is the recommended relational store, though MySQL/MariaDB support exists via Drupal’s database abstraction. The schema is heavily normalised, with spatial extensions (PostGIS) used for plot geometry and GPS coordinates.
- Frontend: A progressive web app (PWA) built with Vue.js, served through Drupal’s Twig templates. The PWA (
farmOS Field Kit) enables offline data entry, synchronisation via the same JSON‑API endpoints, and push notifications for field alerts. - Containerisation: Official Docker images (
farmos/farmos) bundle the entire stack, including a Nginx reverse proxy and PHP-FPM worker. Compose files expose environment variables for database credentials, mailer settings, and optional Redis caching. - CI/CD: The project uses GitHub Actions for automated testing, linting, and Docker image publishing. Releases are tagged semantically (e.g.,
v3.2.1), with changelogs generated from commit history.
Core Capabilities
- Entity‑Centric API: Every farmOS entity is exposed through the JSON‑API, supporting CRUD operations, filtering, and sorting. Custom endpoints (e.g.,
/api/activities?field_plot=123) are available for common queries. - Event Scheduling & Calendar: Activities can be scheduled with recurrence rules (iCal format), and the API provides calendar views for integration with external scheduling tools.
- Geospatial Support: Plots and field boundaries are stored as GeoJSON, enabling map visualisation via Leaflet or OpenLayers. Spatial queries (e.g., “find all activities within 500 m of a point”) are supported through PostGIS.
- Sensor & IoT Integration: The platform accepts data from remote sensors via webhooks or MQTT bridges, storing readings in a time‑series table. Modules expose this data through the API and dashboards.
- User Roles & Permissions: Fine‑grained ACLs are inherited from Drupal, allowing per‑entity access control (e.g., a farm manager can edit all plots, while a field worker only logs activities).
Deployment & Infrastructure
- Self‑Hosting: A minimal stack requires PHP 8.x, PostgreSQL (or MySQL), and a web server. The Docker image simplifies deployment to Kubernetes, ECS, or traditional VM hosts.
- Scalability: Horizontal scaling is achieved by separating the web tier (NGINX + PHP-FPM) from the database. Caching layers (Redis, Varnish) can be added to reduce API latency for read‑heavy workloads.
- High Availability: The PWA’s offline capability ensures data capture continues during network outages, while background workers (Drupal queue) reconcile pending changes once connectivity is restored.
- Backup & Disaster Recovery: The database can be backed up with standard PostgreSQL tools, and Drupal’s configuration management allows rapid restoration of site settings.
Integration & Extensibility
- Plugin System: Custom modules follow Drupal’s module conventions. Developers can ship their own farmOS extensions on GitHub or as Composer packages, and publish them to Drupal.org for community reuse.
- Webhooks & Event Hooks: The API supports outbound webhooks on entity changes, enabling real‑time integration with external systems (e.g., ERP, GIS).
- GraphQL Support: An optional GraphQL module allows clients to request precisely the data they need, reducing over‑fetching compared to REST.
- CLI Tools: The
drushcommand line provides programmatic access for data migration, bulk updates, and automated testing.
Developer Experience
- Documentation: The official docs (farmOS.org/hosting, /develop) cover installation, API reference, and module development. The codebase is well‑commented, with doctrination for PHP functions.
- Community: A vibrant forum (discourse), Matrix chat, and regular development calls foster collaboration. Contributions are welcomed via GitHub pull requests, and the project follows semantic versioning.
- Testing: PHPUnit tests cover core modules, while Cypress scripts validate the PWA. Continuous integration ensures new changes do not break existing functionality.
- Licensing: GPL 2.0 guarantees freedom to modify and redistribute, making farmOS suitable for commercial deployments that require open‑source compliance.
Use Cases
| Scenario | Why farmOS fits |
|---|---|
| Research Data Collection | Researchers can model custom entities |
Open SourceReady to get started?
Join the community and start self-hosting farmOS today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Aimeos
Ultra‑fast, API‑first eCommerce platform
wanderer
Create and search your trail catalog
Maza Ad Blocking
Local ad blocker, no extensions needed
Mistborn
Self-hosted cloud-platforms
Activepieces
Open-source AI automation platform for building and deploying no-code flows
XWiki Platform
Collaborative knowledge management for enterprises
