PiWorker

PiWorker is a free and open source tool that let you automate tasks easily on your Raspberry Pi (can be used on other devices too) without letting aside your privacy. In these times where your data is used as a payment on some "free" software/services, I think is good to remark that PiWorker does not use any external server for nothing (unless you explicity add an action to doing it), so everything is executed inside your device, under your control.
I'm working hard to make PiWorker stable and robust, but for now, it's not even an alpha, so there should be bugs everywhere (If you see one, can you let me know it please? that will be really helpful!) so don't use it on a device that contain something that you don't want to loose.
Disclaimer: I am not responsible for the misuse that may be given to this software, whether for legal purposes or not. Use it at your own risk.
Installation:
curl -sSL https://github.com/Pegasus8/PiWorker/raw/master/install.sh | sudo bash
Installation from source:
- Make sure you have
golang
installed and configured. If not, check this.
- Make sure you have
nodejs
and npm
installed. If you don't, install them from here or here (if you use linux maybe the last option will be more easy).
- Check if you have
git
installed. If not (again), get it from here.
- Install pkger in your
GOPATH
running go get github.com/markbates/pkger/cmd/pkger
.
- Download the source code:
git clone https://github.com/Pegasus8/PiWorker
.
- Once downloaded, go inside the directory
cd PiWorker/
.
- Go to the dir of the frontend
cd webui/frontend/
, install the dependencies npm install
, and compile it npm run build
.
- Go back to the root PiWorker directory
cd ../..
.
- Execute
pkger
to include the frontend inside the binary.
- Compile the entire project (
output_dir
is the path where the executable will be saved): go build -o <output_dir>
. In my case, I prefer save the executable on the directory $HOME/PiWorker/
, so I will run the command go build -o $HOME/PiWorker/
. Note: the dir used must exist before the compiling.
- Go to the directory where you saved the executable:
cd <output_dir>
. In my case is $HOME/PiWorker/
, so I execute: cd $HOME/PiWorker/
.
- Install the service of P.W. running the following command:
sudo ./piworker --service install
. Why sudo
? Because you need root
privileges to add a new service to the system. The service must be installed? No, isn't something essential. If you prefer don't install it, remember that P.W. won't be executed when you reboot the system.
- IMPORTANT - Make a new user before start the service:
./piworker --new-user --username <your_username> --password <your_password> --admin
. Replace <your_username>
with the username you will use and <your_password>
with the password. Also, the --admin
flag can be avoided if you don't want to give admin privileges to the user. Note: you can add more users if you want.
- Optional (but recommended) - Generate a self-signed certificate for a secure connection (https) with the WebUI (Warning: don't use the WebUI/REST APIs from outside the LAN. As a software in early development, can contain vulnerabilities that can be exploited by more experienced people with malicious intentions):
openssl req \
-subj '/O=PiWorker' \
-new \
-newkey \
rsa:2048 \
-sha256 \
-days 365 \
-nodes \
-x509 \
-keyout server.key \
-out server.crt
- Start the service:
sudo ./piworker --service start
.
Built With
Thanks to all the developers who made each dependency used by PiWorker! They made the things much more easier for others devs like me, really.
Frontend (JS - VueJS)
Backend (Go)