Setting Up My Linux Server, SSH & OpenClaw
Deploying Ubuntu LTS as a personal lab — hardening SSH, wiring up locally hosted AI models, and debugging the container networking that always trips you up the first time.
Introduction
Recently, I set up a dedicated Ubuntu LTS server to experiment with self-hosting AI tools, Linux administration, and secure remote access.
The goal was to create a stable environment for learning server management, SSH configuration, containerized applications, and locally hosted AI systems. I also wanted to better understand how AI gateways communicate with local models and external services.
Initial Server Setup
I started by deploying Ubuntu Server and configuring the environment through SSH. The setup included updating packages, configuring users, enabling firewall rules, and securing remote access.
I used SSH keys instead of password authentication to improve security and reduce exposure to brute-force attacks.
SSH Configuration
One of the first things I focused on was securing SSH access. This included generating SSH keys, disabling unnecessary access methods, and testing remote connectivity from multiple devices.
Working with SSH helped me better understand remote Linux administration, authentication, file permissions, and server management workflows.
Experimenting with OpenClaw
After setting up the server, I started experimenting with OpenClaw and locally hosted AI models. The goal was to create a lightweight AI environment capable of routing requests between applications and local inference models.
The stack included:
- Docker containers
- Ollama
- local AI models
- gateway services
Container Networking Challenges
One of the biggest challenges was container networking. I ran into issues where services inside Docker containers could not communicate with locally running AI services.
This involved troubleshooting localhost behaviour, Docker networking, internal container DNS, and host-to-container communication.
I experimented with host.docker.internal to reach host-bound services from inside a container, and tested Ollama's /api/tags endpoint to verify whether models were accessible:
curl http://host.docker.internal:11434/api/tagsIf that returns the list of installed models, the bridge is working; if it hangs or refuses, the network namespace isn't reaching the host.
Managing Services with systemd
To make services persistent across reboots, I configured systemd units for both the AI-related processes and the server applications:
sudo systemctl enable --now ollama
sudo systemctl status ollamaLearning how Linux services start, stop, and restart automatically helped me better understand server operations and infrastructure management.
What I Learned
This project improved my understanding of Linux servers, SSH hardening, Docker networking, local AI hosting, service persistence, and infrastructure troubleshooting.
It also gave me hands-on experience debugging real-world problems involving networking, containers, and AI tooling — the kind of issues that don't show up in tutorials but always appear in production environments.