MCPSERV.CLUB
farmOS

farmOS

Self-Hosted

Open‑source farm management platform

Active(100)
1.1kstars
0views
Updated 3 days ago
farmOS screenshot

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 farmOS namespace, 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 drush command 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

ScenarioWhy farmOS fits
Research Data CollectionResearchers can model custom entities

Open SourceReady to get started?

Join the community and start self-hosting farmOS today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
GPL-2.0
Stars
1.1k
Technical Specs
Pricing
Open Source
Database
PostgreSQL
Docker
Official
Min RAM
1GB
Min Storage
5GB
Supported OS
LinuxDocker
Author
farmOS
farmOS
Last Updated
3 days ago