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/coreor@farm.js/cli. - It builds with
farm buildand startsnode .farm/.output/server/index.mjson port 3000. - The production image holds only
.farm/.output. It doesn't need your source, your config, or the Farm.js CLI. - Your own
buildandstartscripts still take precedence. openship.jsonis 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
dependenciesordevDependencies:@farm.js/coreor@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.
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
| Step | OpenShip's default |
|---|---|
| Build | farm build |
| Output | .farm/.output |
| Start | node .farm/.output/server/index.mjs |
| Port | 3000, 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
- Connect. Sign in to the OpenShip dashboard and link the repo. Then pick a branch and a destination: OpenShip Cloud or your own server.
- Build. OpenShip runs
farm build. - Ship. The new version goes live. You can roll back to the previous one.
- 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:
// farm.config.ts
import { defineConfig } from "@farm.js/core";
export default defineConfig({
deploy: { target: "node", output: ".output" },
});
{
"framework": "farmjs",
"outputDirectory": ".output",
"startCommand": "node .output/server/index.mjs",
"productionPaths": [".output"]
}
Check it before you push:
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 buildneeds@farm.js/cli, a devDependency. Keep devDependencies installed for the build.
Try it
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.