Skip to content

Production Deployment Guide

Maattt GoobyFRS edited this page Dec 6, 2025 · 6 revisions

Debian 12 Setup Process

This document will guide you through the process of deploying GoobyDesk for production use on a VPS. This has been tested on Linode and Oracle OCI.

I will not be providing security or basic setup guidance. Your VPS maintenance is on you.

sudo mkdir /var/www/GoobyDesk
sudo chown caddy /var/www/GoobyDesk
cd /var/www/GoobyDesk
git clone https://github.com/GoobyFRS/GoobyDesk.git
cp example_env .env
cp example_employee.json employee.json
cp example_tickets.json tickets.json
touch /var/log/goobydesk.log
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

BEFORE YOU CONTINUE FORWARD YOU SHOULD ASSIGN CORRECT VARIABLE IN THE DOTENV (.env) FILE, UPDATE employee.json WITH THE DESIRED LOGIN CREDENTIALS, AND VERIFY THE CONTENT OF THE CORE_CONFIGURATION.YML FILE

RUN THE APPLICATION AS IS TO ENSURE NO ERRORS APPEAR IN THE TERMINAL python3 ./app.py CTRL+C to quit.

VALIDATE GUNICORN WORKS gunicorn --bind 127.0.0.1:8000 app:appCTRL+C to quit.

NOW YOU MAY CONTINUE

GUNICORN Setup

Create a systemd service for Gunicorn. By default Gunicorn will use port 8000.

sudo touch /etc/systemd/system/goobydesk.service

Add the following content.

[Unit]
Description=Gunicorn Instance serving GoobyDesk
After=network.target

[Service]
User=yourUsername
Group=www-data
WorkingDirectory=/var/www/GoobyDesk
Environment="PATH=/var/www/GoobyDesk/venv/bin"
ExecStart=/var/www/GoobyDesk/venv/bin/gunicorn -w 3 -b 127.0.0.1:8000 app:app

[Install]
WantedBy=multi-user.target

Caddy Setup

Append the following to your Caddyfile.

subdomain.example.org {
        reverse_proxy 127.0.0.1:8000

        log {
                output file /var/log/caddy/access.log
                format json
        }
}

After creating the Caddy file with logging, setup a log rotation config for the Caddy logs....

sudo nano /etc/logrotate.d/caddy

Append the following data to the Caddy log rotation config...

/var/log/caddy/access.log {
    size 10M
    rotate 12
    compress
    missingok
    notifempty
    copytruncate
}

Troubleshooting

  • sudo systemctl status goobydesk.service
  • sudo systemctl stop goobydesk.service
  • sudo systemctl start goobydesk.service
  • sudo systemctl restart goobydesk.service
  • tail -n 25 /var/log/goobydesk.log

How To Update Production to latest version

/your/desired/path/GoobyDesk
sudo systemctl stop goobydesk.service
git pull origin main
sudo systemctl start goobydesk.service
sudo systemctl status goobydesk.service

Clone this wiki locally