Hostinger VPS: How To Install Claude Code Safely as a Non-Root User @MikeMurphy-AI
Hostinger VPS: How To Install Claude Code Safely as a Non-Root User  @MikeMurphy-AI
Uploaded March 2026 | Updated September 2026, 1 week ago
Description:
Running Claude Code as root on your VPS is a real security risk.

In this tutorial, I'll walk you through creating a non-root user on your Hostinger VPS, setting up SSH access, and installing Claude Code safely so it runs with proper guardrails from day one. If you're already running Claude Code on your VPS as root, this is the video to watch before you go any further.

What You Will Learn:
Root vs. non-root — why running Claude Code as root is risky
Non-root user setup — create a user with its own directory
Sudo privileges — borrow root access only when needed
SSH key setup — copy your public key to the new user
SSH config on Mac — add a shortcut for the new user
Claude Code native install — recommended Linux method from the docs
Authorization — sign in with Claude Pro or Max

📌 Links:
🔗 Official Claude Code Docs:
docs.anthropic.com/en/docs/claude-code/getting-started

Get Hostinger VPS (n8n for free):
https://www.hostg.xyz/SHIDN

▶️ Tutorials:
Hostinger VPS: How To Create a Non-Root Sudo User
youtu.be/00mrjyTB_Lk?si=zTtrJqPrlg_OOaVu

Hostinger VPS: How To Generate & Add SSH Keys
youtu.be/6--d2faQSFY

How To Connect To Your Hostinger VPS Using SFTP:
youtu.be/5JVdlFoeYwU

Requirements:
Hostinger VPS
Root User Access
Claude Subscription (Pro or Max)

Claude Code Install Command:
curl -fsSL claude.ai/install.sh | bash

🕒 Timestamps:
00:00 Intro: About The Tutorial
00:43 Root User
01:24 Root User Risks
02:07 Solution: Create Non-Root User
03:20 Sudo Priveleges
04:21 Step-By-Step Overview
05:32 Prerequisites
06:19 Check Username (whoami)
06:45 Create & Save Password
07:05 Create New User (VPS Terminal)
08:15 GECOS Information
08:58 Add To Sudo Group
09:36 Switch Users
10:54 SSH Keys
12:35 How does SSH work?
13:37 SSH Key + Multiple Users
15:04 Edit .SSH Config (Mac)
16:12 Copy Public SSH Key To New User
19:08 Nano Editor SSH (Mac)
21:23 Exit Nano Text Editor
22:04 Test: SSH to VPS (Mac Terminal)
23:07 Install Claude Code!!!
24:59 Add Claude Code to PATH
25:49 Launch Claude Code
26:56 Authorize Claude Code (Browser)
28:42 Confirm Claude Code Install
30:46 Claude + Sudo Commands


------------Code Snippets--------------------------
Check your current user:
whoami

Create a new non-root user:
adduser mike

Add user to the sudo group:
usermod -aG sudo mike

Switch to new user (with home directory):
su - mike

Copy public SSH key to new user's directory (run as root):
mkdir -p /home/mike/.ssh
cp /root/.ssh/authorized_keys /home/mike/.ssh/authorized_keys
chown -R mike:mike /home/mike/.ssh
chmod 700 /home/mike/.ssh
chmod 600 /home/mike/.ssh/authorized_keys

Edit SSH config on Mac (add new host shortcut):
nano ~/.ssh/config

Add a new entry with your VPS IP address and new username, then save with Ctrl+O → Return → Ctrl+X

Connect via SSH as the new user:
ssh hostinger-vpn-mike

Install Claude Code (native Linux install, run as non-root user):
curl -fsSL claude.ai/install.sh | sh

Add Claude Code to PATH (run the command provided after install):

Verify the install:
claude --version

Launch Claude Code:
claude

Run the health check inside Claude Code:
/doctor

——————⭐ Resources ⭐———————
➜Gear I Use: mikemurphy.co/resources
➜Adobe After Effects: mikemurphy.co/adobe
➜Terrapin Textures: terrapintextures.com
➜ Adobe Audition Course (Domestika): mikemurphy.co/domestika

➜Amazon Influencer Store: amazon.com/shop/mikemurphyco
➜See All My Gear: mikemurphy.co/podgear
➜ Get Adobe Creative Cloud: mikemurphy.co/adobe
➜ Screenflow: mikemurphy.co/screenflow

——————⭐ Follow Me ⭐———————
➜ Website: mikemurphy.co
➜ Podcast: mikemurphy.co/mmu
➜ Instagram: instagram.com/mikeunplugged
➜ X: http://x.com/mikeunplugged
➜ YouTube: mikemurphy.co/youtube

Amazon Associates Disclosure:
Mike Murphy is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com

#claudecode #hostinger #vps #linuxsecurity #nonrootuser #sshkeys #ubuntuserver #aitools #anthropic #developertools #terminal #selfhosted #vpssetup #claudeai #aiagents
Hostinger VPS: How To Install Claude Code Safely as a Non-Root UserU1L3 Interface Tour of Adobe After EffectsRelevance AI: Build Smart AI Agents Without CodeClaude Code + n8n: How To Import MCP Server from Claude Desktop & Build WorkflowsU2L6 How To Create & Manage Layers on the Timeline of After EffectsThe Zen of Python (Import This)Greetings from Ack! 🇺🇸How To Install Claude Code on Hostinger VPSUpdate: After Effect User Guide (Free Course!)Convert Imported PSD File to Layered Comp in After EffectsFree AI for n8n: How To Install Ollama on VPS & Create Docker Network (Part 1)How To Create a Slack App for n8n Workflows
Mike Murphy | AI Handyman |

Hostinger VPS: How To Install Claude Code Safely as a Non-Root User

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER