Accessible from remote computer


#1

hello guys, new user here.

i am playing around with this and i got interested, however, as per my limited understanding i can only view data using localhost:5600?

if i want to access this via browser from different computer, what should i do?


#2

We are planning a sync feature for the future where you can sync data between ActivityWatch on multiple devices. That’s not a reality yet though.

There are two solutions currently available (but none of which are nice to use):

  • Export the data on your first computer and move it to a new one
  • Open up the ports of ActivityWatch to the rest of your local network (a security risk)

If you want to open up the ports, you can find where to find the config files here: https://activitywatch.readthedocs.io/en/latest/getting-started.html#config

Then you just need to change the “host” field to “0.0.0.0” and restart ActivityWatch. Now activitywatch is available from any computer in your local network at “my_computer_name:5600”


#3

did the changes in ~/.config/activitywatch/aw-server/aw-server.ini, updated host = localhost to
host = 0.0.0.0 under [server] , restarted, and it worked.

may i know how/where the data gathered is stored? i was thinking of finding a way
to export the data programmatically if i can manage to learn python.

thank you very much by the way for such quick response.


#4

There is a SQLite database file which is placed on different paths depending on operating system.

However, the best way is to use our export HTTP API

To download all buckets (takes a very long time if your database is large) use this URL: http://127.0.0.1:5600/api/0/export

To download a single bucket (might also take a while) use this URL: http://127.0.0.1:5600/api/0/buckets/{bucket_id}/export

If you only want the last 100 events or just between a set of timeframes, use the events get api: http://127.0.0.1:5600/0/buckets/{bucket_id}/events

To see all HTTP APIs, look here
http://127.0.0.1:5600/api/