Monica is an open-source personal relationship manager that helps you manage your relationships with friends and family. It allows you to keep track of important information, events, and interactions with your contacts. In this guide, we will walk you through the process of installing Monica on Debian 11. Whether you are deploying it on a local server or using a Windows VPS UK, this tutorial will help you set up your personal relationship manager.

Step 1: Update Your System

Before installing Monica, it’s important to ensure your system is up to date. Run the following commands to update your Debian 11 system:

sudo apt update && sudo apt upgrade -y

Keeping your system updated is crucial for security and performance, whether you're setting up Monica locally or on a VPS Windows Servers platform.

Step 2: Install Required Dependencies

Monica requires several dependencies, including PHP and a web server. Install Apache, PHP, and other required extensions by running:


sudo apt install apache2 php libapache2-mod-php php-mysql php-curl php-xml php-mbstring php-zip git -y
            

After installation, enable the Apache service to start on boot and make sure it's running:


sudo systemctl enable apache2
sudo systemctl start apache2
            

This setup prepares your environment for hosting Monica, whether on a local server or on a Windows VPS hosting UK.

Step 3: Install Composer

Composer is a dependency manager for PHP that Monica requires. Install Composer by running the following commands:


sudo apt install curl php-cli unzip -y
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
            

Verify the Composer installation:

composer --version

Step 4: Download and Install Monica

Navigate to the Apache web directory and download Monica using Git:


cd /var/www/html
sudo git clone https://github.com/monicahq/monica.git
            

Move into the Monica directory and install the PHP dependencies using Composer:


cd monica
composer install
            

Set the correct permissions for the Monica directory:


sudo chown -R www-data:www-data /var/www/html/monica
            

Step 5: Configure the Environment

Copy the example environment file to create your own:

cp .env.example .env

Open the .env file to configure your database settings:

sudo nano .env

Update the database connection settings in the file with the database name, username, and password you will create in the next step.

Step 6: Create a Database for Monica

Log in to MySQL to create a database for Monica:

sudo mysql -u root -p

Create a database and user for Monica:


CREATE DATABASE monica_db;
CREATE USER 'monica_user'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON monica_db.* TO 'monica_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
            

Ensure the database is created and accessible by Monica, whether you’re hosting it locally or on a Windows VPS Italy.

Step 7: Run Database Migrations

Go back to the Monica directory and run the migrations to set up the database structure:

php artisan migrate

After the migrations are complete, seed the database with initial data:

php artisan db:seed

Step 8: Configure Apache for Monica

Create a new Apache configuration file for Monica:

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

Add the following configuration, replacing your-domain.com with your actual domain:



    ServerAdmin admin@your-domain.com
    DocumentRoot /var/www/html/monica/public
    ServerName your-domain.com
    ServerAlias www.your-domain.com

    
        AllowOverride All
        Require all granted
    

    ErrorLog ${APACHE_LOG_DIR}/monica_error.log
    CustomLog ${APACHE_LOG_DIR}/monica_access.log combined

            

Enable the site and necessary Apache modules, then restart Apache:


sudo a2ensite monica.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
            

Step 9: Access Monica

Open your web browser and navigate to http://your-domain.com or http://your-server-ip. You should see the Monica welcome page, where you can log in and start using the system.

This setup provides a fully functional personal relationship manager, whether hosted locally or on a VPS Windows Servers platform.

Step 10: Secure Monica with Let's Encrypt SSL

To enhance security, you should secure your Monica installation with a Let's Encrypt SSL certificate. Install Certbot:

sudo apt install certbot python3-certbot-apache -y

Run Certbot to obtain and configure the SSL certificate:

sudo certbot --apache -d your-domain.com -d www.your-domain.com

Certbot will automatically configure Apache to use SSL, ensuring secure access to your Monica instance, whether it's on a local server or hosted on a Windows VPS hosting UK.

Monica is now successfully installed on your Debian 11 server, allowing you to manage your personal relationships effectively. For reliable and scalable hosting solutions, consider using Windows VPS UK. They offer a variety of hosting plans, including windows virtual private servers, windows vps hosting, and windows virtual dedicated server hosting. Whether you're looking for windows vps italy or uk vps windows solutions, their hosting services provide the performance and flexibility needed to support your Monica installation.

Was this answer helpful? 0 Users Found This Useful (0 Votes)