How to Install Chevereto on Debian Latest

Chevereto is a powerful, open-source image hosting script that allows users to host their images on their own servers. This tutorial will explain how to install Chevereto on Debian latest.

Prerequisites

Before proceeding with the installation, you need to make sure that your system meets the following prerequisites:

Step 1: Install Dependencies

First, you need to install some dependencies required for the Chevereto installation. Use the following command to install the required dependencies:

sudo apt update
sudo apt install git imagemagick php7.4-cli php7.4-gd php7.4-curl php7.4-mbstring php7.4-zip php7.4-xml php7.4-mysql php7.4-intl php7.4-apcu php7.4-imagick

Step 2: Install Chevereto

To install Chevereto, you need to download the source code from the official Chevereto GitHub repository. Use the following commands to download the source code and extract it:

cd /var/www/html
sudo git clone https://github.com/Chevereto/Chevereto-Free.git chevereto
sudo chown -R www-data:www-data chevereto

Step 3: Configure Apache or NGINX

After installing the Chevereto source code, you need to configure your web server (either Apache or NGINX) to serve the Chevereto files. Here is how to configure Apache:

sudo nano /etc/apache2/sites-available/chevereto.conf

Add the following lines to the configuration file:

<VirtualHost *:80>
ServerName your-domain.com
ServerAlias www.your-domain.com

DocumentRoot /var/www/html/chevereto
<Directory /var/www/html/chevereto>
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Enable the site and reload Apache:

sudo a2ensite chevereto.conf
sudo systemctl reload apache2

If you are using NGINX, create a new configuration file:

sudo nano /etc/nginx/sites-available/chevereto.conf

Add the following lines to the configuration file:

server {
listen 80;
server_name your-domain.com www.your-domain.com;
root /var/www/html/chevereto;

client_max_body_size 100M;

location / {
try_files $uri $uri/ /index.php$request_uri;
}

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}

location /install/ {
deny all;
}

location /images/ {
access_log off;
}

location /content/avatars/ {
access_log off;
}

location /content/images/ {
access_log off;
}

location /content/import/ {
access_log off;
}

location /app/compiled/ {
access_log off;
}

location = /favicon.ico {
log_not_found off;
access_log off;
}
}

Enable the site and reload NGINX:

sudo ln -s /etc/nginx/sites-available/chevereto.conf /etc/nginx/sites-enabled/
sudo systemctl reload nginx

Step 4: Set File Permissions

For security reasons, you need to set the correct permissions for the Chevereto files. Use the following command to set the file permissions:

sudo chmod -R 755 /var/www/html/chevereto
sudo chmod -R www-data:www-data /var/www/html/chevereto

Step 5: Create the MySQL/MariaDB Database

Before proceeding with the installation, you need to create a new database for Chevereto. Use the following command to log in to the MySQL/MariaDB server:

sudo mysql -u root -p

Then, create a new database and user for Chevereto:

CREATE DATABASE chevereto;
CREATE USER 'chevereto_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON chevereto.* TO 'chevereto_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 6: Install Chevereto

Open your web browser and navigate to your domain name or IP address followed by /install.php (e.g., http://your-domain.com/install.php). The Chevereto installer will start.

Follow the instructions on the screen to complete the installation. You will need to enter the MySQL/MariaDB database and user details you created earlier.

After the installation is complete, you can access your new Chevereto installation at your domain name or IP address.

Conclusion

In this tutorial, you learned how to install Chevereto on Debian latest. You also learned how to configure Apache or NGINX, set file permissions, and create a new MySQL/MariaDB database for Chevereto. Now you can start using Chevereto to host your images on your own server.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!