Skip to content

Commit e134e6f

Browse files
committed
add Linux server installation guide for open.mp
1 parent 34fc4cf commit e134e6f

File tree

1 file changed

+191
-0
lines changed

1 file changed

+191
-0
lines changed
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
**This guide contains a comprehensive guide on installing an open.mp server on Ubuntu or another Debian based Linux.
2+
Whether you're a beginner or just looking to refresh your knowledge, this guide may have something useful for you!**
3+
4+
:::warning
5+
6+
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)**
7+
8+
:::
9+
10+
11+
:::note
12+
13+
If you are using the FCNPC plugin, please stop for now because this plugin does not work for open.mp currently.
14+
15+
:::
16+
17+
## Prerequisites
18+
Before starting, you should have:
19+
- A machine running Ubuntu (20.04 or later recommended) or another Debian based Linux;
20+
- WinSCP or Filezilla for file transfers;
21+
- PuTTY or your hosting SSH solution;
22+
23+
:::note
24+
25+
If you install WinSCP, the installer will prompt you to install PuTTY!
26+
It's up to you if you want to install it or not, but you can always download it later!
27+
28+
:::
29+
30+
## Phase 1: Preparing the Environment
31+
32+
1. Connecting via SSH:
33+
- Use PuTTY or your hosting SSH solution to connect to your instance.
34+
35+
:::note
36+
37+
Seek online guides or your hosting provider's documentation if you're unsure how to connect to your Linux Instance.
38+
39+
:::
40+
41+
2. Updating your Linux Instance:
42+
- Before proceeding, let's ensure your system is up to date by running:
43+
44+
```
45+
sudo apt update
46+
```
47+
```
48+
sudo apt upgrade
49+
```
50+
51+
3. Creating a secure service account:
52+
- For security reasons, we should create a dedicated service account without a home directory:
53+
54+
```
55+
sudo useradd -M svc-omp-server
56+
```
57+
58+
4. Locking the service sccount:
59+
- Let's prevent the service account from being used for login:
60+
61+
```
62+
sudo usermod -L svc-omp-server
63+
```
64+
65+
5. Creating a directory for the server files:
66+
- We will use the /opt directory, this is the standard location for third-party applications:
67+
68+
```
69+
sudo mkdir /opt/omp-server
70+
```
71+
72+
6. Setting permissions for the directory:
73+
- Changing the group of the directory to match the service account:
74+
75+
```
76+
sudo chgrp svc-omp-server /opt/omp-server
77+
```
78+
79+
- Setting the g+s flag so new files inherit the correct group and remove access for others:
80+
81+
```
82+
sudo chmod g+s /opt/omp-server
83+
```
84+
```
85+
sudo chmod o-rwx /opt/omp-server
86+
```
87+
88+
<hr />
89+
90+
## Phase 2: Installing open.mp Server Files
91+
92+
7. Let's navigate to the server directory:
93+
- We need to move to the /opt/omp-server directory where the server will be stored:
94+
95+
```
96+
cd /opt/omp-server
97+
```
98+
99+
8. Downloading the open.mp server files:
100+
- Download the latest release of the open.mp server:
101+
102+
```
103+
sudo -u svc-omp-server wget https://github.com/openmultiplayer/open.mp/releases/download/vX.X.X.XXXX/open.mp-linux-x86.tar.gz
104+
```
105+
106+
:::warning
107+
108+
**You should ALWAYS check for the latest release at the open.mp GitHub Releases page!**
109+
[https://github.com/openmultiplayer/open.mp/releases](https://github.com/openmultiplayer/open.mp/releases)
110+
111+
:::
112+
113+
9. Extracting the server files:
114+
- Once downloaded, extract the files:
115+
116+
```
117+
sudo -u svc-omp-server tar -xzf open.mp-linux-x86.tar.gz
118+
```
119+
120+
<hr />
121+
122+
## Phase 3: Configuring and Starting the Server
123+
124+
10. Installing the required x86 libraries:
125+
- Since the server runs as a 32-bit application, you need to enable 32-bit architecture support:
126+
127+
```
128+
sudo dpkg --add-architecture i386
129+
```
130+
```
131+
sudo apt update
132+
```
133+
```
134+
sudo apt install libc6:i386
135+
```
136+
137+
11. Making the server executable:
138+
- Change the permissions so the server can be executed (only required once!):
139+
140+
```
141+
cd /opt/omp-server/Server/
142+
```
143+
144+
```
145+
sudo chmod +x omp-server
146+
```
147+
148+
12. Starting the server:
149+
- Use the following command to start the server in the background:
150+
151+
```
152+
nohup ./omp-server &
153+
```
154+
155+
- The terminal will output a process ID (PID). Write this number down for future reference.
156+
157+
<hr />
158+
159+
## Phase 4: Managing the Server
160+
161+
13. Stopping the server:
162+
- To stop the server, use the PID from step 12 and run:
163+
164+
```
165+
sudo kill <PID>
166+
```
167+
168+
14. Finding the Process ID (if forgotten):
169+
170+
- If you forget the process ID, run:
171+
172+
```
173+
top
174+
```
175+
176+
- Look for the omp-server process in the list, note the PID, press 'Q' to quit, and then kill the process as shown in step 13.
177+
178+
<hr />
179+
180+
## Phase 5: Uploading Your Gamemode and Files
181+
182+
15. Upload your custom gamemodes and scripts:
183+
- Use WinSCP or Filezilla to transfer your gamemodes and scripts to the /opt/omp-server directory.
184+
Important: Make sure to use .so files for Linux plugins, as .dll files are only supported on Windows.
185+
186+
187+
## Help
188+
189+
If you're still experiencing issues setting up the server, join the official open.mp Discord server: [https://discord.gg/samp](https://discord.gg/samp)
190+
191+
Post your question in the [#openmp-support](https://discord.com/channels/231799104731217931/966398440051445790) channel and mention this guide so we can improve it.

0 commit comments

Comments
 (0)