Loading...

Bluehost: VPS Self-Hosting Deployment Recipe & Guide

Who this is for: This is a recipe, not a finished script — it's meant to get you (or your team) comfortable with the concepts and terms involved, then hand off the actual command generation to an AI assistant using a filled-out prompt template.

This guide helps teams and individuals with varying technical backgrounds prepare to self-host web applications on a VPS using Docker, Nginx, and Let's Encrypt SSL. It covers the terminal skills you'll want going in, plain-English explanations of the moving parts, a fillable prompt template you hand to an AI assistant to generate your actual deployment commands and config files, and a completed example of that template in action.

Part 0: Prerequisites and Core Terminal Skills

Before running anything on a real server, you should be comfortable with five basic CLI skills. None of these take long to pick up, and you don't need to master them — just recognize what they're for.

Skill What It's For Essential Commands Search This If You're Stuck
1. Connecting via SSH Opens a remote command session on your VPS from your own computer ssh [email protected] "SSH key authentication tutorial"
2. Navigating the file system Moving between folders and seeing what's there pwd · ls -la · cd ~/web-stack "Linux command line directory navigation basics"
3. Creating & editing files Writing and saving config files directly in the terminal nano docker-compose.yml (Ctrl+O then Enter to save, Ctrl+X to exit) "Beginner nano text editor cheat sheet"
4. Admin privileges & permissions The rights needed to install software or touch system config sudo apt update (or sudo dnf update) · mkdir -p ~/web-stack/nginx "Linux file permissions chmod chown explained"
5. Managing services & containers Checking that things are actually running and troubleshooting when they're not docker compose ps · docker compose logs -f "Basic Docker CLI commands for beginners"

Part 1: Core Self-Hosting Concepts (Glossary)

These are the five terms that come up constantly once you start this kind of deployment. Knowing what each one actually does makes the rest of this guide — and whatever an AI assistant generates for you — much easier to sanity-check.

1. VPS and Operating System — The Server Host

A VPS is a cloud virtual machine running Linux — commonly Ubuntu 24.04, Debian 12, or AlmaLinux 10. Run it as a non-root user with sudo rights; that's standard security practice, not a suggestion. One thing worth knowing up front: newer distributions like AlmaLinux 10 use nftables for firewall management instead of the older iptables, so instructions written for older systems won't always translate directly.

Search: "Initial server setup Ubuntu 24.04" or "AlmaLinux non-root user setup sudo"

2. Domain and DNS — The Address

DNS is what turns a domain like example.com into your server's actual IP address. You'll need to add an A-record at your registrar — Namecheap, Cloudflare, GoDaddy, whichever you use — pointing that domain at your VPS's IP.

Search: "How to add A record DNS [Your Registrar Name]"

3. Docker and Docker Compose — The Containers

Docker packages each application and database into its own isolated container. Docker Compose then uses a single YAML file — docker-compose.yml — to define and launch all of those containers, along with their networks, together.

Search: "Docker Compose tutorial for beginners" or "YAML syntax rules for Docker"

4. Reverse Proxy / Nginx — The Front Door

A reverse proxy sits on the public-facing ports — 80 for HTTP, 443 for HTTPS — and routes each incoming request to the right container based on which domain name was requested.

Search: "Nginx reverse proxy docker compose setup"

5. SSL Certificates / Certbot — The Security Padlock

This is what encrypts traffic to your site using free Let's Encrypt certificates. Certbot automates requesting and renewing them — but your domain's A-record needs to already be pointing at the server before you can generate a certificate for it.

Search: "Certbot webroot ACME challenge docker nginx"

Part 2: The AI Prompt Recipe Template

Once you know the five concepts above, you don't need to hand-write every command yourself. Copy the block below, fill in your own details, and paste the whole thing into an AI assistant — it'll generate the terminal commands and config files tailored to your setup.

VPS APPLICATION DEPLOYMENT PROMPT TEMPLATE
=================================================================

I have a VPS server and I want to deploy web applications using Docker
Compose behind an Nginx Reverse Proxy with automated Let's Encrypt SSL
certificates.

Please provide me with a clear, step-by-step execution plan tailored to
my environment details below. Include all terminal commands, text
editor steps (using nano), directory structures, and configuration files.

-----------------------------------------------------------------
SECTION 1: SERVER & ENVIRONMENT DETAILS
-----------------------------------------------------------------
1. Operating System: [e.g., Ubuntu 24.04 LTS / AlmaLinux 10 / Debian 12]
2. Server Hardware Specs: [e.g., 4 vCPU, 8 GB RAM, 100 GB NVMe]
3. Server Public IP: [e.g., 123.45.67.89]
4. Non-Root User Account Name: [e.g., devuser]
5. Primary Project Directory Path: [e.g., ~/web-stack]

-----------------------------------------------------------------
SECTION 2: APPLICATIONS TO HOST
-----------------------------------------------------------------
App 1:
- Application Name: [e.g., Ghost Blog / WordPress / Immich / Nextcloud]
- Target Domain/Subdomain: [e.g., blog.mywebsite.com]
- Associated Database: [e.g., MySQL / MariaDB / PostgreSQL / None]

App 2 (if multi-site):
- Application Name: [e.g., WordPress]
- Target Domain/Subdomain: [e.g., mywebsite.com]
- Associated Database: [e.g., MariaDB]

App 3 (if applicable):
- Application Name: [e.g., Immich Photo Server]
- Target Domain/Subdomain: [e.g., photos.mywebsite.com]
- Associated Database: [e.g., PostgreSQL + Redis]

-----------------------------------------------------------------
SECTION 3: OPTIONAL INTEGRATIONS & REQUIREMENTS
-----------------------------------------------------------------
- System Email / SMTP Needed?: [Yes/No - e.g., Gmail SMTP for notifications]
- Firewall Tools Installed: [e.g., UFW / Firewalld / NFTables / Unsure]
- Specific Plugins or Extensions: [e.g., Sharp image library for Ghost]

-----------------------------------------------------------------
SECTION 4: WHAT I NEED YOU (THE AI) TO GENERATE
-----------------------------------------------------------------
1. DNS Instructions: Exact A-record configuration required at my
   domain registrar.
2. Step-by-Step Terminal Commands: Directory setup (mkdir), file
   creation (nano), and permissions commands.
3. Nginx Server Block Configurations: Full .conf configuration files
   for each domain.
4. Unified docker-compose.yml: Formatted compose file with all
   containers, databases, persistent volumes, and custom bridge networks.
5. SSL Generation Process: Step-by-step Certbot commands using the
   HTTP webroot challenge to issue Let's Encrypt certificates.
6. Verification & Troubleshooting: Commands to view live logs
   (docker compose logs -f) and check container health.
=================================================================

Part 3: Example Prompt (Filled Out)

Here's what that same template looks like once someone's actually filled it in — ready to paste straight into an AI assistant:

I have a VPS server and I want to deploy web applications using Docker Compose behind an
Nginx Reverse Proxy with automated Let's Encrypt SSL certificates.

Please provide me with a clear, step-by-step execution plan tailored to my environment details
below. Include all terminal commands, text editor steps (using nano), directory structures, and
configuration files.

SECTION 1: SERVER & ENVIRONMENT DETAILS
1. Operating System: AlmaLinux 10
2. Server Hardware Specs: 4 vCPU, 8 GB RAM, 200 GB NVMe
3. Server Public IP: 129.121.79.51
4. Non-Root User Account Name: rodjohnson
5. Primary Project Directory Path: ~/web-stack

SECTION 2: APPLICATIONS TO HOST
App 1:
- Application Name: Ghost Blog
- Target Domain/Subdomain: myorphos.com
- Associated Database: MySQL 8.0

App 2:
- Application Name: Immich Photo Server
- Target Domain/Subdomain: photos.myorphos.com
- Associated Database: PostgreSQL + Redis

SECTION 3: OPTIONAL INTEGRATIONS & REQUIREMENTS
- System Email / SMTP Needed?: Yes (Gmail App Password)
- Firewall Tools Installed: nftables
- Specific Plugins or Extensions: Sharp image processing for Ghost

SECTION 4: WHAT I NEED YOU (THE AI) TO GENERATE
1. DNS Instructions: Exact A-record configuration required at my domain registrar.
2. Step-by-Step Terminal Commands: Directory setup (mkdir), file creation (nano), and
   permissions commands.
3. Nginx Server Block Configurations: Full .conf configuration files for each domain.
4. Unified docker-compose.yml: Formatted compose file with all containers, databases,
   persistent volumes, and custom bridge networks.
5. SSL Generation Process: Step-by-step Certbot commands using the HTTP webroot challenge
   to issue Let's Encrypt certificates.
6. Verification & Troubleshooting: Commands to view live logs (docker compose logs -f) and
   check container health.
This example is deliberately a two-app setup — a blog and a photo server, each with its own database — so it exercises every section of the template at once. Swap in your own OS, IP, apps, and domains and the AI assistant should return output structured the same way: DNS steps, terminal commands, Nginx configs, a compose file, the Certbot flow, and verification commands, all specific to what you entered.

Summary

This recipe isn't a script you run start to finish — it's the groundwork that makes an AI-generated deployment plan actually trustworthy. Get comfortable with the five terminal basics, understand what a VPS, DNS, Docker, Nginx, and Certbot are each doing in the stack, then fill out the prompt template with your real environment details and hand it to an AI assistant. Because you already know what each piece is supposed to do, you're in a position to sanity-check the commands and config files it hands back, instead of copy-pasting blind.

Loading...