~/tutorials $
Linux server tutorials
Step-by-step tutorials for a Linux server: VPNs, web servers, databases, containers, security and backups. Each one names the distributions it was tested on.
13 of 45 tutorials in Development
Automate snapshots before risky changes with the CLI
A small script that takes a VPSNine snapshot with the vps9 CLI, waits until it is ready and rotates old ones, then runs your risky change.
How to install Node.js on Ubuntu 24.04
Three ways to install Node.js on Ubuntu 24.04, NodeSource, nvm and Ubuntu's own package, which one to pick, and how to update or switch versions later.
Use curl and jq with the VPSNine API
Drive the VPSNine API from a shell with curl and jq: filter servers, take snapshots and wait for them, read errors, page invoices, edit the firewall.
Deploy a FastAPI app with Gunicorn, Uvicorn workers and systemd
Run a FastAPI app in a virtualenv under Gunicorn with Uvicorn workers, keep it up with a systemd service, and put nginx in front as a reverse proxy.
Deploy a Node.js app with PM2 and nginx on Ubuntu 24.04
Run a Node.js app under its own user with PM2, bring it back after reboots, put nginx in front as a reverse proxy, and ship updates without downtime.
Deploy on push with GitHub Actions and the VPSNine API
Build on every push to main in GitHub Actions, snapshot the VPSNine server through the API, then ship with rsync over SSH and switch releases atomically.
Get Slack and Discord alerts from VPSNine webhooks
VPSNine has no Slack or Discord integration, so run a tiny relay that verifies webhook signatures and posts alerts and events to your channels.
How to write a systemd service for your app
Run your own program as a systemd service that starts at boot, restarts when it crashes, runs as its own user, reads an env file and is sandboxed.
Manage VPSNine servers with Ansible
Build an Ansible inventory from the VPSNine API, grouped by tag, plan and image, and run a playbook that patches servers and locks SSH to keys.
Receive VPSNine webhooks in Node.js and Python
A dependency-free webhook receiver in Node.js or Python that checks every VPSNine signature, refuses replays, skips duplicates and runs under systemd.
Script your infrastructure with the TypeScript SDK
Use @vpsnine/sdk from TypeScript to list servers, snapshot before a reboot, order a server safely and handle errors, with retries and idempotency keys built in.
Self-host Gitea with Docker, PostgreSQL and HTTPS
Run your own Git server with Gitea and PostgreSQL in Docker Compose, Git over SSH on port 2222, HTTPS from Caddy, no open sign-ups, and backups you can restore.
Create and destroy preview servers per pull request
Order a VPSNine server per pull request from GitHub Actions, deploy the branch, comment its address, and delete the server when the PR closes.