← Back Home

Server Setup Guide

Setting Up Your Installation Server

This guide outlines the fundamental steps required to prepare your server environment for a successful installation. Proper configuration is key to ensuring stability and performance.

Step 1: System Updates

Before proceeding, it's crucial to ensure your operating system is up-to-date. This helps patch security vulnerabilities and ensures compatibility with necessary software.

sudo apt update && sudo apt upgrade -y

Step 2: Install Essential Packages

Several core utilities are required. Install them using your system's package manager.

sudo apt install -y wget curl git nano

These packages provide tools for downloading files, making network requests, managing source code, and text editing, respectively.

Step 3: Configure Firewall

A firewall protects your server from unauthorized access. We'll use ufw (Uncomplicated Firewall) for simplicity. Allow SSH access and any ports your application will use.

sudo ufw allow ssh
sudo ufw allow 80/tcp  # For HTTP traffic
sudo ufw allow 443/tcp # For HTTPS traffic
sudo ufw enable
Note: If you're unsure about ports your application requires, consult its specific documentation.

Step 4: User Management

It's a security best practice to avoid running applications directly as the root user. Create a dedicated user for your installation.

sudo adduser your_app_user
sudo usermod -aG sudo your_app_user

Replace your_app_user with your desired username. The second command grants the new user sudo privileges, allowing them to perform administrative tasks when needed.

Step 5: SSH Key Authentication (Recommended)

For enhanced security and convenience, configure SSH key-based authentication. This allows you to log in without a password.

  1. Generate an SSH key pair on your local machine if you haven't already: ssh-keygen -t rsa -b 4096
  2. Copy your public key to the server: ssh-copy-id your_app_user@your_server_ip
  3. Test your connection: ssh your_app_user@your_server_ip