-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Gijsbert edited this page Dec 26, 2022
·
4 revisions
This guide will show you how to install Argus on a Ubuntu 22.04 VM. This guide will assume basic knowledge of Linux.
- A public accessible domain name.
- A server with Ubuntu 22.04. You can get one here from us.
# Update repositories list
apt update
# Install Dependencies
apt -y install software-properties-common curl certbot apt-transport-https ca-certificates gnupg php8.1 php8.1-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip} mariadb-server nginx tar unzip git redis-server
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
git clone https://github.com/DutchIS/Argus.git /var/www/argus
cd /var/www/argus
Change yourPassword
with a secure password.
mysql -u root -p
CREATE USER 'argus'@'127.0.0.1' IDENTIFIED BY 'yourPassword';
CREATE DATABASE argus;
GRANT ALL PRIVILEGES ON argus.* TO 'argus'@'127.0.0.1';
exit;
cp .env.example .env
nano .env
Only do this on your first install.
php artisan key:generate --force
composer install --no-dev --optimize-autoloader
npm i --production
npm run build
chmod -R 755 storage/* bootstrap/cache/
chown -R www-data:www-data /var/www/argus/*
php artisan migrate --force
Edit your cron configuration with sudo crontab -e
and paste the following
* * * * * php /var/www/argus/artisan schedule:run >> /dev/null 2>&1
sudo certbot certonly
rm /etc/nginx/sites-enabled/default
Use sudo nano /etc/nginx/sites-available/argus.conf
to edit your config. Change <domain>
to your domain name.
server {
listen 80;
server_name <domain>;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name <domain>;
root /var/www/argus/public;
index index.php;
access_log /var/log/nginx/argus.app-access.log;
error_log /var/log/nginx/argus.app-error.log error;
ssl_certificate /etc/letsencrypt/live/<domain>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<domain>/privkey.pem;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
ssl_prefer_server_ciphers on;
# See https://hstspreload.org/ before uncommenting the line below.
# add_header Strict-Transport-Security "max-age=15768000; preload;";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header Content-Security-Policy "frame-ancestors 'self'";
add_header X-Frame-Options DENY;
add_header Referrer-Policy same-origin;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_PROXY "";
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
include /etc/nginx/fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
sudo ln -s /etc/nginx/sites-available/argus.conf /etc/nginx/sites-enabled/argus.conf
sudo systemctl restart nginx
You can now access Argus from your domain name. Visit /dashboard to start configuring Argus.