Best practices to run a fresh new server ?

Kml

New member
Hi guys

I’ve always managed my servers manually without panel by installing and configuring reps via command line.

As of 2023 now what do you are the best methods to deploy a quick and secure server VPS for a XF / Wordpress website for live production or testing/staging?

I came accross the @eva mod here but i don’t think this it’s compatible with debian.


Advices will be much appreciated.
Thanks.
 
Centminmod is not for Debian/Ubuntu indeed.
If it's only for 1 or 2 accounts and you're looking for a panel, depending on your knowledge of things and what you want to pay for it, Directadmin personal plus, Plesk Webadmin or cPanel Solo. Those are the professional panels.

If you know a little bit your way around, then Directadmin might be the best choice, very cheap but with forum support. For ticket support you need the lite version which is more expensive, but still a lot cheaper than CP.

There are ofcourse also the free panels, but I don't have experience with those.
 
I'm not really looking for a panel i want to start fresh with command line. What's the best way to keep to install a Debian server with XenForo requirements and keep them safe, well updated and secure in the long term?
 
Switch to Alma or Rocky and use Centmin (beta). Best performance you can get. Centmin will handle everything so you won't even need to have specific Alma/rocky knowledge (although that can be handy when troubleshooting).
 
I'm not really looking for a panel i want to start fresh with command line.
Really? Commandline? You have another thing coming then if you don't even have the experience to set this up yourself. Because you will need experience to fix things and secure things.

I would advise switching to Centminmod like I said before, but if you really want to stay at Debian or alike, keep updated with apt package manager and install CSF/LFD (configserver) as firewall and protection.
There are loads of other things but even I don't use commandline anymore because all of the fuzz with everything you have to config and look at. So maybe somebody else can give you additional information on how to secure more.
 
My advise is to keep server stuff to a minimum: Outsource email delivery and CDN.

Ubuntu does not need any repositories for mariadb, nginx, php 8.1 (!).

0) scp -i files to the server
1) apt install maridb-server php-… nginx
2) modify configuration files and restart
 
Switch to Alma or Rocky and use Centmin (beta). Best performance you can get. Centmin will handle everything so you won't even need to have specific Alma/rocky knowledge (although that can be handy when troubleshooting).
OpenLitespeed which includes LSPHP and LSCache, has better TTFB, far less memory use as load increases, .htaccess file support, and has new standards support sooner such as HTTP3,

You can use either CLI or it's web interface. Same with Cyberpanel from Litespeed, its a web base control panel but cli commands are there too. Cyberpanel with OpenLitespeed, and OpenLitespeed alone are both free.

Centminmod is not the best performance you can get, and even it's author stated this.

Eva2000 stated:
"pure technical optimised stack in order of best to worse would be
  • Litespeed + LSAPI - especially as Litespeed 5.4 > 5.3
  • Nginx + PHP-FPM
  • Apache + LSAPI PHP held back by Apahce
  • Apache + PHP-FPM
"

They both have different audiences.
 
Centminmod is not the best performance you can get, and even it's author stated this.

Eva2000 stated:
"pure technical optimised stack in order of best to worse would be
  • Litespeed + LSAPI - especially as Litespeed 5.4 > 5.3
  • Nginx + PHP-FPM
  • Apache + LSAPI PHP held back by Apahce
  • Apache + PHP-FPM
"
Yup, discussed at https://community.centminmod.com/th...d-faster-than-php-fpm-nginx-etc-or-not.19153/ - the most relevant reply of mine regarding this starts at https://community.centminmod.com/th...an-php-fpm-nginx-etc-or-not.19153/#post-81604 where last test was at https://github.com/centminmod/http2...chmark-h2load-lsws-5.4.1-nginx-1.16.1-run1.md

Yes their http2benchmark site doesn't have a optimised Nginx configuration and partly that probably is due to inexperience with nginx and I am sure there's a commercial incentive to not be as thorough in investing time into acquiring more Nginx know-how. Some may argue that is a valid comparison as alot of folks are the same - noob or not well versed in configuring Nginx/PHP-FPM so end up with same configurations being compared/tested.

I wrote about it at https://www.webhostingtalk.com/showthread.php?t=1775139 along with doing a fork for early http2benchmark code. The forked http2benchmark code results are further down in that thread which do show Litespeed 5.4 is faster than Litespeed 5.3 and Nginx official RPM installs configured more optimally by me (not Centmin Mod nginx still though so Nginx results there would be slower than Centmin Mod Nginx). Alot of my earlier tests of my own were with Litespeed 5.3 and lower and Centmin Mod Nginx which was alot closer and sometimes better for static files at least. But Litespeed 5.4 is new and faster than Litespeed 5.3.
and from https://www.webhostingtalk.com/showthread.php?t=1775139&p=10169960#post10169960
Anyway, the point of my forked http2benchmarks is to illustrate depending on how nginx is configured (haven't even touched on how it's installed/build nor on nginx configuration optimisations/directives), some usage situations can be alot closer that what original http2benchmark results suggest. For one thing, PHP-FPM fastcgi_cache isn't always the fastest method for wordpress caching on Nginx side

I’ve always managed my servers manually without panel by installing and configuring reps via command line.

As of 2023 now what do you are the best methods to deploy a quick and secure server VPS for a XF / Wordpress website for live production or testing/staging?
If you know how to manage a server via the command line, create a custom script for the installation and configuration yourself. That's how my Centmin Mod LEMP stack was born - scripted to automate what I usually install, configure and optimize based on my two decades of experience working with my server optimisation clients = I save a lot of time by automating this compared to manual setups :D

The flexibility of your own scripted installs is you have the flexibility to tailor your setups the way you like them instead of having to accept how other scripts do things. A recent example for me is configuring Cloudflare Post-Quantum Origin connections https://blog.centminmod.com/2023/10...68-key-exchange-support-in-centmin-mod-nginx/ :D

Personally, I use my Centmin Mod LEMP stack as it saves me a lot of time in installing and configuring servers, with a lot of my server optimisations and tweaks done automatically. These days, which web server is used isn't as important when using Cloudflare CDN/Workers in front of the web server - as long as the stack is optimally configured.

Eventually, I do plan on Centmin Mod to support Litespeed/OpenLitespeed. In the past, I've built custom Litespeed/OpenLitespeed binaries that are faster than official ones - the end goal is Centmin Mod eventually provided Litespeed/OpenLitespeed server will be faster than official Litespeed/OpenLitespeed binaries :D But it has been pushed back for now to focus on EL8/EL9 OS compatibility first. FYI, I've been using Nginx for 12+ years and Litespeed web server (standalone non-cPanel or with cPanel) for 14+ 19+ years (double checked) :D

There's plenty of anecdotal reports from users where using Centmin Mod LEMP stack Nginx showed faster real-world TTFB than the Litespeed web server just because the website/Litespeed web server wasn't optimally configured for page speed.

I came accross the @eva mod here but i don’t think this it’s compatible with debian.
Yes, Centmin Mod public installers only support CentOS 7, with private beta installers supporting AlmaLinux, Rocky Linux and Oracle Linux EL8 and EL9.

My advice is that there is no need to jump into the deep end with the production live site. You can setup a test VPS hourly billed server, test it with your chosen short list of control panels/command line setups with a copy of your live site data and evaluate and learn the ropes of each option and then decide which is best for you :)
 
Last edited:
If you have command line experience then I would suggest Centminmod as others have suggested. If you are learning, I wouldn't advise learning on production. I'd stick with a control panel of some sort.

If you want to learn to do it yourself, the Digital Ocean how to's are really good.

 
  • Like
Reactions: Kml
Thanks for your advices. I think i'll go for a simple Ubuntu install as mentioned above.

Here a theoretical step by step approach i've documented, so far until now - please correct me if it's wrong:
  1. Installing Ubuntu distro VPS instance under Linode.
  2. Create 1 admin user and disable root access.
  3. Steps mentionned by @Marcus
    >>> copy xenforo files to the server >>> apt install maridb-server php-… nginx >> >modify configuration files and restart
  4. Install XenForo required PHP extensions such as : MySQLi, GD (with JPEG support), PCRE, cURL, SPL, SimpleXML, DOM, JSON, iconv, ctype
  5. Install CSF Firewall


Are these steps correct ? If so and for long term support, i just want to have an idea about to to keep kernel and packages/extensions always up to date and secure ? Is apt-get update / upgrade enough for that ?

Regards.
 
I have some comments for that:

Step 4 is included in step 3. I have these php modules installed, but currently do not even use redis. It is amazing, that Ubuntu supports php 8.1 out of the box without any third party repositories, it also supports even imagick.
Code:
php8.1-bcmath
php8.1-cli
php8.1-common
php8.1-curl
php8.1-fpm
php8.1-gd
php8.1-gmp
php8.1-igbinary
php8.1-imagick
php8.1-intl
php8.1-mbstring
php8.1-mysql
php8.1-opcache
php8.1-readline
php8.1-redis
php8.1-xml
php8.1-zip

If your web company has already a firewall, you do not need it. In Amazon Web Services you can only allow specific ports to your server, so you tell AWS to only open ports http, http and email. It is for me always easier to have less to configure on the server.

And yes, the beauty of using standard repositories is that apt update is enough! You could even automate it, so that every night the server updates itself.
 
  • Love
Reactions: Kml
Ubuntu really is - for what I know - the most easy way if you just want to install xenForo - and use regular repositories. I do not like third party repos because of security. The official ones are a bit more supervised I believe.

On my server there is only php mariadb nginx elasticsearch. For elasticsearch I use their official repository. Everything else (qualified https-certificate, email, firewall, CDN/WAF) is outsourced for actually free.
 
  • Like
Reactions: Kml
I really prefer using official repositories. This is according to a webpage the situation from official Ubuntu 23.10:

In a post on X (formerly Twitter) Ubuntu explains the situation:

We have identified hate speech from a malicious contributor in some of our translations submitted as part of a third party tool outside of the Ubuntu Archive. The Ubuntu 23.10 image has been taken down and a new version will be available once the correct translations have been restored.
 
  • Like
Reactions: Kml
Ubuntu really is - for what I know - the most easy way if you just want to install xenForo - and use regular repositories. I do not like third party repos because of security. The official ones are a bit more supervised I believe.

On my server there is only php mariadb nginx elasticsearch. For elasticsearch I use their official repository. Everything else (qualified https-certificate, email, firewall, CDN/WAF) is outsourced for actually free.

That's why i'm going for this model i quite liked the eva centmod but it looked more for heavy forums / advanced users. The Ubuntu repos seems to be well monitored.

What are your outsourced services that you're using for mails firewall, cdn etc. ?
 
8.1 does work with Xenforo but is not supported. 8.2 probably won't even work a 100% so not advised!
I've been running 8.2.10 for a while now and haven't found any issues yet. The only error I do repeatedly receive is the following:

Code:
ErrorException: [E_DEPRECATED] Creation of dynamic property Less_Tree_Dimension::$parensInOp is deprecated
src/vendor/oyejorge/less.php/lib/Less/Parser.php:2426

Have been using both XenResource and XenGallery, made payments, posts, pages, etc; no problems. You should follow what is supported, but so far things are looking good :)
 
What are your outsourced services that you're using for mails firewall, cdn etc. ?
Cloudflare and Amazon SES. Actually there are more email services, I just setup SES a decade ago and use it since then. You could also do without Cloudflare, I am not really sure it helps that much.
 
I've been running 8.2.10 for a while now and haven't found any issues yet. The only error I do repeatedly receive is the following:

Code:
ErrorException: [E_DEPRECATED] Creation of dynamic property Less_Tree_Dimension::$parensInOp is deprecated
src/vendor/oyejorge/less.php/lib/Less/Parser.php:2426

Have been using both XenResource and XenGallery, made payments, posts, pages, etc; no problems. You should follow what is supported, but so far things are looking good :)

You have this error (
  • ErrorException: [E_DEPRECATED] Creation of dynamic property
)
whenever you turn on the debug mode, right? I got the same problem.
 
Top Bottom