How to Install Gossa on Linux Mint

Gossa is a self-hosted photo gallery written in Golang, which offers a great alternative to online photo-sharing platforms like Flickr, Picasa, or Google Photos. In this tutorial, we will show you how to install Gossa on Linux Mint, step by step.

Prerequisites

Before we start, make sure you have the following prerequisites in place:

Step 1: Download Gossa

First, start by opening your terminal and navigating to the directory where you want to download Gossa. In this example, we will use the /opt directory:

cd /opt

Next, use the following git command to download Gossa from the GitHub repository:

sudo git clone https://github.com/pldubouilh/gossa.git

Step 2: Install Dependencies

Once you have downloaded Gossa, use the following command to install its dependencies:

sudo apt-get install -y libjpeg-dev libexif-dev mariadb-server mariadb-client php php-mysql

This command will install the libjpeg-dev and libexif-dev packages, which are needed for image processing, and the MariaDB database server and PHP scripts to display and manage the photo gallery.

Step 3: Create a MySQL Database

Before you can start installing and configuring Gossa, you need to create a database and user for it. To do this, follow the steps below:

  1. Start by logging in to the MySQL server:

    sudo mysql -u root
    

    You will be prompted for the MySQL root password.

  2. Once you are logged in, create a new database for Gossa:

    CREATE DATABASE gossa;
    
  3. Next, create a new user account for Gossa with full access to the database you just created. Replace gossauser and password123 with your own choices:

    CREATE USER 'gossauser'@'localhost' IDENTIFIED BY 'password123';
    GRANT ALL PRIVILEGES ON gossa.* TO 'gossauser'@'localhost';
    

    This creates a new user account named gossauser with the password password123 and grants it full access to the gossa database.

  4. Finally, exit the MySQL shell:

    EXIT;
    

Step 4: Configure Gossa

Next, you need to configure Gossa to connect to your MySQL database:

  1. Start by copying the config.toml.sample file to config.toml:

    cd /opt/gossa
    sudo cp config.toml.sample config.toml
    
  2. Edit the config.toml file using your favorite text editor, such as nano or vim:

    sudo nano config.toml
    
  3. Find the following lines in the file:

    [database]
    host       = "127.0.0.1"
    username   = ""
    password   = ""
    name       = ""
    
  4. Modify the lines to look like this:

    [database]
    host       = "127.0.0.1"
    username   = "gossauser"
    password   = "password123"
    name       = "gossa"
    

    This sets the database credentials for Gossa to connect to the database we just created.

  5. Save the changes and exit the text editor.

Step 5: Build and Run Gossa

After configuring Gossa, it's time to build and run the application:

  1. Start by building the Gossa binary:

    sudo go build -o gossa
    
  2. Once the build completes, start the Gossa server:

    sudo ./gossa
    
  3. You should see the following output in your terminal:

    INFO[0000] Listening on :8080
    INFO[0000] Running in Development mode
    

    This means that Gossa is running on port 8080 and is ready to use.

  4. Open a web browser and navigate to the following URL:

    http://localhost:8080/
    

    You should see the Gossa welcome page.

Conclusion

You have successfully installed Gossa on your Linux Mint system. You can now start uploading your photos and organizing them into albums using the Gossa web interface. Enjoy!

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!