SBDevelopment
Search…
Setup of the Panels

ThemeParkPanel:

Requirements:

  • A webserver with:
    • 1 MYSQL database
    • An SMTP mail server
    • PHP version 8.0.2 or higher
  • A Minecraft server with:
    • The ThemePark plugin
    • The ThemeParkConnector plugin

Installation on a shared hosting:

Are you using a shared webhosting? Then follow this guide. If you have your own webhosting on a server, then skip to that part.

1. Setting up the database:

Go to the homepage of DirectAdmin and go to MySQL Management. Click on Create new Database and fill in the data. Also, save this data somewhere, because you need it later.
After you've created it, you have to click on your database, and at Access Hosts, you have to put in a % and click on Add Host, so that the Minecraft server can find the database and can connect to it. This is VERY important!
Now you have to upload the SQL-file (which can be found in the Non-SSH zip), so that the plugin can upload his attractions. Open your database with PHPMyAdmin, and go to Import in the menu, and then choose the SQL-file at "File to import:". Then click on the Start button. Now it's uploaded.

2. Installing the panel to your webserver:

You need to install Filezilla or WinSCP to send the files to your webhosting. You need to install the Client. At Filezilla, click on the icon on the left (Site Manager), and click on New Site. Then fill in your credentials of the FTP server and click on Connect.
In your FTP, select your domain and put the files of the Non-SSH ZIP into your FTP.
Now copy the .env.example file and rename it to .env.
Then you have to change the settings in the .env file. Change the APP_URL to the url of your panel, and STORE_URL to the url of your store.
At DB_ you can change the database credentials of the database you created.
For the MAIL_ settings you have to create a mail account, and then lookup the SMTP server from your hosting. Ask your hosting for support if you are unable to do this.
Pay attention! Some hostings only support SSL (instead of TLS). Change the MAIL_ENCRYPTION setting to ssl. No encryption provided at all? Then leave the MAIL_ENCRYPTION setting empty.

3. Rewriting users to your panel (public folder):

Because of safety, all the files who are not intended for users, are in the /public folder. This means you have to redirect the users to that folder.
There is an .htaccess file in the ZIP for this. Most of the time, this file works out of the box. It's also included below, in the case it's missing.
.htaccess
1
<IfModule mod_rewrite.c>
2
<IfModule mod_negotiation.c>
3
Options -MultiViews
4
</IfModule>
5
6
RewriteEngine On
7
8
RewriteCond %{REQUEST_FILENAME} -d [OR]
9
RewriteCond %{REQUEST_FILENAME} -f
10
RewriteRule ^ ^$1 [N]
11
12
RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
13
RewriteRule ^(.*)$ public/$1
14
15
RewriteCond %{REQUEST_FILENAME} !-d
16
RewriteCond %{REQUEST_FILENAME} !-f
17
RewriteRule ^ server.php
18
</IfModule>
Copied!

Installation on your own server:

This chapter only applies if you have your own server! If you have no knowledge about Linux, please purchase a shared web hosting package, and follow the steps for it.
This guide assumes you are on the Ubuntu distro. Some commands may vary if you are on another Linux distribution.

1. Installation of the Webserver and database (LEMP):

We are going to use Nginx and MariaDB for the setup of ThemeParkPanel. Run the commands below in sequence.
1
# Add "add-apt-repository" command
2
apt -y install software-properties-common curl apt-transport-https ca-certificates gnupg
3
4
# Install the required repositories
5
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
6
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
7
8
# Update repositories list
9
apt update
10
11
# Install dependencies
12
apt -y install php8.1 php8.1-{cli,gd,mysql,pdo,mbstring,tokenizer,bcmath,xml,fpm,curl,zip} openssl git unzip mariadb-server nginx
13
14
# Install composer
15
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
16
17
# Create the directory
18
mkdir -p /var/www/themeparkpanel
Copied!

2. Upload the files:

Connect to the SFTP of your server using your credentials. In your SFTP, move to the /var/www/themeparkpanel/ directory and put the files of the SSH ZIP into it.
Then running the following command to fix the file permissions:
1
chmod -R 755 storage/* bootstrap/cache/
Copied!

3. Setting up the database:

Run the following commands step-by-step:
1
mysql -u root -p
2
3
# Make sure to replace 'yourPassword' with a secure password
4
CREATE USER 'themeparkpanel'@'%' IDENTIFIED BY 'yourPassword';
5
CREATE DATABASE panel;
6
GRANT ALL PRIVILEGES ON panel.* TO 'themeparkpanel'@'%' WITH GRANT OPTION;
7
exit
Copied!
We need to allow external access to this database, to make sure the Minecraft server can also connect to it.
Open the /etc/mysql/mariadb.conf.d/50-server.cnf file, and replace the following setting with this new value:
1
[mysqld]
2
# Replace the 127.0.0.1 with 0.0.0.0
3
bind-address=0.0.0.0
Copied!
Then run systemctl restart mariadb to restart your MariaDB server.

4. Editing the config and running installation:

Make sure you are in the correct folder.
1
cd /var/www/themeparkpanel
Copied!
Run the following commands:
1
cp .env.example .env
2
nano .env
Copied!
Then change all the settings in that file. Change the APP_URL to the url of your panel, and STORE_URL to the url of your store.
At DB_ you can change the database credentials of the database you created.
For the MAIL_ settings you have to create a mail account, and then lookup the SMTP server from your hosting. Ask your hosting for support if you are unable to do this.
Pay attention! Some hostings only support SSL (instead of TLS). Change the MAIL_ENCRYPTION setting to ssl. No encryption provided at all? Then leave the MAIL_ENCRYPTION setting empty.
Then run the following commands to install your panel and populate your database:
1
composer install --no-dev --optimize-autoloader
2
php artisan key:generate --force
3
php artisan migrate --force
Copied!
Now your database is ready for usage.
Run the next command to fix the file permissions:
1
chown -R www-data:www-data /var/www/themeparkpanel/*
Copied!

5. Rewriting users to your panel (public folder):

Because of safety, all the files who are not intended for users, are in the /public folder. This means you have to redirect the users to that folder.
Please choose if you want to use SSL or not. If you want to use SSL, you can use a free Let's encrypt SSL to secure your panel. Follow the guide on the FAQ page for that.
Nginx With SSL
NGINX Without SSL
Nginx uses config files for setup. Below is an EXAMPLE configuration, which can be used to redirect users to the /public folder, while also supporting HTTPS.
Make sure to replace %DOMAIN% (everywhere) by your full domain.
This config assumes you are using PHP 8.0. If you have another PHP version installed, please change the version on line 28.
/etc/nginx/sites-available/themeparkpanel.conf
1
server {
2
listen 80;
3
listen [::]:80;
4
5
server_name %DOMAIN%;
6
return 301 https://$server_name$request_uri;
7
}
8
9
server {
10
listen 443 ssl http2;
11
listen [::]:443 ssl http2;
12
13
ssl_certificate /etc/letsencrypt/live/%DOMAIN%/fullchain.pem;
14
ssl_certificate_key /etc/letsencrypt/live/%DOMAIN%/privkey.pem;
15
16
root /var/www/themeparkpanel/public;
17
18
index index.php index.html index.htm index.nginx-debian.html;
19
20
server_name %DOMAIN%;
21
22
location / {
23
try_files $uri $uri/ /index.php?$query_string;
24
}
25
26
location ~ \.php$ {
27
include snippets/fastcgi-php.conf;
28
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
29
}
30
31
location ~ /\.ht {
32
deny all;
33
}
34
35
location ~ /.well-known {
36
allow all;
37
}
38
}
Copied!
Then you need to enable your configuration, like this:
1
sudo ln -s /etc/nginx/sites-available/themeparkpanel.conf /etc/nginx/sites-enabled/themeparkpanel.conf
2
3
# Then restart NGINX
4
systemctl restart nginx
Copied!
Nginx uses config files for setup. Below is an EXAMPLE configuration, which can be used to redirect users to the /public folder.
Make sure to replace %DOMAIN% (everywhere) by your full domain, and %PATH% by the full installation path.
This config assumes you are using PHP 8.0. If you have another PHP version installed, please change the version on line 28.
/etc/nginx/sites-available/themeparkpanel.conf
1
server {
2
listen 80;
3
listen [::]:80;
4
5
root /var/www/themeparkpanel/public;
6
7
server_name %DOMAIN%;
8
index index.php index.html index.htm index.nginx-debian.html;
9
10
location / {
11
try_files $uri $uri/ /index.php?$query_string;
12
}
13
14
location ~ \.php$ {
15
include snippets/fastcgi-php.conf;
16
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
17
}
18
19
location ~ /\.ht {
20
deny all;
21
}
22
23
location ~ /.well-known {
24
allow all;
25
}
26
}
Copied!
Then you need to enable your configuration, like this:
1
sudo ln -s /etc/nginx/sites-available/themeparkpanel.conf /etc/nginx/sites-enabled/themeparkpanel.conf
2
3
# Then restart NGINX
4
systemctl restart nginx
Copied!

ThemeParkPanelPlus:

1. Installing the panel:

The installation of the Plus panel is very simple! Just extract all the files of the ThemeParkPanelPlus ZIP into the main folder of the panel.
Then go to routes/web.php and add this at the bottom of the file:
web.php
1
//ThemeParkPanelPlus
2
Route::get('/control/{attraction_id}/{pin}', '[email protected]');
Copied!

2. Setting up the panel:

Open the .env file. Add this at the bottom of the file:
.env
1
CONTROL_ID=CHANGEME
Copied!
Change the CHANGEME to the ID that you made up in the settings.yml file of the Connector plugin.
The panel URL for the ThemeParkConnector plugin changed with the newest version of the panel. Please make sure it looks like the code below.
settings.yml
1
socket:
2
panel: "https://domain.com/control/%ATTRACTION%/%PIN%"
Copied!