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.

Macs with the new M1 chip (arm64 arch) do not yet support Mongo locally installed. Please use either Remote MongoDB Hosting or any of the Docker options.

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 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
  • 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.