MacOS

If you notice any mistakes that need to be corrected, please reach out on Discord!

MongoDB

Petio supports two ways of connecting to a Mongo Database instance, locally or remote. We recommend the locally hosted MongoDB option.

MongoDB Locally

We assume you've installed homebrew in order to follow this guide.

  • Add the Official MongoDB Repo to homebrew:

brew tap mongodb/brew
  • Install MongoDB:

brew install [email protected]
  • Start MongoDB as a service:

brew services start mongodb-community

MongoDB Locally - On A Different Host

  • Please review the Linux guides and make changes as necessary for your situation.

MongoDB Remotely

  • Register for Atlas here.

  • Create a free cluster.

  • Change the provider or region if you need to. It may take some time to create the cluster.

  • After the cluster is made, click on connect and select MongoDB Compass and follow the instructions on screen.

Petio as a Service

  • First make a directory for Petio:

sudo mkdir /opt/Petio
  • Download the latest version of Petio:

sudo curl -L https://petio.tv/releases/latest --output petio-latest.zip
  • Extract Petio to the directory we just made:

sudo unzip petio-latest.zip -d /opt/Petio
  • Change the permissions so that Petio can work as expected:

sudo chown -R ${USER}:staff /opt/Petio
  • To have Petio running in the background without user input, we will use launchctl.

    • To more-or-less control launchddefine a service for Petio like shown below and save it as tv.petio.plist in the ~/Library/LaunchAgents/ folder.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>tv.petio</string>
        <key>ProgramArguments</key>
        <array>
            <string>/opt/Petio/bin/petio-macos</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
    </dict>
</plist>
  • Load the service using:

launchctl load ~/Library/LaunchAgents/tv.petio.plist
  • Start the service using:

launchctl start tv.petio
  • Verify that Petio is indeed running:

launchctl list | grep tv.petio
  • To stop Petio, run:

launchctl stop tv.petio

Once you've completed theses steps, you can navigate to http://<hostname>:7777 to start configuring Petio.

Updating Petio

  • Stop the Petio service with launchctl.

  • Navigate to the directory you have Petio installed in, then, download the latest version from the Downloads page with:

curl -L https://petio.tv/releases/latest --output petio-latest.zip
  • Extract the contents of freshly downloaded archive while overwriting the current contents of the current directory with:

unzip -o petio-latest.zip -d ./
  • Lastly, start the Petio service back up again with launchctl.

Last updated