Run your own server
the modern, secure way.
A step-by-step checklist for your self-managed VPS — from the first login to a secure server running your website with HTTPS and backups. About an hour, start to finish.
Connect to your server
5 minYou received your server's IP address and root password by email and SMS. Open a terminal on your computer:
- Windows 10/11: open Terminal (or PowerShell) — SSH is built in, no PuTTY needed.
- macOS / Linux: open Terminal.
- Phone: use an SSH app such as Termius.
ssh root@YOUR_SERVER_IPType yes when asked to trust the server, then paste the password (nothing appears while you type — that's normal). Change the root password straight away:
passwdUpdate and set the basics
5 minInstall the latest security fixes, then set your time zone and a name for the server.
apt update && apt full-upgrade -y
timedatectl set-timezone Africa/Addis_Ababa
hostnamectl set-hostname my-serverIf the update installed a new kernel, restart once with reboot and log in again after ~30 seconds.
Using AlmaLinux, Rocky or CentOS Stream?
Use dnf instead of apt on this and later steps:
dnf upgrade -y
timedatectl set-timezone Africa/Addis_AbabaThe user group for admins is wheel instead of sudo, and the firewall is firewalld (firewall-cmd --permanent --add-service=http).
Small server? Add a swap file
Swap gives the server breathing room when memory is full, so apps slow down instead of crashing.
fallocate -l 2G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstab
free -hCreate your own user
3 minWorking as root all the time is risky — one typo can break the whole system. Create a normal user that can use sudo for admin tasks. We'll call it deploy; choose any name.
adduser deploy
usermod -aG sudo deployPick a strong password when asked — you'll need it for sudo. The other questions (full name, room number…) can be left empty.
Log in with an SSH key
5 minSSH keys are much safer than passwords and you never have to type a password to log in. Create a key on your own computer (not on the server). Press Enter to accept the default location, and set a passphrase to protect the key.
ssh-keygen -t ed25519 -C "my-laptop"Copy the public key to your new user:
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh deploy@YOUR_SERVER_IP "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"ssh-copy-id deploy@YOUR_SERVER_IPNow test it — this must log you in without asking for the server password:
ssh deploy@YOUR_SERVER_IP~/.ssh/id_ed25519) somewhere safe, such as a password manager. Never share it — only the .pub file goes on servers.Lock down SSH
5 minTurn off password logins and direct root login. Bots try thousands of passwords a day against every server on the internet; with keys only, they have nothing to guess.
sudo tee /etc/ssh/sshd_config.d/00-hardening.conf > /dev/null <<'EOF'
PermitRootLogin no
PasswordAuthentication no
KbdInteractiveAuthentication no
EOF
sudo sshd -t && sudo systemctl restart sshThe file name starts with 00- on purpose: SSH uses the first value it reads, so this file wins over the cloud image's default settings. Check that it worked:
sudo sshd -T | grep -E 'permitrootlogin|passwordauthentication'You should see permitrootlogin no and passwordauthentication no. Then open a new terminal window and confirm ssh deploy@YOUR_SERVER_IP still works before closing the old one.
Turn on the firewall
3 minBlock everything except SSH and the web. Allow SSH first, then switch the firewall on.
sudo apt install -y ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH
sudo ufw allow 80,443/tcp
sudo ufw enable
sudo ufw status verboseNeed another port later (for example a game server or API)? Open it with sudo ufw allow 3000/tcp, and close it with sudo ufw delete allow 3000/tcp.
-p 8080:80) is reachable from the internet even if ufw blocks it. Publish only your web proxy on 80/443, or bind others to localhost: 127.0.0.1:8080:80.Automatic security updates
3 minLet the server install security patches by itself every day, and ban IP addresses that keep failing to log in.
sudo apt install -y unattended-upgrades fail2ban
sudo dpkg-reconfigure -plow unattended-upgrades
sudo systemctl enable --now fail2banAnswer Yes to automatic updates. Check the status any time with sudo fail2ban-client status sshd.
Point your domain
5 minAt the company where your domain is registered (or in Client area → Domains → DNS if it's with us), create these records:
| Type | Name | Value |
|---|---|---|
| A | @ | YOUR_SERVER_IP |
| A | www | YOUR_SERVER_IP |
| AAAA (optional) | @ | your IPv6 network + 1, e.g. 2a01:4f8:…::1 |
Changes usually work within minutes but can take a few hours. Check from your computer:
nslookup example.comRun your website or app
15 minChoose one way to run your sites. Option A is what we recommend for most people today.
Every app runs in its own container, and Caddy gets and renews free HTTPS certificates automatically. Moving to a new server later is just copying one folder. Install Docker:
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
exitLog in again (so the group change applies). Here's a complete WordPress site with a database and HTTPS — replace example.com with your domain:
mkdir -p ~/site && cd ~/site
echo "DB_PASSWORD=$(openssl rand -hex 24)" > .env
printf 'example.com, www.example.com {\n reverse_proxy wordpress:80\n}\n' > Caddyfile
nano compose.yamlPaste this into compose.yaml, save with Ctrl+O, Enter, Ctrl+X:
services:
caddy:
image: caddy:2
restart: unless-stopped
ports: ["80:80", "443:443", "443:443/udp"]
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
wordpress:
image: wordpress:php8.3-apache
restart: unless-stopped
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wp
WORDPRESS_DB_PASSWORD: ${DB_PASSWORD}
WORDPRESS_DB_NAME: wp
volumes: [wp_data:/var/www/html]
db:
image: mariadb:11
restart: unless-stopped
environment:
MARIADB_DATABASE: wp
MARIADB_USER: wp
MARIADB_PASSWORD: ${DB_PASSWORD}
MARIADB_RANDOM_ROOT_PASSWORD: "1"
volumes: [db_data:/var/lib/mysql]
volumes: { caddy_data: {}, caddy_config: {}, wp_data: {}, db_data: {} }docker compose up -d
docker compose ps
docker compose logs -f caddyOpen https://example.com — the padlock appears within a minute. Only Caddy is published to the internet; the database stays private inside Docker.
Node.js, Python or another app instead of WordPress?
Replace the wordpress and db services with your own image (or build: . with a Dockerfile) and point Caddy at its port, e.g. reverse_proxy app:3000. Several sites can share one Caddy — add one block per domain to the Caddyfile and run docker compose restart caddy.
Prefer clicking to typing? Coolify is a free, open-source panel that deploys websites, apps and databases from a browser, with automatic HTTPS and backups to S3 storage. Install it on a fresh server (2 GB RAM or more):
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | sudo bashThen open http://YOUR_SERVER_IP:8000 straight away and create the admin account — the first person to visit becomes the owner. Set a domain for the panel in its settings so it is served over HTTPS.
The traditional setup: Nginx serves files from a folder, and Certbot adds a free Let's Encrypt certificate.
sudo apt install -y nginx certbot python3-certbot-nginx
sudo mkdir -p /var/www/example.com && sudo chown $USER: /var/www/example.com
echo '<h1>It works</h1>' > /var/www/example.com/index.html
sudo nano /etc/nginx/sites-available/example.comserver {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
root /var/www/example.com;
index index.html index.php;
}sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d example.com -d www.example.comCertbot renews the certificate automatically. Upload files with scp, rsync or an SFTP app (FileZilla, WinSCP) using your deploy user and SSH key.
Set up backups
10 min1. Dump the database every night (Docker WordPress example). Run crontab -e and add this line:
0 2 * * * mkdir -p ~/backups && cd ~/site && docker compose exec -T db sh -c 'mariadb-dump -u wp -p"$MARIADB_PASSWORD" wp' | gzip > ~/backups/db-$(date +\%F).sql.gz && find ~/backups -name 'db-*' -mtime +14 -delete2. Copy backups off the server. The simplest way — download them to your computer every week:
scp -r deploy@YOUR_SERVER_IP:~/backups ./vps-backupsAutomatic, encrypted off-site backups with restic
restic makes encrypted, de-duplicated backups to cheap S3-compatible storage (Cloudflare R2, Backblaze B2, Wasabi…). Create a bucket and access key there, then:
sudo apt install -y restic
export RESTIC_REPOSITORY=s3:https://YOUR-S3-ENDPOINT/your-bucket
export AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... RESTIC_PASSWORD=choose-a-long-password
restic init
restic backup ~/site ~/backups
restic snapshotsSave these variables in a file only you can read (chmod 600), and schedule restic backup with cron. Write the restic password down — without it the backups cannot be restored.
3. Test a restore once, so you know it works before you need it.
Monitor and maintain
ongoingQuick health checks:
htop # CPU and memory (q to quit; sudo apt install htop)
df -h # free disk space
free -h # memory and swap
docker stats # usage per container
sudo journalctl -p err -b # errors since the last bootGet an alert when your site goes down: a free uptime monitor such as UptimeRobot, or self-hosted Uptime Kuma, checks your site every minute and messages you on Telegram or email.
- Log in and run
sudo apt update && sudo apt full-upgrade -y, thensudo rebootif asked. - Update containers:
docker compose pull && docker compose up -d && docker image prune -f - Check disk space (
df -h) — keep at least 20% free. - Make sure the latest backup is on your computer or off-site storage.
- Update WordPress plugins and themes, and remove the ones you don't use.
Troubleshooting
"Connection timed out" / can't connect
Check the server shows Running in your client area and that you use the right IP. If you just enabled the firewall without allowing SSH, you are locked out — reinstalling is the only fix.
"Permission denied (publickey)"
Your key isn't being offered or isn't on the server. Log in as the right user (deploy, not root), and try ssh -i ~/.ssh/id_ed25519 deploy@YOUR_SERVER_IP. Add -v to see details.
"WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED" after reinstalling
Expected after a reinstall — the server has new keys. Remove the old entry on your computer, then connect again:
ssh-keygen -R YOUR_SERVER_IPSite doesn't load or HTTPS fails
Check DNS points to YOUR_SERVER_IP (nslookup example.com), ports 80 and 443 are open (sudo ufw status), and read the logs: docker compose logs caddy or sudo tail -50 /var/log/nginx/error.log. Let's Encrypt needs DNS to be correct before it can issue a certificate.
Server is slow or apps crash
Look for a full disk (df -h) or memory (free -h, htop). Add swap (step 2), clean Docker with docker system prune, or upgrade to a bigger plan.
Sending email from the server
Outgoing mail on ports 25 and 465 is often blocked on new cloud servers to stop spam. Send through an email service (SMTP on port 587) such as Brevo, Mailgun or Amazon SES instead — it also lands in inboxes far more reliably.
Still stuck? Open a support ticket — we help with access, network and billing problems. Software on the server is self-managed, but we'll point you in the right direction.
Ask the AI assistant
Stuck on a step, or want to install something else? Ask in English or Amharic.
Sign in to askNeed help with anything?
Our team is here to help with setup, billing, migrations or tricky technical questions — any time of day.