Sep 14, 2024 3 min read

Organizr: The Ultimate Guide to Self-Hosting

Organizr: The Ultimate Guide to Self-Hosting
Table of Contents

Organizr is a self-hosted application designed to help users centralize and manage access to their other self-hosted tools and services. It acts as a unified dashboard where you can organize and seamlessly switch between apps like Plex, Sonarr, and Radarr. With its extensive customization options and the ability to self-host, Organizr empowers users to take full control of their home server environment. In this guide, we’ll walk you through installing Organizr, configuring Nginx as a reverse proxy, enabling logging, setting up backups, performing updates, and leveraging its unique features to get the most out of it.

Installing Organizr

πŸ“¦ Docker/Docker Compose Setup

The most efficient way to deploy Organizr is via Docker. Below is a docker-compose.yml file tailored for Organizr:


version: '3.8'

services:

organizr:

image: organizr/organizr

container_name: organizr

ports:

- "8080:80"  # Map external port 8080 to Organizr's internal port 80

volumes:

- ./organizr-config:/config  # Persist Organizr config to a local directory

environment:

- TZ=America/New_York  # Adjust timezone

restart: unless-stopped

Run these commands to deploy Organizr with Docker Compose:


mkdir -p ~/organizr && cd ~/organizr

nano docker-compose.yml  # Paste the above YAML into this file

docker-compose up -d

πŸš€ Manual Installation

For those who prefer a manual setup on a Linux server, follow these steps:

  1. Install dependencies (PHP, SQLite, and Nginx):

sudo apt update && sudo apt install -y php-cli php-sqlite3 php-curl php-xml unzip nginx

  1. Download Organizr and set up permissions:

cd /var/www

sudo wget https://github.com/causefx/Organizr/archive/refs/heads/master.zip

sudo unzip master.zip && sudo mv Organizr-master organizr

sudo chown -R www-data:www-data /var/www/organizr

  1. Configure PHP and Nginx (covered in the next section).

Start the application:


sudo php -S 0.0.0.0:8080 -t /var/www/organizr

Configuring Nginx as a Reverse Proxy

🌐 Nginx Configuration

To route traffic to Organizr, create an Nginx server block:


server {

listen 80;

server_name organizr.yourdomain.com;

location / {

proxy_pass http://127.0.0.1:8080;

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_set_header X-Forwarded-Proto $scheme;

}

}

Save the configuration to /etc/nginx/sites-available/organizr, then enable it:


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

sudo nginx -t && sudo systemctl reload nginx

πŸ”’ SSL/TLS Setup

Secure your Organizr instance with Let's Encrypt:


sudo apt install -y certbot python3-certbot-nginx

sudo certbot --nginx -d organizr.yourdomain.com

Automate SSL certificate renewals:


sudo crontab -e

0 0 * * * certbot renew --quiet

πŸ› οΈ Testing and Reloading Nginx

Always test configurations before reloading:


sudo nginx -t

sudo systemctl reload nginx

Logging and Debugging Organizr

πŸ—ƒοΈ Enabling Debug Logs

To enable debug logging in Organizr, modify the config.php file (found in /config for Docker or /var/www/organizr for manual setups):


$config['DEBUG'] = true;

πŸ“„ Viewing Logs

  • Docker:

docker logs organizr

  • Manual Setup: Check logs in /var/log/nginx/error.log or /var/www/organizr/logs/.

πŸ› οΈ Troubleshooting Common Issues

Inspect logs for errors like 401 Unauthorized or 504 Gateway Timeout. Often, misconfigured Nginx headers or incorrect permissions are the root cause. Adjust Nginx headers or run:


sudo chown -R www-data:www-data /var/www/organizr

πŸ“€ Exporting Logs

To send logs to an ELK Stack, configure Filebeat to forward /config/logs or /var/www/organizr/logs depending on your setup.

Backup and Restore

πŸ—‚οΈ File-Based Backups

Backup all configurations and files:


tar -czvf organizr-backup.tar.gz /path/to/organizr/config

πŸ”„ Database Backups

Export SQLite data:


sqlite3 /path/to/organizr/config/db.sqlite ".backup organizr-db-backup.sqlite"

πŸ“… Automated Backup Scripts

Create a cron job for periodic backups:


crontab -e

## Add:

0 2 * * * tar -czvf ~/organizr-backup-$(date +\%F).tar.gz /path/to/organizr/config

Updating and Upgrading Organizr

⬆️ Updating Docker Images

Pull the latest image and redeploy:


docker-compose pull && docker-compose up -d

πŸ› οΈ Manual Updates

If self-hosted manually, download and replace the files:


cd /var/www/organizr

sudo wget https://github.com/causefx/Organizr/archive/refs/heads/master.zip -O organizr-update.zip

sudo unzip organizr-update.zip -d /tmp && sudo rsync -av /tmp/Organizr-master/ /var/www/organizr/

sudo chown -R www-data:www-data /var/www/organizr

πŸ” Checking for Updates

Visit Organizr’s GitHub page or enable notifications for updates.

Leveraging Organizr’s Unique Features

πŸ”§ Enabling APIs

Organizr’s API allows for integrations with third-party tools. To enable it:

  1. Go to Organizr’s settings and enable the API.

  2. Use the API with tools like curl:


curl -X GET "http://organizr.yourdomain.com/api/v2/some_endpoint" -H "Authorization: Bearer <your_token>"

🌟 Advanced Configurations

  • LDAP Integration: Organize user authentication by connecting to an LDAP server.

  • Custom Themes: Modify CSS in the settings interface for a personalized UI.

Wrapping Up

This guide has covered every aspect of deploying, configuring, and managing Organizr, from installation to backups and updates. By following these steps, you can fully control and customize your central dashboard, making it a powerful tool for managing your self-hosted apps. Start implementing the provided examples today to unlock the full potential of Organizr!

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Selfhosted Ninja.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.