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.
Before we start, make sure you have the following prerequisites in place:
Go
programming language installed on your system.PHP
and MySQL
extensions enabled, like Apache2
and MariaDB
.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
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.
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:
Start by logging in to the MySQL server:
sudo mysql -u root
You will be prompted for the MySQL root password.
Once you are logged in, create a new database for Gossa:
CREATE DATABASE gossa;
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.
Finally, exit the MySQL shell:
EXIT;
Next, you need to configure Gossa to connect to your MySQL database:
Start by copying the config.toml.sample
file to config.toml
:
cd /opt/gossa
sudo cp config.toml.sample config.toml
Edit the config.toml
file using your favorite text editor, such as nano
or vim
:
sudo nano config.toml
Find the following lines in the file:
[database]
host = "127.0.0.1"
username = ""
password = ""
name = ""
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.
Save the changes and exit the text editor.
After configuring Gossa, it's time to build and run the application:
Start by building the Gossa binary:
sudo go build -o gossa
Once the build completes, start the Gossa server:
sudo ./gossa
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.
Open a web browser and navigate to the following URL:
http://localhost:8080/
You should see the Gossa welcome page.
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!