# Installation

This chapter is about getting started, installing Infinity Tools and learning about subdomains.

# 1: Getting Started

Welcome! This guide is designed for people who have some IT interest but don't work professionally in IT. Whether you're exploring Infinity Tools for personal use or considering it for a small business, this guide will walk you through everything step-by-step in plain language.

## What Do I Need to Use Infinity Tools?

To use Infinity Tools, you need a **[Linux](https://en.wikipedia.org/wiki/Linux) server** - that's a computer running Linux that's always connected to the internet. Most people don't have a server at home, so you'll rent one from a cloud provider (like renting a computer in the cloud).

### You'll Need:

1. ✅ **A Linux Server** - We'll help you get one from a cloud provider
2. ✅ **A Credit Card** - To pay for the server (usually $5-10/month)
3. ✅ **Basic Computer Skills** - If you can use email and browse the web, you're good!
4. ✅ **About 30 Minutes** - To get everything set up

**Don't worry if terms like "Linux" or "server" sound scary - we'll explain everything as we go!**

## What is a Linux Server?

Think of a server like a computer that runs 24/7 on the internet. Instead of having a screen and keyboard, you control it remotely using your regular computer. The server runs special software ([Linux](https://en.wikipedia.org/wiki/Linux)) that's designed to host websites and applications.

**Why rent a server?**

- It's always on (your home computer isn't)
- It's fast and reliable
- It's cost-effective (much cheaper than buying hardware)
- You can access it from anywhere

## Choosing a Cloud Provider

Cloud providers are companies that rent out servers. We'll focus on two beginner-friendly options that are affordable and easy to use.

### Option 1: Hetzner Cloud (Recommended)

**Why [Hetzner](https://www.hetzner.com/):**

- ✅ Excellent value for money (~€4-5/month)
- ✅ Simple and straightforward interface
- ✅ Good performance
- ✅ Based in Europe (strong data protection laws)

**Perfect for:** Beginners who want the best price-performance ratio

**What you'll get:**

- A virtual server (called a "Cloud Server")
- Full control over your server
- All the tools you need

### Option 2: DigitalOcean

**Why [DigitalOcean](https://www.digitalocean.com/):**

- ✅ Very beginner-friendly interface
- ✅ Excellent documentation and tutorials
- ✅ Great customer support
- ✅ $6/month starting price

**Perfect for:** Beginners who want lots of help and tutorials

**What you'll get:**

- A "Droplet" (their name for a server)
- Web-based dashboard
- Helpful community resources

### Other Options

You can also use:

- [**Linode**](https://www.linode.com/) - Similar to DigitalOcean, good alternative
- [**Vultr**](https://www.vultr.com/) - Competitive pricing, global locations
- **[AWS Lightsail](https://aws.amazon.com/lightsail/)**- Amazon's simple option (can be more complex)

**Our recommendation:** Start with **Hetzner** if you want the best price, or **DigitalOcean** if you want extra hand-holding.

## Getting Your First Server

### Step 1: Create an Account

1. Visit [Hetzner Cloud](https://www.hetzner.com/cloud) or [DigitalOcean](https://www.digitalocean.com/)
2. Click "Sign Up" or "Create Account"
3. Enter your email and create a password
4. Verify your email address
5. Add a payment method (credit card)

**Don't worry:** You won't be charged until you create a server, and you can stop it anytime.

### Step 2: Create Your Server

#### For Hetzner Cloud:

1. **Login** to your Hetzner Cloud account
2. **Click "New Project"** (if you don't have one) 
    - Name it something like "My Infinity Tools"
3. **Click "Add Server"**
4. **Choose Location:**
    - Pick a location close to you (Germany, Finland, USA, etc.)
5. **Choose Image:**
    - Select **Ubuntu 22.04** or **Ubuntu 24.04** (recommended)
    - Don't worry about other options - Ubuntu is perfect for beginners
6. **Choose Server Type:**
    - Select **CX11** (€4.51/month) - this is enough to start
    - This gives you: 1 CPU, 2GB RAM, 20GB storage
7. **Networking:**
    - Leave default settings (IPv4 enabled)
8. **SSH Keys:**
    - We'll skip this for now (covered in next article)
9. **Name Your Server:**
    - Something like "infinity-tools-server"
10. **Click "Create &amp; Buy Now"**

**After creation:** You'll see your server's IP address (looks like: 123.45.67.89) - **write this down!**

#### For DigitalOcean:

1. **Login** to your DigitalOcean account
2. **Click "Create" → "Droplets"**
3. **Choose Image:**
    - Select **Ubuntu 22.04 LTS** or **Ubuntu 24.04 LTS**
4. **Choose Plan:**
    - Select **Basic** → **Regular** → **$6/month** (1GB RAM, 1 CPU)
    - Or **$12/month** (2GB RAM) for better performance
5. **Choose Datacenter Region:**
    - Pick a location close to you
6. **Authentication:**
    - Choose "Password" for now (we'll set up SSH keys later)
    - Create a strong password - **save this password!**
7. **Finalize:**
    - Name your droplet (e.g., "infinity-tools")
    - Click "Create Droplet"

**After creation:** You'll see your server's IP address - **write this down!**

### Step 3: Configure Your Server

Once your server is created, you need to do a few basic setup steps:

#### Enable Basic Firewall (Important!)

Your server needs basic protection. Here's how (we'll cover connecting to your server properly in the next article, but for now):

**For Hetzner:**

- Firewall is usually enabled by default, but you can add rules in the Hetzner Cloud console

**For DigitalOcean:**

- Go to "Networking" → "Firewalls"
- Create a firewall that allows: 
    - SSH (port 22)
    - HTTP (port 80)
    - HTTPS (port 443)
- Apply it to your droplet

**Why this matters:** A firewall protects your server from unwanted access. We'll configure this properly later.

## What You'll Need Next

Before you can install Infinity Tools, you'll need:

### 1. A Domain Name (Optional but Recommended)

**What is a domain name?** It's like an address for your website (e.g., `mywebsite.com`).

**Why you need it:** Infinity Tools can automatically set up secure connections (HTTPS) if you have a domain name. Without one, you can still use it, but browsers will show security warnings.

**Where to get one:**

- [**Namecheap**](https://www.namecheap.com/) - Easy to use, good prices (~$10-15/year)
- [**Cloudflare**](https://www.cloudflare.com/) - Very affordable (~$9/year), includes free features
- **Your cloud provider** - Both Hetzner and DigitalOcean sell domains

**What to do:**

1. Buy a domain name (e.g., `myinfinitytools.com`)
2. Point it to your server's IP address (we'll show you how in the next article)

**Don't have a domain?** That's okay! You can always add one later or use your server's IP address directly.

### 2. Basic Information

**Server IP Address:** You got this when you created your server (looks like: 123.45.67.89)

**Server Password (DigitalOcean):** The password you created when setting up the droplet

**Cloud Provider Account:** Keep your login credentials handy

## Understanding Server Costs

**Monthly Costs:**

- Server: €4-6/month (~$5-7) for basic setup
- Domain name: ~$10-15/year (one-time each year)
- **Total: ~$6-8/month** for your own self-hosted services!

**What's Included:**

- A great variety of applications (WordPress, password manager, cloud storage, etc.)
- No per-user fees
- No storage limits (within your server's capacity)
- Full control over your data

**Compared to SaaS:**

- Password manager: $3-5/month per user
- Cloud storage: $5-10/month per user
- Analytics: $100s/month
- **Your own server: One price, unlimited everything!**

## Security Basics

**Keep Your Server Safe:**

1. ✅ Always use strong passwords
2. ✅ Keep your server updated
3. ✅ Use a firewall (we'll set this up)
4. ✅ Don't share your server passwords
5. ✅ Enable automatic security updates

Infinity Tools will help with most of this automatically!

## You're Ready!

You now have:

- ✅ A cloud account
- ✅ A Linux server running
- ✅ The server's IP address
- ✅ Basic understanding of what you're working with

## What's Next?

The [next article](https://docs.speedbits.io/books/2-beginner-path/page/2-installing-infinity-tools "2: Installing Infinity Tools") will cover:

- **Connecting to your server** using SSH (don't worry, we'll explain this!)
- **Getting Infinity Tools onto your server**
- **Running the installer**
- **Setting up your first applications**

**Don't worry if some of this feels new!** We'll walk through everything step-by-step, and Infinity Tools will handle most of the technical stuff automatically.

## Quick Tips

**If you get stuck:**

- Both Hetzner and DigitalOcean have excellent documentation
- Take your time - there's no rush
- You can always delete and recreate your server if something goes wrong

**Safety first:**

- Never share your server passwords
- Keep your cloud provider account secure
- Write down important information (IP address, passwords) in a safe place

**Remember:**

- Your server is a computer in the cloud - treat it like any important computer
- You can stop your server anytime to avoid charges
- Start small and learn as you go

---

*Next: [Connecting to Your Server and Installing Infinity Tools](https://docs.speedbits.io/books/2-beginner-path/page/2-installing-infinity-tools) (Article 2)*

# 2: Installing Infinity Tools

Welcome back! In [Chapter 1](https://docs.speedbits.io/books/2-beginner-path/page/1-getting-started "1: Getting Started"), you set up your Linux server. Now we'll connect to it and install Infinity Tools. Don't worry - we'll walk through every step together!

## What We'll Do in This Chapter

By the end of this chapter, you will:

- ✅ Know how to connect to your server from your computer
- ✅ Have Infinity Tools downloaded and installed on your server
- ✅ Be able to run Infinity Tools for the first time

**Time needed:** About 15-20 minutes

## What is SSH? (Simple Explanation)

[**SSH**](https://en.wikipedia.org/wiki/Secure_Shell) stands for "Secure Shell" - but you don't need to remember that! Think of SSH as a secure tunnel that connects your computer to your server. It's like having a remote control for your server that you can use from your regular computer.

**Why we need it:** Since your server is "in the cloud" (not physically in front of you), we need a way to control it. SSH is that way - it's safe, secure, and the standard way to manage servers.

**Don't worry!** SSH might sound technical, but we'll show you exactly how to use it. It's actually quite simple once you see it in action!

## Step 1: Connect to Your Server with SSH

The first thing we need to do is connect to your server. The steps are slightly different depending on whether you use Windows, Mac, or Linux. Choose your computer type below:

### For Windows Users

Windows 10 and 11 have SSH built-in (it's a program called "SSH" that comes with Windows). Here's how to use it:

#### Option A: Using Windows Terminal or Command Prompt

1. **Open Command Prompt or PowerShell:**
    - Press the `Windows` key
    - Type "cmd" or "PowerShell"
    - Click on "Command Prompt" or "Windows PowerShell"
2. **Connect to your server:**
    - Type this command (replace `YOUR_IP_ADDRESS` with your actual server IP):

```
ssh root@YOUR_IP_ADDRESS
```

**For Hetzner:** `root` stays `root` (Hetzner uses root by default)  
**For DigitalOcean:** `root` stays `root` (most DigitalOcean images use root)

**Example:** If your server IP is `123.45.67.89`, you would type:

```
ssh root@123.45.67.89
```

3. **You'll see a security warning:**
    - The first time you connect, Windows will ask "Are you sure you want to continue connecting?"
    - Type `yes` and press Enter
    - This is normal and safe - it's just Windows double-checking
4. **Enter your password:**
    - For **Hetzner:** If you did not provide an SSH key (we did not cover that here), Hetzner sends you a one time password via email. You will have to change it immediately after your first log-in (Linux will force you to change it).
    - For **DigitalOcean:** Enter the password you created when setting up your droplet
    - **Important:** When you type the password, you won't see any characters appear (not even dots). This is normal for security! Just type and press Enter.
5. **You're connected!**
    - If successful, you'll see something like: `root@infinity-tools-server:~#`
    - This means you're now controlling your server!

#### Option B: Using PuTTY (Alternative for Windows)

If you prefer a graphical interface, you can use [PuTTY](https://putty.org/index.html):

1. **Download PuTTY:** Go to [putty.org](https://www.putty.org/) and download PuTTY
2. **Open PuTTY:** Double-click the downloaded file
3. **Enter your server details:**
    - Host Name: Your server IP address
    - Port: 22 (leave as default)
    - Connection Type: SSH
4. **Click "Open"**
5. **Enter your username:** `root`
6. **Enter your password** when prompted
7. **You're connected!**

#### More Resources for Windows:

- [Microsoft Terminal Tutorial](https://learn.microsoft.com/en-us/windows/terminal/tutorials/ssh)
- [YouTube Tutorial](https://www.youtube.com/watch?v=JHYbu50_uNE)

### For Mac Users

Mac has SSH built-in (it's in the [Terminal](https://support.apple.com/guide/terminal/welcome/mac) app). Here's how to use it:

1. **Open Terminal:**
    - Press `Command + Space` (Command is the ⌘ key)
    - Type "Terminal"
    - Press Enter
2. **Connect to your server:**
    - Type this command (replace `YOUR_IP_ADDRESS` with your actual server IP):

```
ssh root@YOUR_IP_ADDRESS
```

**Example:** If your server IP is `123.45.67.89`, you would type:

```
ssh root@123.45.67.89
```

3. **You'll see a security warning:**
    - The first time you connect, Mac will ask "Are you sure you want to continue connecting?"
    - Type `yes` and press Enter
4. **Enter your password:**
    - For **Hetzner:** If you did not provide an SSH key (we did not cover that here), Hetzner sends you a one time password via email. You will have to change it immediately after your first log-in (Linux will force you to change it).
    - For **DigitalOcean:** Enter the password you created when setting up your droplet
    - **Important:** When you type the password, you won't see any characters appear. This is normal! Just type and press Enter.
5. **You're connected!**
    - If successful, you'll see something like: `root@infinity-tools-server:~#`
    - You're now controlling your server!

#### More Resources

- [User Guide for macOS Terminal](https://support.apple.com/guide/terminal/welcome/mac)
- [YouTube video (thanks Tony!)](https://www.youtube.com/watch?v=SfTSBbaFN8Y)

### For Linux Users

Linux has SSH built-in. If you use Linux, you probably already knew that. Here's how to use it:

1. **Open Terminal:**
    - Press `Ctrl + Alt + T` (on most Linux systems)
    - Or search for "Terminal" in your applications menu
2. **Connect to your server:**
    - Type this command (replace `YOUR_IP_ADDRESS` with your actual server IP):

```
ssh root@YOUR_IP_ADDRESS
```

**Example:** If your server IP is `123.45.67.89`, you would type:

```
ssh root@123.45.67.89
```

3. **You'll see a security warning:**
    - The first time you connect, it will ask "Are you sure you want to continue connecting?"
    - Type `yes` and press Enter
4. **Enter your password:**
    - For **Hetzner:** If you did not provide an SSH key (we did not cover that here), Hetzner sends you a one time password via email. You will have to change it immediately after your first log-in (Linux will force you to change it).
    - **Important:** When you type the password, you won't see any characters appear. This is normal! Just type and press Enter.
5. **You're connected!**
    - If successful, you'll see something like: `root@infinity-tools-server:~#`
    - You're now controlling your server!

### Troubleshooting: Can't Connect?

**Common issues and solutions:**

- **"Connection refused" or "Connection timed out":**
    - Check that your server is running in your cloud provider's dashboard
    - Make sure you're using the correct IP address
    - Wait a minute or two after creating the server - it might still be starting up
- **"Permission denied":**
    - Double-check your password (remember, you won't see characters when typing)
    - Make sure you're using `root` as the username
    - For DigitalOcean: Check your email - they send the password there
- **"Host key verification failed":**
    - This happens if you've connected to a different server with the same IP before
    - This is usually safe to ignore, but if you're concerned, ask for help

## Step 2: Get the Infinity Tools Installer

You'll receive the Infinity Tools installer as a file that you need to transfer to your server. This file is usually named something like `infinity-tools-installer.run`.

### Where to Get the Installer

The installer file will be provided to you through:

- **Email attachment** - Check your email for the installer file
- **Download link** - A secure download link will be sent to you
- **USB drive** - If you received a physical copy

**Important:** Make sure you have the installer file on your computer before proceeding!

## Step 3: Transfer the Installer to Your Server

Now we need to get the installer file from your computer to your server. We'll use an FTP client - a program that helps you transfer files between computers.

### What is an FTP Client?

An FTP client is a program that lets you upload files from your computer to your server. Think of it like copying a file from one folder to another, but over the internet.

**Why we need it:** Your server is in the cloud, so we need a way to send files to it. FTP clients make this easy and secure.

### Recommended FTP Clients for Beginners

Here are some beginner-friendly FTP clients. Choose one that works with your computer:

#### For Windows Users

**[FileZilla](https://filezilla-project.org/) (Recommended - Free)**

- ✅ Very easy to use
- ✅ Free to download
- ✅ Works with Windows 10 and 11
- ✅ Has a simple drag-and-drop interface

**How to get FileZilla:**

1. Go to [filezilla-project.org](https://filezilla-project.org/)
2. Click "Download FileZilla Client"
3. Download the Windows version
4. Install it like any other program

**[WinSCP](https://winscp.net/eng/download.php) (Alternative - Free)**

- ✅ Also very easy to use
- ✅ Free to download
- ✅ Good for Windows users

#### For Mac Users

**[Cyberduck](https://cyberduck.io/) (Recommended- Free)**

- ✅ Very beginner-friendly
- ✅ Free to download
- ✅ Clean, simple interface

**[FileZilla](https://filezilla-project.org/) (Alternative - Free)**

- ✅ Works great on Mac
- ✅ Free to download
- ✅ Simple interface

#### For Linux Users

**[FileZilla](https://filezilla-project.org/download.php) (Recommended - Free)**

- ✅ Available for most Linux distributions
- ✅ Free to download
- ✅ Easy to install

**How to install FileZilla on Linux:**

- **Ubuntu/Debian:** `sudo apt install filezilla`
- **Fedora:** `sudo dnf install filezilla`
- **Arch Linux:** `sudo pacman -S filezilla`

### How to Use Cyberduck (Step-by-Step)

We'll use Cyberduck as an example, but other FTP clients work similarly:

1. **Open Cyberduck**
2. **Connect to your server:**
    - Click [![image.png](https://docs.speedbits.io/uploads/images/gallery/2025-11/scaled-1680-/hHFimage.png)](https://docs.speedbits.io/uploads/images/gallery/2025-11/hHFimage.png)
        
         in the toolbar. This dialogue opens: [![image.png](https://docs.speedbits.io/uploads/images/gallery/2025-11/scaled-1680-/HLMimage.png)](https://docs.speedbits.io/uploads/images/gallery/2025-11/HLMimage.png)
    - Select "SFTP" in the dropdown menu on top
    - Server: enter your server's IP address here, something like 192.168.1.0
    - Port: this should be automatically set to 22 – that's just how it's supposed to be
    - Username: the username you have used for SSH, so root@IP\_ADDRESS
    - Password: your SSH password
    - Connect
3. **After connection:**
    - You should see something like this: [![image.png](https://docs.speedbits.io/uploads/images/gallery/2025-11/scaled-1680-/ajoimage.png)](https://docs.speedbits.io/uploads/images/gallery/2025-11/ajoimage.png)
4. **Navigate to the right folder:**
    - On the right side (your server), double-click on `/` to go to the root folder
    - Then double-click on `root` to go to your home folder
5. **Upload the installer:**
    - On the left side (your computer), find the installer file
    - Right-click on the installer file
    - Select "Upload" or drag it to the right side
    - Wait for the upload to complete

### Verify the Upload

After uploading, let's make sure the file is on your server. Go back to your SSH connection and type:

```
ls -lh infinity-tools*.run
```

You should see the installer file listed. If you see it, you're ready to continue!

### Troubleshooting File Transfer

**Can't connect to server:**

- Double-check your server IP address
- Make sure you're using port 22
- Verify your username is `root`
- Check that your server is running

**Upload fails:**

- Make sure you have enough space on your server
- Check that you have permission to upload files
- Try uploading to a different folder (like `/tmp`)

**File not found after upload:**

- Check that you uploaded to the right folder
- Look for the file in different locations
- Make sure the file name is correct

## Step 4: Install Infinity Tools

Now comes the exciting part - installing Infinity Tools! The installer will set everything up for you automatically.

### Make the Installer Executable

First, we need to tell Linux that this file can be run (executed). Type this command:

```
chmod +x infinity-tools*.run
```

**What this does:** Makes the installer file executable (able to run)

### Run the Installer

Now let's install Infinity Tools! Type this command:

```
sudo ./infinity-tools*.run
```

**What's happening:**

- `sudo` means "run as administrator" - we need special permissions to install software
- `./` means "run the file in this directory"
- `infinity-tools*.run` means "the installer file we just downloaded"

**During installation, you'll see:**

- A welcome message from Infinity Tools
- Progress information as files are copied
- Dependencies being installed (like "gum" - a menu tool)
- A success message when it's done!

**How long does it take?** Usually 1-3 minutes, depending on your server's speed.

### What Gets Installed

The installer automatically:

- ✅ Copies Infinity Tools to `/opt/InfinityTools/`
- ✅ Creates a shortcut command called `infinity-tools`
- ✅ Sets up all necessary permissions
- ✅ Installs a menu tool (called "gum") for the interactive interface

### Success Message

When installation completes, you'll see a message like:

```
✅ INSTALLATION SUCCESSFUL!

📝 Quick Start:
   • Run: sudo infinity-tools
   • Or:  cd /opt/InfinityTools && sudo bash start-tools.sh

```

If you see this message, congratulations! Infinity Tools is now installed on your server!

## Step 5: Verify Installation

Let's make sure everything installed correctly. Type this command:

```
which infinity-tools
```

You should see: `/usr/local/bin/infinity-tools`

This confirms the shortcut was created successfully!

## Step 6: Run Infinity Tools for the First Time

Now for the moment you've been waiting for - let's start Infinity Tools!

### Starting Infinity Tools

Type this command:

```
sudo infinity-tools
```

**What happens:**

- Infinity Tools will start loading
- You'll see a message like "🔧 Loading Infinity Tools components..."
- Then the main menu will appear!

### What You'll See

When Infinity Tools starts, you'll see a beautiful menu with options like:

- 📱 APPS - SOFTWARE (to install applications)
- 🔐 SECURITY &amp; NETWORKING (security tools)
- 🏗️ INFRASTRUCTURE &amp; CORE SYSTEMS (Docker, etc.)
- 💾 BACKUP MANAGEMENT (backup tools)
- 📊 STATUS &amp; HEALTH (check what's running)

**How to navigate:** Use your arrow keys to move up and down, and press Enter to select an option.

### First Steps in Infinity Tools

When you first start Infinity Tools, here's what to do:

1. **Check System Readiness:**
    - Infinity Tools might automatically check if your system is ready
    - It will tell you if anything needs to be fixed
2. **Install Docker (if needed):**
    - Docker is required for most applications
    - Go to "🏗️ INFRASTRUCTURE &amp; CORE SYSTEMS" → "Install Docker"
    - Follow the prompts - Infinity Tools will handle everything!
3. **Explore the Menu:**
    - Take some time to look around
    - Don't worry - you can't break anything by just browsing!
    - Each section has helpful descriptions

## Congratulations! 🎉

You've successfully:

- ✅ Connected to your server via SSH
- ✅ Downloaded Infinity Tools
- ✅ Installed Infinity Tools
- ✅ Started Infinity Tools for the first time

**You're now ready to use Infinity Tools!**

## What's Next?

Now that Infinity Tools is installed and running, you can:

- **Install Docker** (if not already installed) - Go to Infrastructure menu
- **Install your first application** - Choose from WordPress, Vaultwarden, Nextcloud, and more!
- **Set up security** - Configure firewall and security settings
- **Configure backups** - Set up automatic backups for your data

## Quick Reference

**Connecting to your server:**

```
ssh root@YOUR_IP_ADDRESS
```

**Starting Infinity Tools:**

```
sudo infinity-tools
```

**Where Infinity Tools is installed:**

```
/opt/InfinityTools/
```

**If you need to run it manually:**

```
cd /opt/InfinityTools
sudo bash start-tools.sh
```

## Tips for Success

- **Take your time:** There's no rush. Explore the menu at your own pace.
- **Read the prompts:** Infinity Tools will guide you through each step.
- **Don't worry about mistakes:** Most actions can be undone or redone.
- **Keep your server password safe:** Write it down in a secure place.
- **If something goes wrong:** You can always reconnect and try again.

## Troubleshooting

### I Can't Connect to My Server

- Check that your server is running in your cloud provider's dashboard
- Verify you're using the correct IP address
- Make sure you're using the correct username (usually `root`)
- Wait a minute or two after creating the server - it might still be starting

### The Installer Won't Run

- Make sure you used `sudo` before the command
- Check that you ran `chmod +x` on the installer file
- Verify the file downloaded completely (check file size)
- Make sure you're in the directory where you downloaded the file

### Infinity Tools Won't Start

- Make sure you're using `sudo` before the command
- Check that installation completed successfully
- Verify with: `ls -la /opt/InfinityTools/` (you should see files listed)
- Try running manually: `cd /opt/InfinityTools && sudo bash start-tools.sh`

### I Lost Connection During Installation

- Don't worry! Just reconnect to your server
- Check if installation completed: `ls -la /opt/InfinityTools/`
- If files are there, try running: `sudo infinity-tools`
- If installation didn't complete, just run the installer again

## Security Note

**Important:** Your server is now accessible via SSH. To keep it secure:

- ✅ Always use strong passwords
- ✅ Don't share your server password with anyone
- ✅ Consider setting up SSH keys (more secure than passwords) - we'll cover this in a future chapter
- ✅ Keep your server updated

Infinity Tools can help with security too - check out the Security &amp; Networking section in the menu!

---

**You did it!** Infinity Tools is now installed and ready to use. In the next chapters, you'll learn how to install your first applications and configure everything you need.

*Next: [Setting up your Foundation](https://docs.speedbits.io/books/2-beginner-path/page/3-setting-up-your-foundation "3: Setting Up Your Foundation")*

# Excourse: Domains and Subdomains

Infinity Tools helps you self-host everything—including your future WordPress site. Before you install Traefik or any applications, take a moment to decide how your domain should point to your server. In this chapter you'll set up your **main domain** (even if WordPress isn't running yet) and map out the **subdomains** each Infinity Tools app will use.

**Why this chapter now?** Getting DNS ready right after installing Infinity Tools (Chapter 2) means Traefik can issue certificates instantly, your apps come online with friendly URLs, and you won't have to pause mid-install to fix domain problems.

## Decide Where Your Main Domain Should Go

Your **main domain** (also called the apex domain or root domain) is what people type to reach your primary site—for example, `myinfinitytools.com`. Most beginners following this guide want the main domain to load a WordPress site that **they will install with Infinity Tools** in Chapter 11.

### No WordPress Yet? That's OK.

Even though WordPress isn't installed yet, point your main domain to the server where Infinity Tools runs. Until WordPress is live you'll see Traefik's default page (or a simple placeholder), which is perfectly fine.

You'll create two records now:

- `@` → your server's public IP address (A record)
- `www` → `@` (CNAME) so both reach the same place

Later, when you install WordPress with Traefik integration, Infinity Tools will automatically use these records to serve your new site over HTTPS.

## What is a Subdomain?

**A subdomain** is like a separate address within your main website. Think of it as different rooms in the same house - each room has its own purpose, but they're all part of the same building.

**Examples of subdomains:**

- `vault.myinfinitytools.com` - For your password manager
- `files.myinfinitytools.com` - For your file storage
- `admin.myinfinitytools.com` - For your admin panel

**Important Note:**

From a security standpoint, it is considered poor practice to use obvious subdomain names (like “admin” or “files”) for sensitive services such as administration panels or data storage. Such names reveal potentially valuable targets to attackers during reconnaissance and were chosen here for illustration purposes.

### Breaking Down a Subdomain

Let's look at `vault.myinfinitytools.com`:

- **vault** - This is the subdomain (the "room")
- **myinfinitytools** - This is your domain name (the "house")
- **com** - This is the top-level domain (the "neighborhood")

## Why Do We Need Subdomains?

Subdomains help organize your services and make them easier to access:

- ✅ **Easy to remember** - `vault.mydomain.com` is clear
- ✅ **Professional looking** - Each service has its own address
- ✅ **SSL certificates work better** - Each subdomain gets its own certificate
- ✅ **Easy to manage** - You can move services around easily

**Without subdomains:** You'd have to use ports like `mydomain.com:8080` or `mydomain.com:3000` - much harder to remember!

## Plan Your Subdomains

Start a simple list of the services you plan to run with Infinity Tools. These examples match the chapters you'll follow later. You can always add more subdomains later.

### Security Services

- `vault.mydomain.com` - Vaultwarden (Chapter 7)
- `pass.mydomain.com` - Passbolt (Chapter 8)
- `vpn.mydomain.com` - VPN or remote access gateway

### File and Storage Services

- `files.mydomain.com` - Nextcloud (Chapter 10)
- `sync.mydomain.com` - Syncthing (Chapter 9)
- `backup.mydomain.com` - Borgmatic status or backup dashboard

### Web and Content Services

- `www.mydomain.com` - Redirect to your main domain once WordPress is live (Chapter 11)
- `blog.mydomain.com` - Alternate marketing site or staging WordPress
- `docs.mydomain.com` - Docs portal built with BookStack or similar

### Monitoring and Analytics

- `stats.mydomain.com` - Matomo analytics (Chapter 12)
- `monitor.mydomain.com` - Monitoring stack (Uptime Kuma, Grafana, etc.)
- `status.mydomain.com` - Public status page

## How to Create Subdomains

The process varies by hosting provider, but the steps are always: point `@` and `www` to your Infinity Tools server, then create matching records for every subdomain Traefik will serve.

### Step 1: Get Your Server's IP Address

First, you need to know your server's IP address. You can find this in your server provider's dashboard or by running this command on your server:

```
curl ifconfig.me
```

This will show you your server's public IP address (something like `123.456.789.012`).

### Step 2: Access Your DNS Management

Log into your domain registrar or hosting provider and look for:

- **DNS Management**
- **DNS Settings**
- **Domain Management**
- **Name Servers**

## Provider-Specific Instructions

Below are examples from popular registrars and DNS hosts. Interfaces may change, but the record types stay the same. Each provider follows the same basic pattern:

- Optionally, an **A record** for `@` pointing to your Infinity Tools server IP — this makes `https://yourdomain.com` and `https://www.yourdomain.com` resolve to the server (for example, to host WordPress later).   
    **Skip this step** if your main website is hosted elsewhere and you only want to connect specific subdomains.
- A **CNAME record** for `www` pointing to `@`.
- Individual **A records** for every service subdomain (e.g. `vault`, `files`, `monitor`) pointing to your Infinity Tools server IP.

**Note:** The example IP `203.0.113.42` is for illustration only — replace it with your actual server IP.

### Hetzner Cloud

If you manage DNS in Hetzner:

1. Log into the [Hetzner Cloud Console](https://console.hetzner.cloud).
2. Go to **DNS** and select your domain.
3. Click **Add record** → choose **A** → set **Name** to `@` and **Value** to your server IP → **Save**.
4. Add a **CNAME** record with **Name** `www` pointing to `@`.
5. Repeat **Add record** → **A** for each service subdomain (e.g., `vault`, `files`) and set the same server IP.

**Example:** To prepare WordPress for the main domain and Vaultwarden on `vault.myinfinitytools.com`:

- `@` → `203.0.113.42` (A record)
- `www` → `@` (CNAME)
- `vault` → `203.0.113.42` (A record)

### Cloudflare

If you proxy traffic through Cloudflare:

1. Log into the [Cloudflare Dashboard](https://dash.cloudflare.com).
2. Select your domain and open **DNS → Records**.
3. Click **Add record** → choose **A** → set **Name** to `@`, **IPv4 address** to your server IP, TTL **Auto**, Proxy status **Off (DNS only)** while testing → **Save**.
4. Add a **CNAME** record for `www` pointing to `@`.
5. Add individual **A** records for each service subdomain (e.g., `files`, `vault`) pointing to the same IP. You can enable the orange-cloud proxy after confirming Traefik and certificates work.

### Namecheap

If you registered your domain with Namecheap:

1. Log into your [Namecheap account](https://www.namecheap.com).
2. Open **Domain List** → click **Manage** next to your domain.
3. Go to the **Advanced DNS** tab.
4. Under **Host Records**, click **Add New Record** → choose **A Record** → set **Host** to `@`, **Value** to your server IP, TTL **Automatic** → **Save**.
5. Add a **CNAME Record** with **Host** `www` and **Value** `@`.
6. Add more **A Records** for each service subdomain (e.g., `vault`, `files`) pointing to the same IP.

### GoDaddy

If you're using GoDaddy DNS:

1. Log into your [GoDaddy account](https://www.godaddy.com).
2. Open **My Products** → locate your domain → click **DNS**.
3. Click **Add** in the **Records** section, choose **A**, set **Name** to `@`, **Value** to your server IP, TTL **1 Hour** → **Save**.
4. Add a **CNAME** record with **Name** `www` pointing to `@`.
5. Add more **A** records for each service subdomain (Name = `vault`, `files`, etc.; Value = server IP).

### Porkbun

If you manage DNS with Porkbun:

1. Log into the [Porkbun Domain Management](https://porkbun.com/account/domains) panel.
2. Click **Details** next to your domain.
3. In **Quick DNS Config**, click **Edit**.
4. Add an **A** record with **Host** `@` and **Answer** = your server IP.
5. Add a **CNAME** record with **Host** `www` and **Answer** `@`.
6. Add more **A** records for each service subdomain (Host = `vault`, `files`, etc.; Answer = server IP).
7. Click **Save Changes**.

### Google Domains / Squarespace Domains

If your domain is managed in Google Domains (now Squarespace):

1. Sign in at [domains.google](https://domains.google).
2. Select your domain and open the **DNS** tab.
3. Under **Custom records**, click **+ Add record**.
4. Choose **A**, set **Name** to `@`, **Data** to your server IP, **TTL** to the default → **Save**.
5. Add a **CNAME** with **Name** `www` and **Data** `@`.
6. Add more **A** records for each service subdomain (`vault`, `files`, etc.) pointing to the same IP.

### OVHcloud

If you manage DNS at OVH:

1. Log into the [OVHcloud Manager](https://www.ovh.com/manager).
2. Go to **Domains** → select your domain → **DNS zone**.
3. Click **Add an entry** → choose **A** → set **Sub-domain** to `@` and **Target** to your server IP → confirm.
4. Add another entry: **Type** **CNAME**, **Sub-domain** `www`, **Target** `yourdomain.com.` (OVH will append the dot automatically).
5. Add additional **A** entries for each service subdomain (`vault`, `files`, etc.) pointing to the same IP.

## Understanding DNS Propagation

After creating a subdomain, it takes time for the change to spread across the internet. This is called **DNS propagation**.

### How Long Does It Take?

- **Usually:** 5-30 minutes
- **Sometimes:** Up to 24 hours
- **Rarely:** Up to 48 hours

### How to Check if It's Working

You can test if your subdomain is working by visiting it in your browser:

- Go to `https://vault.yourdomain.com`
- If you see a page (even an error), the subdomain is working
- If you get "This site can't be reached", it's still propagating

### Testing with Command Line

You can also test from your server:

```
# Test if subdomain resolves
nslookup vault.yourdomain.com

# Test if it points to your server
dig vault.yourdomain.com
```

## Create Your Domain Checklist

Before installing applications, map out every DNS record you want in place. This keeps your launch organized and helps you avoid downtime on your main site.

### Essential Records

These are the records most beginners configure on day one:

- `@` → Your Infinity Tools server IP (WordPress will live here later)
- `www` → CNAME pointing to `@`
- `vault.yourdomain.com` → Your server IP for Vaultwarden
- `files.yourdomain.com` → Your server IP for Nextcloud or file storage

### Optional Subdomains

Add these after your core services are live:

- `blog.yourdomain.com` → Alternate blog or marketing site
- `admin.yourdomain.com` → Admin panel (use with caution, see security tips)
- `sync.yourdomain.com` → File synchronization endpoint
- `stats.yourdomain.com` → Analytics tools like Matomo
- `monitor.yourdomain.com` → Monitoring dashboards
- `backup.yourdomain.com` → Backup management interface

## Best Practices

### Naming Conventions

- ✅ **Use descriptive names** - `vault` instead of `app1`
- ✅ **Keep them short** - `files` instead of `file-storage-system`
- ✅ **Use lowercase** - `vault` not `Vault`
- ✅ **Avoid special characters** - No spaces, symbols, or accents

### Security Considerations

- ✅ **Don't use obvious names** - Avoid `admin` for sensitive services
- ✅ **Use random names for sensitive services** - `a7b9c2` instead of `admin`
- ✅ **Document your subdomains** - Keep a list of what each one does

## Troubleshooting

### Subdomain Not Working

If your subdomain isn't working:

1. **Check the DNS record** - Make sure it points to the right IP
2. **Wait for propagation** - Give it 30 minutes to an hour
3. **Check for typos** - Make sure the subdomain name is correct
4. **Test with different tools** - Try `nslookup` or online DNS checkers

### Common Mistakes

- ❌ **Including the full domain in the host field** - Use `vault` not `vault.mydomain.com`
- ❌ **Pointing your main domain to the wrong place** - Double-check WordPress instructions before editing `@` and `www`
- ❌ **Wrong IP address** - Make sure you're using your server's public IP
- ❌ **Wrong record type** - Use "A" record, not "CNAME" for IP addresses
- ❌ **Not saving the record** - Make sure to click "Save" after creating

## Quick Reference

**Find your server IP:**

```
curl ifconfig.me
```

**Verify your main domain record:**

```
nslookup yourdomain.com
```

**Test subdomain resolution:**

```
nslookup vault.yourdomain.com
```

**Test from browser:**

```
https://vault.yourdomain.com
```

*Tip:* Until WordPress or another app is installed you'll likely see Traefik's default page at your main domain. That's expected.

## You're Ready!

Now you understand how to prepare both your main domain and subdomains! This knowledge will be essential as you install applications like Vaultwarden, Nextcloud, and connect your WordPress site.

**What you learned:**

- ✅ **How to point your main domain** - Aim it at your Infinity Tools server so WordPress is ready to launch
- ✅ **What subdomains are** - Separate addresses for different services
- ✅ **How to plan them** - Build a checklist before installing apps
- ✅ **How to create DNS records** - Step-by-step instructions for popular providers
- ✅ **How to test everything** - Browser and command-line methods

**Next step:** Move on to Chapter 3 (*Setting Up Your Foundation*). Keep this checklist handy—each time you install an app, add or confirm the subdomain you planned.

## What You Learned

- **Main domain setup** - How to point `@` and `www` to your Infinity Tools server
- **Subdomains** - Separate addresses for different services on your domain
- **DNS Records** - How to point each subdomain to your server
- **DNS Propagation** - How long it takes for changes to take effect
- **Testing Methods** - How to verify both main and subdomains are working
- **Planning** - How to organize your services with a checklist

You now have the foundation knowledge needed to set up professional-looking, organized services on your server!

---

*Next: Chapter 3 - Setting Up Your Foundation.*