Skip to content
Farm.js 0.2 is outRead the post

Farm.js on OpenShip. Your app, your servers.

Farm.js is now an official OpenShip integration. OpenShip recognizes a Farm.js app from its config, builds it, and runs it on OpenShip Cloud or a Linux server you own.

In this article 6 sections

Farm.js on OpenShip. Your app, your servers.

KinfeMichael Tariku · Dec 2026

OpenShip is an open-source deployment platform. It deploys from Git to OpenShip Cloud or to any Linux server you connect.

Farm.js is now an official OpenShip integration. Push a repo with a farm.config.ts, and OpenShip fills in the build command, the output directory, and the start command for you.

The short version

  • OpenShip detects Farm.js from farm.config.* plus @farm.js/core or @farm.js/cli.
  • It builds with farm build and starts node .farm/.output/server/index.mjs on port 3000.
  • The production image holds only .farm/.output. It doesn't need your source, your config, or the Farm.js CLI.
  • Your own build and start scripts still take precedence.
  • openship.json is optional. Add it only when you move the output directory.

How OpenShip finds a Farm.js app

OpenShip needs both signals:

  • A config file at the app root: farm.config.ts, .tsx, .mts, .cts, .js, .jsx, .mjs, or .cjs.
  • A Farm.js package in dependencies or devDependencies: @farm.js/core or @farm.js/cli.

A library that only imports a Farm.js helper has no config file, so OpenShip doesn't mistake it for an app.

Code
my-app/
  farm.config.ts      ← config marker
  package.json        ← "@farm.js/core", "@farm.js/cli"
  src/app/
    page.tsx
    api/hello/route.ts

What it runs

StepOpenShip's default
Buildfarm build
Output.farm/.output
Startnode .farm/.output/server/index.mjs
Port3000, or PORT when the host sets it

This is Farm.js's node target, the same output you'd run behind nginx or PM2. Pages, API routes, server functions, and streaming all run in one Node process.

The server starts with node, not farm start, so it still boots after a builder prunes devDependencies.

Deploy it

  1. Connect. Sign in to the OpenShip dashboard and link the repo. Then pick a branch and a destination: OpenShip Cloud or your own server.
  2. Build. OpenShip runs farm build.
  3. Ship. The new version goes live. You can roll back to the previous one.
  4. Route. Add a domain. OpenShip issues the HTTPS certificate.

Set runtime secrets in OpenShip, not in the repo. Farm.js reads them from the host environment when the server starts.

When you need openship.json

When you keep the defaults, you don't need the file at all.

If farm.config.ts moves the output, tell OpenShip where it went:

TypeScript
// farm.config.ts
import { defineConfig } from "@farm.js/core";

export default defineConfig({
  deploy: { target: "node", output: ".output" },
});
JSON
{
  "framework": "farmjs",
  "outputDirectory": ".output",
  "startCommand": "node .output/server/index.mjs",
  "productionPaths": [".output"]
}

Check it before you push:

Terminal
openship config validate

Two things break a first deploy:

  • A platform target. deploy.target: "vercel" or "cloudflare" builds output that only that platform can serve. Remove it, or set it to "node".
  • A production-only install. farm build needs @farm.js/cli, a devDependency. Keep devDependencies installed for the build.

Try it

Terminal
pnpm create @farm.js/app my-app
cd my-app
git init && git add -A && git commit -m "Start my-app"

Push it to GitHub, then sign in to the OpenShip dashboard and connect the repo. To run OpenShip on your own server, start with its self-hosting quickstart. For other hosts, see Self-host a Farm.js app.

Thanks for building with us.

Keep exploring