From e134e6f62b89f3972ecd154ebc83e0dd6ee4eeb5 Mon Sep 17 00:00:00 2001 From: itsneufox <156133096+itsneufox@users.noreply.github.com> Date: Wed, 22 Jan 2025 18:08:45 +0000 Subject: [PATCH] add Linux server installation guide for open.mp --- docs/server/LinuxServerInstallation.md | 191 +++++++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 docs/server/LinuxServerInstallation.md diff --git a/docs/server/LinuxServerInstallation.md b/docs/server/LinuxServerInstallation.md new file mode 100644 index 000000000..a287a4255 --- /dev/null +++ b/docs/server/LinuxServerInstallation.md @@ -0,0 +1,191 @@ +**This guide contains a comprehensive guide on installing an open.mp server on Ubuntu or another Debian based Linux. +Whether you're a beginner or just looking to refresh your knowledge, this guide may have something useful for you!** + +:::warning + +If you are using the SA:MP server and didn't convert to open.mp yet, **[please stop here and read this guide first.](https://www.open.mp/docs/server/Installation)** + +::: + + +:::note + +If you are using the FCNPC plugin, please stop for now because this plugin does not work for open.mp currently. + +::: + +## Prerequisites +Before starting, you should have: +- A machine running Ubuntu (20.04 or later recommended) or another Debian based Linux; +- WinSCP or Filezilla for file transfers; +- PuTTY or your hosting SSH solution; + +:::note + +If you install WinSCP, the installer will prompt you to install PuTTY! +It's up to you if you want to install it or not, but you can always download it later! + +::: + +## Phase 1: Preparing the Environment + +1. Connecting via SSH: + - Use PuTTY or your hosting SSH solution to connect to your instance. + +:::note + +Seek online guides or your hosting provider's documentation if you're unsure how to connect to your Linux Instance. + +::: + +2. Updating your Linux Instance: + - Before proceeding, let's ensure your system is up to date by running: + + ``` + sudo apt update + ``` + ``` + sudo apt upgrade + ``` + +3. Creating a secure service account: + - For security reasons, we should create a dedicated service account without a home directory: + + ``` + sudo useradd -M svc-omp-server + ``` + +4. Locking the service sccount: + - Let's prevent the service account from being used for login: + + ``` + sudo usermod -L svc-omp-server + ``` + +5. Creating a directory for the server files: + - We will use the /opt directory, this is the standard location for third-party applications: + + ``` + sudo mkdir /opt/omp-server + ``` + +6. Setting permissions for the directory: + - Changing the group of the directory to match the service account: + + ``` + sudo chgrp svc-omp-server /opt/omp-server + ``` + + - Setting the g+s flag so new files inherit the correct group and remove access for others: + + ``` + sudo chmod g+s /opt/omp-server + ``` + ``` + sudo chmod o-rwx /opt/omp-server + ``` + +