title |
---|
Old Installation (Outdated) |
::: warning We recommend that you use the Docker-Compose stack. This installation is no longer supported!
Use the docker-compose Stack :::
If you have not yet found a suitable hosting provider to host this status page, we can recommend Hetzner Online GmbH
Prerequisites
A server with Ubuntu-20.04 or newer is preinstalled for this.
The default credentials of the software
- Username:
[email protected]
- Password:
livvck
The very first thing we do is update the package lists and packages on the server so that we are up to date.
apt update && apt upgrade -y
Now we install the necessary dependencies for the software, including Php, Nginx & Supervisor
apt -y install php7.4 php7.4-{cli,gd,mysql,pdo,mbstring,tokenizer,bcmath,xml,fpm,curl,zip} wget unzip nginx supervisor curl redis-server
Now we install the Package-Manager Composer, which allows the software to obtain more of its necessary packages
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
We will now create a folder where the software will eventually reside
mkdir -p /var/www/livck
You can find your license on the LIVCK page under your profile, copy it and paste it in the URL (Replace it with REPLACE)
Before you can start the download, you have to enter the IP of the server into the IP Whitelist of LIVCK. You can find the IP in the HCloud panel, but it is enough to whitelist the IPv4.
cd /var/www/livck && wget -4 https://livck.com/dl/self-hosted/REPLACE -O livck.zip
unzip livck.zip
mv LIVCK-self-hosted-*/* . && cp LIVCK-self-hosted-*/.env.example .env
rm LIVCK-self-hosted-* -R && rm livck.zip
For LIVCK a database like MySQL is needed, for this you can already find a tutorial here.
Create a database and a user (or use the root), which we can specify in the application
nano .env
You will now see this in the editor similar to the one shown below, there you can customize the name (APP_NAME) & under DB_DATABASE will be the database name you created as well as user and a password. Finally you only have to set your license key under LICENSE_KEY and the configuration would be done.
APP_NAME=LIVCK
APP_URL=http://your-domain.com
LICENSE_KEY="XXXX-XXXX-XXXX-XXXX-XXXX"
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=livck
DB_USERNAME=root
DB_PASSWORD="password"
REDIS_HOST=127.0.0.1
CACHE_DRIVER=redis
Now we install the required packages for the software.
composer install --no-dev --optimize-autoloader --ignore-platform-reqs && chmod -R gu+w storage/ && chmod -R guo+w storage/ && chmod -R gu+w bootstrap/cache/ && chmod -R guo+w bootstrap/cache/
Now we configure the queue with supervisor.
nano /etc/supervisor/conf.d/livck.conf
Add the following content to the file and save it
[program:livck-queue-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/livck/artisan queue:work --queue=default,newsletter --timeout=60 --tries=255
autostart=true
autorestart=true
user=root
numprocs=1
redirect_stderr=true
Now restart the supervisor service
service supervisor restart
Now we run the software backend on crontab.
{ crontab -l; echo "* * * * * php /var/www/livck/artisan schedule:run >/dev/null 2>&1"; } | crontab -
The return of the command is no crontab for root and is good!
Now we configure nginx (webserver).
nano /etc/nginx/sites-enabled/livck
Edit the content you see below, there replace DOMAIN-NAME to your domain and save it
If your domain is not yet connected to the server, we would recommend you to set an A record in your DNS.
Name: status (or one of your choice) Target: Your Server IP
server {
root /var/www/livck/public;
index index.php;
server_name DOMAIN-NAME;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
include snippets/fastcgi-php.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
listen 80;
}
Now restart the nginx service
service nginx restart
Now we configure the ssl of the statuspage.
apt install certbot python3-certbot-nginx -y
Replace the status.your-domain.de and [email protected] to yours
certbot --nginx --agree-tos -m [email protected] --domain status.your-domain.de
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access - To Secure your traffic, choose number 2!
Now we can generate the app key
php artisan key:generate --force
Now we can migrate all tables
php artisan migrate:fresh --seed --force
Now we can publish the storage
php artisan storage:link