DEV Community

TateLyman
TateLyman

Posted on

Deploy Any Node.js App 24/7 for Free on Oracle Cloud — Complete Guide

Oracle Cloud Free Tier

Oracle gives you a free VM forever (not a trial):

  • ARM Ampere A1 — 4 cores, 24GB RAM
  • 200GB block storage
  • 10TB/month bandwidth

This is enough to run multiple production apps.

Setup

1. Create Account

Go to cloud.oracle.com and sign up. You need a credit card for verification but won't be charged.

2. Create VM

  • Shape: VM.Standard.A1.Flex (ARM)
  • Image: Ubuntu 22.04 or 24.04
  • Add your SSH key

3. Install Node.js

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
Enter fullscreen mode Exit fullscreen mode

4. Upload Your App

scp -r ./my-app user@your-vm-ip:~/my-app
Enter fullscreen mode Exit fullscreen mode

5. Create systemd Service

sudo cat > /etc/systemd/system/myapp.service << EOF
[Unit]
Description=My Node.js App
After=network.target

[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu/my-app
ExecStart=/usr/bin/node app.js
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable myapp
sudo systemctl start myapp
Enter fullscreen mode Exit fullscreen mode

6. Check Status

sudo systemctl status myapp
journalctl -u myapp -f  # Live logs
Enter fullscreen mode Exit fullscreen mode

What I Run

I deploy a 4,500-line trading bot this way. 12 background workers, handles hundreds of users, ~50MB RAM usage. Been running 24/7 for months with zero downtime.

Alternatives

  • Railway — free tier with limits
  • Fly.io — free tier, 3 shared VMs
  • Render — free tier, spins down on inactivity

Oracle is the only one that gives you a real always-on VM for free.


My bot: @solscanitbot — free Solana trading bot on Telegram

Top comments (0)