Create unprivileged user pw
:
useradd pw -d /opt/pw
# Set strong password
passwd pw
Copy pw
to /opt/pw
.
Prepare config:
cp pw.yml-dist /opt/pw/pw.yml
Edit /opt/pw/pw.yml
for your needs.
Update permissions:
chmod -R 500 /opt/pw
Create file /etc/systemd/system/pw.service
with content:
[Unit]
Description=PW - Secure Secret Share Service
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=simple
User=pw
ExecStart=/opt/pw/pw
WorkingDirectory=/opt/pw
KillMode=process
[Install]
WantedBy=multi-user.target
Then start:
systemcl daemon-reload
systemctl enable --now pw
Application will be available on http://localhost:8080.