Hetzner Online
- Hetzner Online Server Configuration – A Beginner's Guide
This article details configuring a MediaWiki instance on a server provided by Hetzner Online, a popular German hosting provider. It's aimed at newcomers to both Hetzner and MediaWiki administration. We will cover server selection, initial setup, and basic software installation, focusing on a Debian-based environment, which is commonly used.
== Server Selection and Initial Access
Hetzner offers a variety of server options, ranging from virtual private servers (VPS) to dedicated hardware. For most MediaWiki installations, a VPS is sufficient. When selecting a VPS, consider the following:
- **CPU Cores:** At least 2 cores are recommended for moderate traffic.
- **RAM:** 4GB is a good starting point, but 8GB or more is preferable for larger wikis or higher traffic.
- **Storage:** SSD storage is crucial for performance. 80GB is a reasonable minimum, increasing with wiki size.
- **Network Bandwidth:** Ensure sufficient bandwidth to handle anticipated traffic.
After ordering your server, Hetzner will provide you with access details via email:
- **IP Address:** The public IP address of your server.
- **Root Password:** Use this to log in directly via SSH.
- **Console Access:** Access the server via a web-based console.
Use an SSH client (like PuTTY on Windows or the built-in `ssh` command on macOS/Linux) to connect to your server:
```bash ssh root@your_server_ip ```
== Initial Server Setup (Debian)
Once logged in, update the package lists and upgrade existing packages:
```bash apt update apt upgrade ```
It's highly recommended to create a new user with `sudo` privileges instead of working directly as `root`.
```bash adduser your_username usermod -aG sudo your_username ```
Switch to the new user:
```bash su - your_username ```
Configure a firewall. `ufw` (Uncomplicated Firewall) is a simple and effective option:
```bash apt install ufw ufw allow ssh ufw enable ufw status ```
== Software Installation: LAMP Stack
MediaWiki requires a web server, a database, and PHP. We will install a LAMP (Linux, Apache, MySQL/MariaDB, PHP) stack.
=== Apache Web Server
```bash apt install apache2 systemctl start apache2 systemctl enable apache2 ```
Verify that Apache is running by opening your server's IP address in a web browser. You should see the default Apache welcome page.
=== MariaDB Database Server
```bash apt install mariadb-server mariadb-client systemctl start mariadb systemctl enable mariadb ```
Secure your MariaDB installation:
```bash mysql_secure_installation ```
Follow the prompts to set a root password, remove anonymous users, disallow remote root login, and remove the test database.
=== PHP and Required Extensions
```bash apt install php libapache2-mod-php php-mysql php-gd php-curl php-mbstring php-xml php-zip ```
Restart Apache to load the new PHP modules:
```bash systemctl restart apache2 ```
== MediaWiki Installation
Download the latest version of MediaWiki from the official website: [1](https://www.mediawiki.org/wiki/Download). Use `wget` to download it directly to your server. For example:
```bash wget https://releases.wikimedia.org/mediawiki/1.40/mediawiki-1.40.0.tar.gz tar -xzvf mediawiki-1.40.0.tar.gz mv mediawiki-1.40.0 /var/www/html/mediawiki chown -R www-data:www-data /var/www/html/mediawiki ```
Create an Apache virtual host configuration for your wiki. Create a new file in `/etc/apache2/sites-available/`:
```bash sudo nano /etc/apache2/sites-available/mediawiki.conf ```
Paste the following configuration (replace `your_domain.com` with your actual domain name or IP address):
```apache <VirtualHost *:80>
ServerName your_domain.com DocumentRoot /var/www/html/mediawiki
<Directory /var/www/html/mediawiki> Options FollowSymLinks AllowOverride All Require all granted </Directory>
ErrorLog ${APACHE_LOG_DIR}/mediawiki_error.log CustomLog ${APACHE_LOG_DIR}/mediawiki_access.log combined
</VirtualHost> ```
Enable the virtual host and restart Apache:
```bash sudo a2ensite mediawiki.conf sudo systemctl restart apache2 ```
== Database Configuration for MediaWiki
Navigate to your wiki's URL in a web browser. The MediaWiki installer will guide you through the configuration process. You will need the following information:
- **Database Type:** MySQL/MariaDB
- **Database Name:** Create a new database in MariaDB for MediaWiki.
- **Database Username:** Create a new database user with appropriate permissions.
- **Database Password:** Set a strong password for the database user.
- **Admin Username:** Choose a username for the MediaWiki administrator account.
- **Admin Password:** Set a strong password for the administrator account.
=== Server Specifications Summary
Here's a table summarizing recommended server specifications:
Specification | Minimum | Recommended | High Traffic |
---|---|---|---|
CPU Cores | 2 | 4+ | 8+ |
RAM | 4GB | 8GB | 16GB+ |
Storage (SSD) | 80GB | 160GB+ | 320GB+ |
Bandwidth | 100 Mbps | 500 Mbps | 1 Gbps+ |
=== PHP Version Support
PHP Version | Supported |
---|---|
7.4 | Yes |
8.0 | Yes |
8.1 | Yes |
8.2 | Yes |
=== Common PHP Extensions
Extension | Description |
---|---|
php-mysql | MySQL database connectivity |
php-gd | Image manipulation |
php-curl | Making HTTP requests |
php-mbstring | Multibyte string support |
php-xml | XML processing |
php-zip | Zip archive support |
== Further Configuration
After installation, explore the MediaWiki configuration options in `LocalSettings.php` to customize your wiki. Consider installing extensions to add functionality. Regularly back up your wiki's database and files. See Help:Configuration, Help:Extensions, and Help:Backups for more information. Also review Server Maintenance for ongoing upkeep. Remember to consult the official MediaWiki documentation at [2](https://www.mediawiki.org/wiki/Manual:Configuration) for detailed instructions. For assistance with Troubleshooting, refer to the dedicated help page.
Intel-Based Server Configurations
Configuration | Specifications | Benchmark |
---|---|---|
Core i7-6700K/7700 Server | 64 GB DDR4, NVMe SSD 2 x 512 GB | CPU Benchmark: 8046 |
Core i7-8700 Server | 64 GB DDR4, NVMe SSD 2x1 TB | CPU Benchmark: 13124 |
Core i9-9900K Server | 128 GB DDR4, NVMe SSD 2 x 1 TB | CPU Benchmark: 49969 |
Core i9-13900 Server (64GB) | 64 GB RAM, 2x2 TB NVMe SSD | |
Core i9-13900 Server (128GB) | 128 GB RAM, 2x2 TB NVMe SSD | |
Core i5-13500 Server (64GB) | 64 GB RAM, 2x500 GB NVMe SSD | |
Core i5-13500 Server (128GB) | 128 GB RAM, 2x500 GB NVMe SSD | |
Core i5-13500 Workstation | 64 GB DDR5 RAM, 2 NVMe SSD, NVIDIA RTX 4000 |
AMD-Based Server Configurations
Configuration | Specifications | Benchmark |
---|---|---|
Ryzen 5 3600 Server | 64 GB RAM, 2x480 GB NVMe | CPU Benchmark: 17849 |
Ryzen 7 7700 Server | 64 GB DDR5 RAM, 2x1 TB NVMe | CPU Benchmark: 35224 |
Ryzen 9 5950X Server | 128 GB RAM, 2x4 TB NVMe | CPU Benchmark: 46045 |
Ryzen 9 7950X Server | 128 GB DDR5 ECC, 2x2 TB NVMe | CPU Benchmark: 63561 |
EPYC 7502P Server (128GB/1TB) | 128 GB RAM, 1 TB NVMe | CPU Benchmark: 48021 |
EPYC 7502P Server (128GB/2TB) | 128 GB RAM, 2 TB NVMe | CPU Benchmark: 48021 |
EPYC 7502P Server (128GB/4TB) | 128 GB RAM, 2x2 TB NVMe | CPU Benchmark: 48021 |
EPYC 7502P Server (256GB/1TB) | 256 GB RAM, 1 TB NVMe | CPU Benchmark: 48021 |
EPYC 7502P Server (256GB/4TB) | 256 GB RAM, 2x2 TB NVMe | CPU Benchmark: 48021 |
EPYC 9454P Server | 256 GB RAM, 2x2 TB NVMe |
Order Your Dedicated Server
Configure and order your ideal server configuration
Need Assistance?
- Telegram: @powervps Servers at a discounted price
⚠️ *Note: All benchmark scores are approximate and may vary based on configuration. Server availability subject to stock.* ⚠️