Google Ads Header Ready

From Copy-Pasting YAML to Managing Servers with Claude Code CLI


I used to manage server problems by copying docker-compose.yml files, terminal errors, and logs into AI chatbots like Gemini, Qwen, or DeepSeek. It helped sometimes, but it always felt like I was carrying pieces of the server to the AI manually. Claude Code CLI changed that workflow for me.

Short version: Claude Code CLI changed how I manage my company Ubuntu server on Hostinger KVM2 and my home laptop server. Instead of only asking a chatbot for advice, I can let Claude Code inspect files, check logs, explain problems, and help apply fixes while I still stay in control.

For me, Claude Code CLI is not just another AI chat window. It feels like a teacher and a doer inside my server workflow.

This is the first post in my Claude Code CLI server management series. It is not a full Docker tutorial. It is the story of how my workflow changed from copy-pasting YAML into chatbots to using an AI CLI tool directly with real server projects.

Jump to

My old way: copy and paste everything into AI chatbots

Before Claude Code CLI, my workflow was very manual. If something failed, I copied the error message. If the compose file looked wrong, I copied the YAML. If I did not understand the folder structure, I tried to describe it myself.

Old workflow:
Server error → copy logs → paste into AI chatbot
YAML problem  → copy docker-compose.yml → paste into AI chatbot
AI answer     → copy command back to server → test → repeat

This worked sometimes, but it was slow. The AI could not actually see my folder, my running containers, or the real state of the server. I was the middle person moving information between the server and the chatbot.

The more services I hosted, the more painful this became.

Why Claude Code CLI feels different

Claude Code CLI feels different because it can work closer to the actual project. It can read files, inspect folders, understand configuration, and help with commands from the same environment.

That changes the relationship. Instead of only asking:

“Here is my YAML. What is wrong?”

I can ask something closer to:

“Check this project first. Tell me what you found. If action is needed, explain what you want to do before doing it.”

Teacher and doer

The best way I can describe Claude Code CLI is this:

  • Teacher: it explains what is happening and why something may be broken.
  • Doer: it can help edit files, prepare commands, and test fixes.
  • Learning partner: sometimes I ask it to stop and let me try the command myself.

This is important for me because I do not only want the server fixed. I also want to understand what I am learning.

My two server setups

I use Claude Code CLI with two different server environments: one company server and one home server.

1. Company server: Hostinger KVM2 on Ubuntu

On the company side, I have access to an Ubuntu server on Hostinger KVM2 with 8 GB RAM. I use it to host tools that help the company, including:

  • n8n for workflow automation
  • Uptime Kuma for monitoring
  • Firecrawl for crawling and extraction tasks
  • Hermes and Hermes WebUI for AI agent workflows

This server is more serious because it supports real work. I need to think about memory usage, storage, uptime, Docker services, and whether a change can affect other tools.

One very real example is Firecrawl. It is useful, but on my server it can use around 3 GB RAM. On an 8 GB VPS, that is not a small detail. It is something I need to monitor.

2. Home server: laptop running at home

My second server is a home server running on a laptop in my house. One of the important services there is Immich, which I use for photo management and backup.

This home server is personal, but it is still important. When the service is connected to photos and storage, I do not want to randomly change things without understanding the risk.

My setup in simple form:

Company server  → Hostinger KVM2, Ubuntu, 8 GB RAM
Home server     → laptop at home, Immich and personal backup workflow
Claude Code CLI → helps inspect, explain, modify, and troubleshoot

How I use Claude Code CLI Auto mode safely

Most of the time, I use Claude Code CLI in Auto mode. The reason I can trust it more is because of how I prompt it.

My usual instruction is not simply “fix this.” I normally ask it to:

  1. check the current situation first,
  2. tell me what it found,
  3. explain what action it wants to take,
  4. then proceed carefully.

Auto mode is useful, but the prompt still matters. I trust it more when I ask Claude to check first and explain the action before it changes things.

For risky actions, I still slow down. If the command touches Docker volumes, storage, firewall rules, secrets, or important services, I want an explanation first.

Three moments that made Claude Code CLI important for me

1. Refactoring a big n8n workflow

One of the biggest moments was using Claude Code CLI and Claude to refactor a large n8n workflow. The workflow I built before had become too big and hard to manage.

Claude helped break it down into smaller parts. That made the workflow easier to understand, maintain, and improve later.

This was not only a technical fix. It changed how I think about building automation. A big workflow may work, but smaller pieces are easier to debug and manage.

2. Docker pull, hosting, and Cloudflare Tunnel

Another important moment was when Claude helped me through the flow of pulling a Docker image, checking the configuration, starting the service, and exposing it through Cloudflare Tunnel.

The useful part was not just the command. It was understanding the whole flow:

Pull image → check config → start service → verify logs → expose safely → monitor

That is the difference between copying a command and learning how the setup works.

3. Managing my Immich home server

For my home server, Claude Code CLI helped me understand and manage my Immich setup. Immich is important because it connects to my photo backup workflow, so I do not want to blindly change anything.

When I work on Immich, Claude is useful because I can ask it to explain the setup, check the files, and describe the risk before doing anything.

What changed in my learning

The biggest change is that I no longer feel like I am only copying commands from the internet. Claude Code CLI helps me understand why something is broken and what each step means.

My old workflow was AI as a chat advisor. My new workflow is AI as a working partner inside the server environment.

That makes server management less scary because I can learn while fixing real problems.

What I still do carefully

I still do not treat Claude Code CLI as magic. These are the things I slow down for:

  • deleting Docker volumes or folders
  • changing firewall rules
  • editing secrets or environment files
  • restarting important production services
  • changing storage-related settings

The point is not to let AI blindly control the server. The point is to use AI to understand and operate better.

Related AI server management posts

This post is the overview of my Claude Code CLI server management workflow. These posts connect to the same self-hosting, automation, and AI-assisted server setup:

Part 2: n8n workflow refactor with Claude Code

I also wrote a focused follow-up about how Claude Code helped refactor my company n8n blog automation workflow from more than 30 nodes into 5 smaller subflows:

What I want to write next

This post is only the overview. Next, I want to write more focused posts in this Claude Code CLI server management series:

  • Part 2: how I use Claude Code CLI on my Hostinger KVM2 server
  • Part 3: how Claude helped refactor my n8n workflow
  • Part 4: how I use Docker and Cloudflare Tunnel with Claude Code CLI
  • Part 5: how I manage my Immich home server with Claude Code CLI

After those posts are published, I can come back and add internal links here so the full series is connected.

Update: I later wrote a dedicated Immich case study here: Claude Code + Immich: Fixing a 5GB Stuck Upload on My Home Server. It explains the stuck 5GB upload, Syncthing folder checks, and safer Immich update workflow in more detail.

Frequently Asked Questions

Can Claude Code CLI manage a server?

Claude Code CLI can help with server management tasks when it has access to the relevant files and commands. For my setup, I use it to inspect configuration files, understand Docker-related issues, check logs, and prepare or apply fixes.

Is Claude Code CLI safe for server management?

It depends on how it is used. I use Auto mode, but I also ask Claude to check first and explain the action before doing it. For risky actions like deleting volumes, changing firewall rules, or touching secrets, I slow down and review carefully.

What servers do I use Claude Code CLI with?

I use it with a company Ubuntu server on Hostinger KVM2 and a home server running on a laptop. The company server runs tools like n8n, Uptime Kuma, Firecrawl, Hermes, and Hermes WebUI. The home server includes Immich.

Is this a Docker tutorial?

No. This post is not a full Docker tutorial. It is the first overview post about my Claude Code CLI server management workflow. Later posts can go deeper into specific examples.

Final note

Claude Code CLI did not make me a server expert overnight. But it changed my workflow from copy-pasting YAML into chatbots to learning and managing real server setups with an AI assistant beside me.

For me, that is the real value: not just getting answers, but learning while doing.

Harvard Chin Yihao

Harvard Chin Yihao

I explore tech, markets, and build in public. Documenting my journey, practical insights, and DIY projects. Join me as I learn and grow. View Linktree

Comments