Cloudflare Tunnel
ShipNode can run your VPS behind a Cloudflare Tunnel — no inbound 80/443 required, DDoS protection at the edge, optional Cloudflare Access in front of the app.
Configure
Section titled “Configure”export default shipnode .backend() .ssh({ host: '203.0.113.10', user: 'deploy' }) .deployTo('/var/www/api') .pm2('api') .port(3000) .domain('api.example.com') .cloudflare({ accountId: process.env.CF_ACCOUNT_ID!, apiToken: process.env.CF_API_TOKEN!, zone: 'example.com', access: { emails: ['ops@example.com'] }, // optional }) .build();Provision
Section titled “Provision”npx shipnode cloudflare initThis will:
- Install
cloudflaredon the server - Create (or adopt) a named tunnel
- Add the
CNAMEforapi.example.compointing at the tunnel - Configure Cloudflare Access if
accessis set - Enable the
cloudflaredsystemd service
Verify
Section titled “Verify”npx shipnode cloudflare auditnpx shipnode cloudflare statusaudit compares DNS + tunnel routes against your config. status shows the live service.
Firewall
Section titled “Firewall”After the tunnel is healthy you can tighten UFW with npx shipnode harden — only port 22 needs to stay open.