com um clique
setup-hetzner-docker-server
Initialize a fresh Hetzner Ubuntu server with a non-root user configured for Docker application deployment. Sets up secure SSH access, Docker permissions, and a dedicated data directory.
Menu
Initialize a fresh Hetzner Ubuntu server with a non-root user configured for Docker application deployment. Sets up secure SSH access, Docker permissions, and a dedicated data directory.
Generate a self-contained, human-friendly companion HTML report from a markdown AI-agent response (or any markdown document). The output is a single .html file with no external dependencies, an explicit light/dark mode toggle (with OS-preference default and persistence), and a layout chosen to fit the content type (explainer, comparison, decision doc, review feedback, status report, etc.).
Dispatch a code reviewer subagent to catch issues before they cascade. Use after completing features, fixing complex bugs, or before merging.
Track project tasks and epics in individual markdown files under docs/tasks/, with docs/PROJECT.md as the central index. Supports bootstrapping new projects and managing ongoing work.
Create a new Linear ticket using the linear CLI
Configure a Hetzner Cloud Floating IP persistently on Ubuntu servers using Netplan. Ensures the floating IP survives reboots and is externally accessible.
Commit all changes, push to remote, and create a GitHub pull request with an auto-generated description if one doesn't already exist.
| name | setup-hetzner-docker-server |
| description | Initialize a fresh Hetzner Ubuntu server with a non-root user configured for Docker application deployment. Sets up secure SSH access, Docker permissions, and a dedicated data directory. |
| allowed-tools | ["Bash"] |
Initialize a fresh Hetzner Ubuntu server with a non-root user configured for Docker application deployment. This skill sets up secure SSH access, Docker permissions, and a dedicated data directory.
Use this skill when you need to:
Before running commands, replace these placeholders:
<SERVER_IP>: The IP address of your Hetzner server<TEMP_PASSWORD>: A secure temporary password for the ubuntu userubuntu: Replace with different username if needed (default: ubuntu)/data: Replace with different data directory path if needed (default: /data)# Create user with home directory and bash shell
ssh root@<SERVER_IP> 'useradd -m -s /bin/bash ubuntu'
# Set temporary password (user should change on first use)
ssh root@<SERVER_IP> 'echo "ubuntu:<TEMP_PASSWORD>" | chpasswd'
# Verify user creation
ssh root@<SERVER_IP> 'id ubuntu'
# Create /data directory with proper ownership and permissions
ssh root@<SERVER_IP> 'mkdir -p /data && chown ubuntu:ubuntu /data && chmod 755 /data'
# Verify directory setup
ssh root@<SERVER_IP> 'ls -ld /data'
# Create sudoers drop-in file for ubuntu user
ssh root@<SERVER_IP> 'echo "ubuntu ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ubuntu'
# Set correct permissions on sudoers file
ssh root@<SERVER_IP> 'chmod 440 /etc/sudoers.d/ubuntu'
# Verify sudoers configuration
ssh root@<SERVER_IP> 'cat /etc/sudoers.d/ubuntu'
# Add ubuntu user to docker group
ssh root@<SERVER_IP> 'usermod -aG docker ubuntu'
# Verify group membership
ssh root@<SERVER_IP> 'id ubuntu'
# Should show: groups=1000(ubuntu),988(docker) or similar
# Create .ssh directory for ubuntu user
ssh root@<SERVER_IP> 'mkdir -p /home/ubuntu/.ssh'
# Copy root's authorized_keys to ubuntu user
ssh root@<SERVER_IP> 'cp /root/.ssh/authorized_keys /home/ubuntu/.ssh/authorized_keys'
# Set correct ownership and permissions
ssh root@<SERVER_IP> 'chown -R ubuntu:ubuntu /home/ubuntu/.ssh && chmod 700 /home/ubuntu/.ssh && chmod 600 /home/ubuntu/.ssh/authorized_keys'
# Verify SSH setup
ssh root@<SERVER_IP> 'ls -la /home/ubuntu/.ssh/'
# Create SSH config drop-in file to disable password auth
ssh root@<SERVER_IP> 'echo "PasswordAuthentication no" > /etc/ssh/sshd_config.d/50-disable-password-auth.conf'
# Verify configuration
ssh root@<SERVER_IP> 'cat /etc/ssh/sshd_config.d/50-disable-password-auth.conf'
# Restart SSH service (on Ubuntu 24.04, service name is 'ssh', not 'sshd')
ssh root@<SERVER_IP> 'systemctl restart ssh'
# Verify SSH service status
ssh root@<SERVER_IP> 'systemctl status ssh | head -n 10'
# Test all configurations in one command
ssh ubuntu@<SERVER_IP> '
whoami &&
echo "---SSH login successful---" &&
sudo -n whoami &&
echo "---Sudo without password successful---" &&
docker ps 2>&1 | head -n 5 &&
echo "---Docker command successful---" &&
ls -ld /data &&
echo "---/data access successful---" &&
touch /data/test-file && rm /data/test-file &&
echo "---/data write test successful---"
'
After running all steps, you should have:
ubuntu with UID 1000/data directory owned by ubuntu:ubuntussh not sshdusermod instead of useraddvisudo -c to check syntax before applying