Tmux
This terminal multiplexer allows you to run multiple terminal sessions in a single window. You can create persistent workflows that continue running, even after you disconnect from the server.
sudo apt install tmux
Debian-based systems in my examples use apt as the package manager, if you were using a Fedora-based system it would be dnf, etc.
This setup equips your virtual private server with the most powerful developer environment, combining tools for terminal management, version control, shell customization, text editing and IDE functionality.
AI Assistant OpenAI API
Use AI in your terminal. You’ll still need to hack, code and bash, but having a tmux session open with an AI helper is great for quickly grabbing a command when you need to install or update something.
I built my own mini AI helper awhile ago with JavaScript for my Linux machines. Keep in mind this is something I made in 5 minutes as a quick hack. People are working on fully fledged AI helpers for system wide access.
I’m not even using a database or txt file yet to save conversations…
const chatHistory = [];
Creating this very very basic tailored tool integrated into my terminal workflow has proven extremely useful. I recommend building your own to give you more control and customization to your specific process.
HOWEVER! Use OpenAI’s Actions API in your script because you can automate tasks like running systems cmds and shell scripts. It will execute code snippets returned by the AI too.
AI helpers allows me to run shell commands from within a Node.js app to do system-level operations like file management, server montoring and much more.
function executeCommand(command) { exec(command, (error, stdout, stderr) => { if (error) { console.error(`Error: ${error.message}`); return; } if (stderr) { console.error(`Stderr: ${stderr}`); return; } console.log(`Output: ${stdout}`); }); }
This will level up your AI helper to even work with other system services and scripts based on the model’s output, after all, it’s all text! :)
function logChatHistory(message) { fs.appendFileSync('chat_log.txt', `${message}\n`, 'utf8'); }
Create a shell alias for your AI helper so you can quickly access it from any terminal session.
alias aihelper="tmux attach -t ai_helper || tmux new -s ai_helper 'node your_script.js'"
The script running in a Tmux session with continuous access is what makes this all great.
tmux new -s ai_helper node your_script.js
Vim
By the way I use Vim (btw I use Vim). But what is Vim? It’s a highly efficient text editor for quick file editing directly in the terminal. Once you master its keybindings, it’s ideal for remote development tasks on a server. When in doubt, use Nano, otherwise, Vim.
sudo apt install vim
Git
The fundamental version control system for tracking changes, collaborating, and maintaining code repositories.
sudo apt install git
Lazygit
A simple terminal UI for Git, making it easy to manage branches, commits, and logs visually without typing complex Git commands.
Follow the tutorial here.
Zsh (with Oh My Zsh)
Zsh brings advanced shell features like auto-completion, syntax highlighting, and plugins to make terminal use smoother. Bash, the default shell, is simpler but remains widely used for scripting tasks.
Zsh is highly compatible with Bash scripts, so you get the best of both worlds—Zsh for day-to-day use and Bash for scripting.
Btop
A visually appealing and interactive process manager that allows you to monitor system resources such as CPU, memory, disk, and network usage in real-time. It provides an intuitive interface for managing processes.
If you wanna learn more about btop, I wrote a quick comparison list.
sudo apt install btop
PM2 (Node.js Only)
For my fellow JavaScript developers who are coming from a serverless to self-hosting stack, PM2 is beautiful. It’s a production-grade process manager for Node.js apps. Essentially, it allows you to keep your Node.js apps running in the background, manage logs, and automatically restart apps if they crash.
sudo npm install pm2@latest -g
Secure Shell
The crux, the glue, the bread and butter of self-hosting.
sudo apt install openssh-server
SSH is a protocol for securely accessing and managing a remote server over an encrypted connection. It allows you to run commands, transfer files, and manage systems remotely with security. Once installed, SSH enables encrypted communication, ensuring data privacy and integrity during remote sessions.
Mosh
A mobile-friendly SSH replacement designed for better connection stability over unreliable or changing networks (e.g., switching from Wi-Fi to mobile data). It keeps your session running and responsive, even if the connection drops, making it ideal for mobile use.
sudo apt install mosh
Termius (Mobile App)
An app for Android and iOS that supports SSH, Mosh, and Tmux. It lets you manage remote servers from your phone with an intuitive interface, secure key management, and multi-session support, perfect for developers and sysadmins on the go.
Google Play Store or Apple App Store
UFW (Uncomplicated Firewall)
ufw a tool for managing firewall rules on Linux systems. It simplifies the process of configuring iptables, providing a fast command-line interface for defining rules to allow or block traffic to specific ports or IP addresses e.g., SSH on port 22 and blocking unwanted access.
Visual Studio Code (VSCode)
Using VSCode’s Remote SSH extension you can edit files on your VPS server seamlessly from your local machine; it’s an excellent addition. Install it here.