Deploy Node.js / Express on Oracle Cloud's free tier
A plain Node API with persistent memory, cron and WebSockets — no per-invocation billing.
At a glance
| Base image | node:22-alpine |
|---|---|
| Port | 3000 |
| Build command | npm ci --omit=dev |
| Start command | node src/index.js |
| Infrastructure cost | $0 on Oracle Always Free (platform fee for managed DevOps) |
Running Node.js / Express on Ampere ARM
Node ships official ARM64 images. Native modules (bcrypt, sharp, better-sqlite3) compile fine on Ampere but add build time — prefer prebuilt or pure-JS alternatives where you can.
Steps
- Listen on 0.0.0.0. Binding to 127.0.0.1 inside a container makes the port unreachable from the host.
app.listen(process.env.PORT || 3000, "0.0.0.0"); - Add /healthz. Return 200 only once your database connection is ready, so rollbacks catch broken releases.
- Deploy from GitHub. One click connects the repo; every push to the chosen branch triggers a build.
Dockerfile for Node.js / Express on ARM64
FROM node:22-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
EXPOSE 3000
CMD ["node", "src/index.js"]Need one tailored to your repository? The free Dockerfile generator writes an ARM-ready multi-stage build for you.
Common mistakes
- devDependencies in the runtime image: `npm ci --omit=dev` cuts image size and attack surface.
- No process manager needed: Skip pm2 inside Docker — `--restart unless-stopped` already handles crashes and reboots.
- Unhandled rejections: Crash loudly and let the container restart rather than limping on in a broken state.
Related reading
Get the Oracle Always Free deploy checklist
One email with the exact steps, capacity workarounds and tools we use to ship apps for $0 of cloud spend.
One email, no spam. Unsubscribe anytime.
Frequently asked
Do cron jobs work?+
Yes — node-cron runs in-process because the container never sleeps, unlike free serverless tiers.
Can I run multiple services?+
Yes. Docker Compose on the same VM runs your API, a worker and Redis side by side.
What about zero-downtime deploys?+
Cheaploy starts the new container, health-checks it, then switches the proxy — old requests drain first.
Deploy your project for $0
No credit card. No Oracle sales call. Ship to your own cloud in under 10 minutes.
Start free