Skip to content

Your first inventory

In this tutorial, you run Jocasta in a container and sweep your network. Then you name a device and get a message on your phone when it goes quiet. It takes about 10 minutes.

You need a Linux machine with Docker on the network. You also need the network's prefix. To find it, run ip -4 addr. For example, inet 192.0.2.20/24 means 192.0.2.0/24.

1. Write the config

Create jocasta.yaml in an empty directory:

networks:
  - "192.0.2.0/24"

server:
  auth:
    cookie_secure: false   # sign in over plain HTTP

2. Start Jocasta

docker run -d --name jocasta --network host \
  -v jocasta-data:/data \
  -v ./jocasta.yaml:/data/jocasta.yaml:ro \
  ghcr.io/pushkar-anand/jocasta:latest

With host networking, the sweep can read hardware addresses.

3. Create the admin account

Open http://<host>:8080. Enter a username and a password of 8 or more characters, and select Create admin account.

Until this account exists, anyone who reaches the page can create it. So do this step immediately.

4. Look at the first sweep

The first sweep runs when Jocasta starts. Open Devices. Each row is one device, with its addresses, vendor and name.

A row with no vendor is usually a phone or a laptop. These devices make up their hardware address. A row with no name is a device that did not answer a name lookup.

5. Name a device

  1. Select a device you recognise.
  2. Select Edit details.
  3. Set Label to Office printer and Group to Office.
  4. Select Save.

The device list shows the new label.

6. Watch it

On the device's page, select Watch.

A watched device goes quiet 15 minutes after the last scan that saw it. To test this, turn the device off for 20 minutes. Then open Events.

7. Get a message on your phone

  1. Install ntfy on your phone and subscribe to a topic. Topics are public. So use a name that nobody can guess, such as jocasta-k3v9q2.
  2. Add it to jocasta.yaml:

    notify:
      phone:
        ntfy:
          url: "https://ntfy.sh/jocasta-k3v9q2"
    
  3. Restart Jocasta: docker restart jocasta.

  4. Open the account menu, top right, and select Notifications.
  5. Under phone, tick Watched device went quiet and Watched device came back.
  6. Select Save.
  7. Select Send test. Your phone gets the message "Jocasta test".

Next