Converted all old docs to new one

This commit is contained in:
Stijn Bannink 2025-01-10 19:36:30 +01:00
parent 5f6132988e
commit 9f9d8f83fa
Signed by: SBDeveloper
GPG key ID: B730712F2C3A9D7A
25 changed files with 816 additions and 5 deletions

View file

@ -0,0 +1,4 @@
{
"label": "Setup",
"className": "hidden"
}

227
themepark/setup/linux.md Normal file
View file

@ -0,0 +1,227 @@
---
sidebar_label: VPS running Linux
sidebar_position: 2
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# VPS running Linux
This guide will guide you through the installation of ThemeParkPanel on an VPS running Linux.
*It assumes you are on the Ubuntu distro. If you are on another distro, some commands my vary.*
## 1. Webserver setup (LEMP)
We are going to use Nginx and MariaDB for this installation. Run the following commands in sequence.
```bash
# Add 'add-apt-repository` command
apt -y install software-properties-common curl apt-transport-https ca-certificates gnupg
# Install the required repositories
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
# Update repositories list
apt update
# Install dependencies
apt -y install php8.1 php8.1-{cli,gd,mysql,pdo,mbstring,tokenizer,bcmath,xml,fpm,curl,zip} openssl git unzip mariadb-server nginx
# Install composer
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
# Create panel directory
mkdir -p /var/www/themeparkpanel
```
## 2. Uploading the files
**You need remote file transfer software to upload the files to your VPS. You can use for example Filezilla or
WinSCP. *This guide assumes you have WinSCP.***
1. Click on **New Site**. Then enter your SSH details. Then click on **Login**.
![Upload in WinSCP](../../static/themepark/setup_linux_upload.png)
2. Go to the `/var/www/themeparkpanel` directory and upload the files of **the SSH zip**.
3. Run the following command to fix the file permissions:
```bash
chmod -R 755 storage/* bootstrap/cache/
```
## 3. Creating the MySQL database
1. Run the following command to enter the MariaDB console.
```bash
mysql -u root -p
```
And enter the following SQL commands in sequence.
```sql
# Make sure to replace 'yourPassword' with a secure password
CREATE USER 'themeparkpanel'@'%' IDENTIFIED BY 'yourPassword';
CREATE DATABASE panel;
GRANT ALL PRIVILEGES ON panel.* TO 'themeparkpanel'@'%' WITH GRANT OPTION;
exit
```
2. Open the `/etc/mysql/mariadb.conf.d/50-server.cnf` file and replace the value of the `bind-address` setting
with `0.0.0.0`.
```yml
[ mysqld ]
# Replace the 127.0.0.1 with 0.0.0.0
bind-address=0.0.0.0
```
3. Run the following command to restart the MariaDB server.
```bash
systemctl restart mariadb
```
## 4. Configuration of the panel
1. Copy the .env.example file to .env (using `cp .env.example .env`) and open the `.env` file.
- Change `APP_URL` to the URL of your panel
- At `DB_` change the credentials to the database details created above.
- At `MAIL_` change the credentials to the credentials of an email account.
2. Run the followings command in sequence to proceed the installation.
```bash
# Install dependencies
composer install --no-dev --optimize-autoloader
# Generate the key
php artisan key:generate --force
# Populate the database
php artisan migrate --force
# Fix file permissions for the panel
chown -R www-data:www-data /var/www/themeparkpanel/*
```
## 5. Configuration of the webserver
Choose if you want to add SSL encryption to your panel or not.
<Tabs>
<TabItem value="without-ssl" label="Without SSL">
*We include an example configuration to serve our panel. Make sure to replace `%DOMAIN` with the full domain, and `%PATH%` with the full installation path (probably `/var/www/themeparkpanel`).*
1. Create `/etc/nginx/sites-available/themeparkpanel.conf` and put the following content in it.
```nginx
server {
listen 80;
listen [::]:80;
root /var/www/themeparkpanel/public;
server_name %DOMAIN%;
index index.php index.html index.nginx-debian.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location ~ /.well-known {
allow all;
}
}
```
2. Run the following commands.
```bash
# Link the configuration to the enabled directory
sudo ln -s /etc/nginx/sites-available/themeparkpanel.conf /etc/nginx/sites-enabled/themeparkpanel.conf
# Restart Nginx
systemctl restart nginx
```
</TabItem>
<TabItem value="with-ssl" label="With SSL">
*We include an example configuration to serve our panel. Make sure to replace `%DOMAIN` with the full domain, and `%PATH%` with the full installation path (probably `/var/www/themeparkpanel`).*
1. Create `/etc/nginx/sites-available/themeparkpanel.conf` and put the following content in it.
```nginx
server {
listen 80;
listen [::]:80;
server_name %DOMAIN%;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/letsencrypt/live/%DOMAIN%/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/%DOMAIN%/privkey.pem;
root /var/www/themeparkpanel/public;
index index.php index.html;
server_name %DOMAIN%;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location ~ /.well-known {
allow all;
}
}
```
2. Create your SSL certificate. You can use for example Certbot to do this for you.
3. Run the following commands.
```bash
# Link the configuration to the enabled directory
sudo ln -s /etc/nginx/sites-available/themeparkpanel.conf /etc/nginx/sites-enabled/themeparkpanel.conf
# Restart Nginx
systemctl restart nginx
```
</TabItem>
</Tabs>

69
themepark/setup/shared.md Normal file
View file

@ -0,0 +1,69 @@
---
sidebar_label: Shared Webhosting
sidebar_position: 1
---
# Shared Webhosting
This guide will guide you through the installation of ThemeParkPanel on a shared webhosting.
*It assumes your hosting is using DirectAdmin. If your hosting does not use DirectAdmin, please ask your hosting to do
specific things if you are unsure.*
## 1. Creating the MySQL database
1. Click on `MySQL Management` under **Account Manager** in the left sidebar.
2. Click on `Create New Database` on the right sidebar.
![Control Panel buttons](../../static/themepark/setup_shared_mysql.png)
3. Fill in the details. Think of a name for the database and user, like `themeparkpanel`. It's recommended to generate a
strong password.
![Filling in Database details](../../static/themepark/setup_shared_mysql_details.png)
:::info
**Make sure to safe the entered details somewhere, because you need them later!**
:::
4. **Click on the name of the database.** Then add `%` to the **Access Hosts**. Click on **Add New**. This makes sure
your Minecraft server can also access the database.
![Adding Access Host](../../static/themepark/setup_shared_accesshost.png)
5. Open phpMyAdmin (most of the time this can be found under **Extra Features** in the sidebar). Click on the name of
your database in the sidebar. Then click on **Import** in the top menu. Click on **Choose file** and upload the
provided `ThemeParkPanel.sql` file. Finish by clicking on **Import**.
![Uploading database on phpMyAdmin](../../static/themepark/setup_shared_phpmyadmin.png)
## 2. Creating an email account
1. Click on `E-mail accounts` under **E-mail Manager** in the left sidebar. Then click on **Create Account** in the
right sidebar.
2. Fill in the details. Think of a name for the email account, like `panel`. It's recommended to generate a strong
password.
![Creating an email account](../../static/themepark/setup_shared_email.png)
## 3. Uploading the files
**You need remote file transfer software to upload the files to your webhosting. You can use for example Filezilla or
WinSCP. *This guide assumes you have WinSCP.***
1. Click on **New Site**. Then enter the details of your webhosting account. *If you are unsure what to use, contact
your hosting.* Then click on **Login**.
![Filling in the FTP details](../../static/themepark/setup_shared_upload.png)
2. **Select the folder with the name of your domain name.** Then upload the files in **the Non-SSH zip file**.
3. Copy the `.env.example` file and rename the copy to `.env`.
4. Start configuring your panel by opening the `.env` file.
- Change `APP_URL` to the URL of your panel
- At `DB_` change the credentials to the database details created above.
- At `MAIL_` change the credentials to the mail details created above. *Not sure what to enter for the host, port or
encryption? Ask your hosting.*
:::info
Some webhostings only support SSL (instead of TLS)! Change the `MAIL_ENCRYPTION` setting to `ssl`. No encryption at all?
Make the setting empty.
:::