Skip to main content

3. Setting Up Your Foundation

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Infrastructure Prerequisites - For Beginners</title>
</head>
<body>
<p>

Before you can install your first application, we need to set up the basic infrastructure that Infinity Tools needs to work properly. Don't worry - Infinity Tools will handle most of this automatically!</p>


<h2>

What We'll Set Up</h2>


<p>In this chapter, we'll prepare:</p>

<ul>
    <li>
  • <strong>Docker</strong> - The system that runs all your applications</li>
  • <li>
  • <strong>Docker Network</strong> - How applications talk to each other</li>
  • <li>
  • <strong>System Requirements</strong> - Making sure everything is ready</li>
  • <li>
  • <strong>Basic Security</strong> - Simple firewall setup (optional)</li>
  • </ul>


<p><strong>Time needed:</strong> About 10-15 minutes</p>


<h2>

What is Docker? (Simple Explanation)</h2>


<p><strong>Docker</strong> is like a shipping container system for software. Just like how shipping containers make it easy to move goods around the world, Docker makes it easy to run applications on any computer.</p>


<p><strong>Why we need it:</strong></p>

<ul>
    <li>
  • Applications run in isolated "containers" - they can't interfere with each other</li>
  • <li>
  • Everything is pre-configured and ready to go</li>
  • <li>
  • If something goes wrong, you can easily restart or replace just that application</li>
  • <li>
  • It's the standard way modern applications are deployed</li>
  • </ul>


<p><strong>Think of it like this:</strong> Instead of installing WordPress directly on your server (which can be complicated), Docker runs WordPress in a container that has everything it needs already set up!</p>


<h2>

Step 1: Run the Readiness Check</h2>


<p>Infinity Tools has a built-in system that checks if everything is ready and installs what's missing. Let's run it!</p>


<h3>

Start Infinity Tools</h3>


<p>First, make sure you're connected to your server via SSH, then start Infinity Tools:</p>


<pre><code>
sudo infinity-tools</code></pre>


<h3>

What Happens Next</h3>


<p>Infinity Tools will automatically run a "readiness check" that:</p>

<ul>
    <li>
  • Checks if Docker is installed</li>
  • <li>
  • Installs Docker if it's missing</li>
  • <li>
  • Sets up the Docker network</li>
  • <li>
  • Installs other required tools</li>
  • <li>
  • Verifies everything is working</li>
  • </ul>


<p><strong>You'll see messages like:</strong></p>

<pre><code>
♾️  INFINITY TOOLS READINESS CHECK


Ensuring all prerequisites are met...


This will check and install:
• Docker & Docker Compose
• Docker Network for services
• GUM for modern UI
• Dialog for compatibility
• System requirements</code></pre>


<h3>

If Docker Needs to be Installed</h3>


<p>If Docker isn't installed yet, you'll see a message asking if you want to install it:</p>


<pre><code>
🐳 DOCKER INSTALLATION REQUIRED


Infinity Tools requires Docker to run containerized services.


Docker will be installed and configured automatically.
This includes Docker Engine and Docker Compose.


⚠️ This requires internet connection and may take a few minutes.


Install Docker now?</code></pre>


<p><strong>Answer "Yes"</strong> to continue. The installation will take a few minutes.</p>


<h3>

Docker Network Setup</h3>


<p>After Docker is installed, you'll be asked about setting up a network:</p>


<pre><code>
🌐 DOCKER NETWORK SETUP


Infinity Tools services need a Docker network to communicate.


This network allows containers to find each other by name
and enables features like Traefik reverse proxy.


Default network name: proxy</code></pre>


<p><strong>Press Enter</strong> to use the default network name "proxy" (recommended).</p>


<h2>

Step 2: Verify Everything is Working</h2>


<p>After the readiness check completes, you should see:</p>


<pre><code>
✅ READINESS CHECK COMPLETE


All prerequisites are satisfied!
Infinity Tools is ready to use.</code></pre>


<h3>

What Was Installed</h3>


<p>If everything went well, you now have:</p>

<ul>
    <li>
  • <strong>Docker Engine</strong> - The main Docker system</li>
  • <li>
  • <strong>Docker Compose</strong> - Tool for managing multiple containers</li>
  • <li>
  • <strong>Docker Network</strong> - A network called "proxy" for your services</li>
  • <li>
  • <strong>GUM</strong> - The modern interface you're using</li>
  • <li>
  • <strong>Dialog</strong> - Backup interface (just in case)</li>
  • </ul>


<h2>

Step 3: Understanding What Happened</h2>


<h3>

Docker Installation</h3>


<p>Docker was installed and configured to:</p>

<ul>
    <li>
  • Start automatically when your server boots</li>
  • <li>
  • Run containers securely</li>
  • <li>
  • Manage storage for your applications</li>
  • <li>
  • Handle networking between containers</li>
  • </ul>


<h3>

Docker Network</h3>


<p>The "proxy" network was created to:</p>

<ul>
    <li>
  • Allow applications to find each other by name</li>
  • <li>
  • Enable Traefik (our reverse proxy) to route traffic</li>
  • <li>
  • Keep your applications isolated from the internet</li>
  • <li>
  • Make it easy to add new services later</li>
  • </ul>


<h2>

Step 4: Optional - Basic Security Setup</h2>


<p>Now that the basics are ready, you can optionally set up basic security. This is recommended but not required to get started.</p>


<h3>

What is a Firewall?</h3>


<p>A <strong>firewall</strong> is like a security guard for your server. It controls which connections are allowed in and out.</p>


<p><strong>Why it's important:</strong> Without a firewall, your server is like a house with all doors unlocked - anyone can try to access it.</p>


<h3>

Setting Up the Firewall</h3>


<p>In the Infinity Tools menu, you'll see a "Security & Networking" section. You can set up the firewall later, but here's what it does:</p>


<ul>
    <li>
  • Allows SSH connections (so you can still connect)</li>
  • <li>
  • Allows HTTP and HTTPS traffic (for websites)</li>
  • <li>
  • Blocks other unwanted connections</li>
  • <li>
  • Protects against common attacks</li>
  • </ul>


<p><strong>For now:</strong> You can skip this and set it up later. Your server is reasonably safe as long as you keep your passwords strong.</p>


<h2>

Step 5: Understanding Your System</h2>


<h3>

What's Running Now</h3>


<p>Right now, your server has:</p>

<ul>
    <li>
  • <strong>Infinity Tools</strong> - The management system</li>
  • <li>
  • <strong>Docker</strong> - Ready to run applications</li>
  • <li>
  • <strong>Docker Network</strong> - Ready for services</li>
  • <li>
  • <strong>No Applications Yet</strong> - This is what we'll install next!</li>
  • </ul>


<h3>

What's Next</h3>


<p>You're now ready to install your first application! The most important one to install first is <strong>Traefik</strong> - it handles secure connections and routing for all your other applications.</p>


<h2>

Troubleshooting</h2>


<h3>

Docker Installation Failed</h3>


<p>If Docker installation fails:</p>

<ul>
    <li>
  • Check your internet connection</li>
  • <li>
  • Make sure you have enough disk space (at least 1GB free)</li>
  • <li>
  • Try running the readiness check again</li>
  • <li>
  • If it keeps failing, contact support with the error message</li>
  • </ul>


<h3>

Network Creation Failed</h3>


<p>If the Docker network creation fails:</p>

<ul>
    <li>
  • Make sure Docker is running: <code>sudo systemctl status docker</code></li>
  • <li>
  • Try restarting Docker: <code>sudo systemctl restart docker</code></li>
  • <li>
  • Run the readiness check again</li>
  • </ul>


<h3>

Can't Connect to Server</h3>


<p>If you lose connection during setup:</p>

<ul>
    <li>
  • Reconnect via SSH</li>
  • <li>
  • Run <code>sudo infinity-tools</code> again</li>
  • <li>
  • The readiness check will continue where it left off</li>
  • </ul>


<h2>

Quick Reference</h2>


<p><strong>Check if Docker is running:</strong></p>

<pre><code>
sudo systemctl status docker</code></pre>


<p><strong>Check Docker networks:</strong></p>

<pre><code>
docker network ls</code></pre>


<p><strong>View Docker containers:</strong></p>

<pre><code>
docker ps</code></pre>


<p><strong>Restart Docker if needed:</strong></p>

<pre><code>
sudo systemctl restart docker</code></pre>


<h2>

You're Ready!</h2>


<p>Congratulations! You now have:</p>

<ul>
    <li>
  • ✅ A working Docker system</li>
  • <li>
  • ✅ A network for your applications</li>
  • <li>
  • ✅ All the tools Infinity Tools needs</li>
  • <li>
  • ✅ A solid foundation for your applications</li>
  • </ul>


<p><strong>Next step:</strong> Install Traefik - the reverse proxy that will handle secure connections and routing for all your applications.</p>


<h2>

What You Learned</h2>


    <ul>
    <li><strong>
  • Docker</strong> - A system for running applications in containers</li>
  • <li><strong>
  • Docker Network</strong> - How applications communicate with each other</li>
  • <li><strong>
  • Readiness Check</strong> - Infinity Tools' automatic setup system</li>
  • <li><strong>
  • Infrastructure</strong> - The foundation that makes everything else possible</li>
  • </ul>


<p>You're now ready to install your first application! In the next chapter, we'll install Traefik, which is essential for running other applications securely.</p>



<hr>


<p><em>Next: Installing Traefik - Your Reverse Proxy (Chapter 4)</em></p>


</body>
</html>