How to Install Gotify on EndeavourOS

Gotify is a self-hosted and open-source Push Notification Service that can be used for seamlessly sending notifications across multiple applications. This tutorial will guide you through the process of installing Gotify on EndeavourOS.

Before we proceed, please make sure that you have elevated privileges to install and configure Gotify. Let's begin!

Step 1: Update the system

Firstly, update the system to the latest packages using the following command:

sudo pacman -Syu

Step 2: Install Required Dependencies

Secondly, Gotify requires some dependencies in order to work properly. Install these dependencies by running the following command:

sudo pacman -S curl git nginx php-fpm php-gd php-intl php-json php-mbstring php-mysql php-pgsql php-sqlite php-tidy php-xsl php-zip

Step 3: Download and Extract Gotify

Next, you need to download and extract Gotify. You can do this by running the following commands:

sudo mkdir -p /var/www/gotify && \
sudo curl -L "https://github.com/gotify/server/releases/latest/download/gotify-linux-amd64.tar.gz" -o /tmp/gotify.tar.gz && \
sudo tar -xf /tmp/gotify.tar.gz -C /var/www/gotify --strip-components=1 && \
sudo rm -f /tmp/gotify.tar.gz && \
cd /var/www/gotify/

Step 4: Start Gotify

Finally, start the Gotify service by running the following command:

./gotify-linux-amd64

This will start the Gotify service on port 80 by default. You can access it by typing http://localhost/ in the web browser.

Step 5: Configure Nginx

For a secure installation, it is recommended to configure Nginx to act as a reverse proxy for Gotify. To do this, create a new Nginx server block by running:

sudo nano /etc/nginx/sites-available/gotify

And paste the following content:

server {
    listen 80;
    server_name your.domain.here;

    location / {
        proxy_pass http://127.0.0.1:80/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_buffering off;
        client_max_body_size 0;
    }
}

Make sure to replace your.domain.here with your actual domain name, and save the file. Then, enable the server block:

sudo ln -s /etc/nginx/sites-available/gotify /etc/nginx/sites-enabled/

Finally, reload Nginx for the changes to take effect:

sudo systemctl reload nginx

Conclusion

Congratulations, you are now done installing Gotify on EndeavourOS. You should now be able to access Gotify by typing your server IP address or domain name in your web browser. If you encounter any issues, do not hesitate to seek guidance from the official Gotify documentation.

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!