### Install and start Tailscale on each server Source: https://vpsdime.com/knowledgebase/technical-questions/private-networking-between-vpses Install Tailscale on each server and authenticate with the same account. The free tier covers a personal fleet; each machine gets a stable 100.x.y.z address and a MagicDNS name. ```bash curl -fsSL https://tailscale.com/install.sh | sh tailscale up ``` -------------------------------- ### Enable and start services with systemctl enable --now Source: https://vpsdime.com/knowledgebase/troubleshooting/services-not-starting-after-reboot This command enables and starts the specified services immediately. It makes them boot-persistent and starts them now. ```bash systemctl enable --now nginx mariadb php8.2-fpm ``` -------------------------------- ### Install any executable as a Windows service with NSSM Source: https://vpsdime.com/knowledgebase/windows-vps/windows-services-after-reboot Run this command in a command prompt to launch the NSSM GUI for installing a program as a Windows service. Replace 'MyApp' with the desired service name. The GUI guides you through selecting the executable and configuring startup type, restart on crash, and log capture. ```bash nssm install MyApp ``` -------------------------------- ### Install and start OpenSSH Server on Windows Source: https://vpsdime.com/knowledgebase/windows-vps/ssh-on-windows Installs the OpenSSH Server optional feature, starts the sshd service, and sets it to start automatically. Run in an elevated PowerShell session over RDP. The installation normally creates the firewall rule for port 22, but verify with Get-NetFirewallRule -Name *ssh*. ```powershell Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 Start-Service sshd Set-Service sshd -StartupType Automatic ``` -------------------------------- ### tmux: install, start, and reattach to a session Source: https://vpsdime.com/knowledgebase/technical-questions/keep-apps-running-after-ssh Install tmux, start a session, and reattach to it later. Detach with Ctrl+B then D, or let SSH drop; the session persists on the server. Multiple sessions are managed with tmux new -s build, tmux ls, and tmux attach -t build. ```bash apt install tmux tmux # start a session, run your stuff inside it ``` ```bash tmux attach ``` -------------------------------- ### Install XFCE desktop environment Source: https://vpsdime.com/knowledgebase/technical-questions/install-desktop-environment Installs the XFCE desktop environment, the default recommendation for a VPS. Light on resources (roughly 0.5 to 1 GB RAM idle) and pairs best with xRDP. ```bash apt install xfce4 xfce4-goodies ``` -------------------------------- ### Install LXQt desktop environment Source: https://vpsdime.com/knowledgebase/technical-questions/install-desktop-environment Installs LXQt, the lightest of the major desktop environments, for when every megabyte counts. ```bash apt install lxqt ``` -------------------------------- ### Install Claude Code with the official script Source: https://vpsdime.com/knowledgebase/getting-started/claude-code-on-vps Run this command as your everyday sudo user (not root) to install Claude Code. It downloads and runs the install script from claude.ai. After installation, start with 'claude' and sign in with an Anthropic account (paid plan or API key). ```bash curl -fsSL https://claude.ai/install.sh | bash ``` -------------------------------- ### Install and run iftop for per-connection bandwidth Source: https://vpsdime.com/knowledgebase/technical-questions/per-app-bandwidth Install iftop and run it with -P to see a live top-list of connections with rates, remote hosts, and ports. Useful for spotting a single remote endpoint dominating traffic. ```bash apt install iftop iftop -P ``` -------------------------------- ### Run mtr with 100 rounds and report form Source: https://vpsdime.com/knowledgebase/troubleshooting/network-problems Run a proper mtr sample with 100 rounds, report form, and hostnames/AS numbers. The first command tests the forward path from your machine to the VPS; the second tests the reverse path from the VPS back to your home IP. Install mtr first with 'apt install mtr' on Linux or 'brew install mtr' on macOS. ```bash mtr -rwbzc 100 YOUR.VPS.IP ``` ```bash mtr -rwbzc 100 YOUR.HOME.IP ``` -------------------------------- ### Gitea Docker Compose setup and start command Source: https://vpsdime.com/knowledgebase/technical-questions/install-gitea Docker Compose configuration for Gitea with SQLite, published to localhost:3000 and SSH on port 2222, followed by the command to start it. The web port is localhost-only because a reverse proxy fronts it, and container port 22 maps to 2222 to avoid conflicting with your own sshd. ```yaml services: gitea: image: docker.gitea.com/gitea:latest restart: unless-stopped environment: - GITEA__database__DB_TYPE=sqlite3 volumes: - ./data:/data ports: - "127.0.0.1:3000:3000" - "2222:22" ``` ```bash cd /opt/gitea && docker compose up -d ``` -------------------------------- ### Install TigerVNC and tunnel VNC over SSH Source: https://vpsdime.com/knowledgebase/technical-questions/install-desktop-environment Installs TigerVNC, starts a VNC server (prompts for a VNC password), and creates an SSH tunnel to reach the VNC port. VNC's encryption is weak, so never expose the VNC port to the internet; keep it localhost-bound and use the tunnel to inherit SSH key security. ```bash apt install tigervnc-standalone-server ``` ```bash vncserver ``` ```bash ssh -L 5901:localhost:5901 user@YOUR.VPS.IP ``` -------------------------------- ### Crontab schedule examples with commands Source: https://vpsdime.com/knowledgebase/technical-questions/cron-basics Five worked crontab lines showing common schedules: daily at 03:30, every 5 minutes, hourly, Mondays at 06:15, and the 1st at 02:00. Each line pairs a time expression with a command path and an inline comment. Use these as a starting point for your own crontab entries. ```cron 30 3 * * * /usr/local/bin/backup.sh # every day at 03:30 */5 * * * * /usr/local/bin/sync.sh # every 5 minutes 0 * * * * /usr/local/bin/report.sh # on every hour 15 6 * * 1 /usr/local/bin/weekly.sh # Mondays at 06:15 0 2 1 * * /usr/local/bin/monthly.sh # the 1st, at 02:00 ``` -------------------------------- ### Install X2Go server Source: https://vpsdime.com/knowledgebase/technical-questions/install-desktop-environment Installs the X2Go server package. X2Go connects over SSH, so no new ports need to be opened and it inherits SSH keys and 2FA. Pair it with XFCE or LXQt; GNOME is not supported well. ```bash apt install x2goserver ``` -------------------------------- ### Download and run wireguard-install script Source: https://vpsdime.com/knowledgebase/technical-questions/wireguard-vpn Downloads the wireguard-install script from git.io and runs it. Accept defaults (UDP 51820) and name your first client. The script prints a QR code for mobile clients and writes a .conf file for desktop clients. ```bash wget https://git.io/wireguard -O wireguard-install.sh bash wireguard-install.sh ``` -------------------------------- ### Install Claude Code with npm Source: https://vpsdime.com/knowledgebase/getting-started/claude-code-on-vps Alternative installation method if you prefer npm and have Node installed. Installs the Claude Code package globally. ```bash npm install -g @anthropic-ai/claude-code ```