New Virtual Machine Server Setup Checklist
Software engineer and founder with a background in finance and tech. Currently building aVenture.vc, a platform for researching private companies. Based in San Francisco.
New Virtual Machine Server Setup Checklist
I use a lot of checklists -- here is one of mine for setting up a new Linux virtual machine server. The commands are written for Ubuntu/Debian-based systems.
System Updates
Update Package Lists and Upgrade System
First, let's update the package lists and upgrade existing packages:
apt update: Updates the package list/index files from repositoriesapt upgrade: Actually upgrades the installed packages to their latest versions
Docker Installation
Follow these steps to install Docker properly on Ubuntu:
1. Remove Conflicting Packages
2. Set up Docker Repository
3. Install Docker Engine
4. Configure Docker to Start on Boot
Change Hostname
To permanently change your server's hostname:
And update /etc/hosts to reflect the new hostname:
User Management
Create New User with Sudo Privileges
Essential CLI Tools Installation
Install Homebrew
Login as your new user above first, as you can't install homebrew as root.
Install Micro Editor
Install Lazydocker and Lazygit
SSH Server Configuration
1. Generate SSH Key Pair (on your local machine)
2. Configure SSH Server
Edit /etc/ssh/sshd_config:
Add/modify these important settings:
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
MaxAuthTries 10
3. Add SSH Keys
For the new user:
4. Restart SSH Service
Security Recommendations
- Always keep your system updated
- Don't allow SSH logins via password
- Consider using UFW (Uncomplicated Firewall) to manage incoming connections
Remember to test SSH access with your new user before closing your current session to ensure you haven't locked yourself out of the server.