Add directions for deploying to a linux host

This commit is contained in:
Jon Staab
2025-09-30 17:23:34 -07:00
parent 54a55da390
commit 67a00e71ee
2 changed files with 53 additions and 0 deletions
+34
View File
@@ -105,6 +105,40 @@ can_manage = true
See `justfile` for defined commands.
## Deployment
```sh
# Add a user
adduser zooid
# Install system dependencies
sudo apt update
sudo apt install git
# Install go and add it to path
wget -qO- https://go.dev/dl/go1.25.1.linux-amd64.tar.gz | sudo tar -C /usr/local -xzf -
echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile
# Log in as your user
su --login zooid
# Clone the repository and build
git clone https://github.com/coracle-social/zooid.git ~/zooid && cd zooid
go build -o bin/zooid cmd/relay/main.go
# Back to root
exit
# Add a service file - edit if needed
cp /home/zooid/zooid/zooid.service /etc/systemd/system/zooid.service
# Start the service
systemctl enable zooid
service zooid start
# Next, optionally set up a reverse proxy and create a config file for each virtual relay
```
## TODO
- [ ] Free up resources after instance inactivity
+19
View File
@@ -0,0 +1,19 @@
[Unit]
Description=zooid
ConditionPathExists=/home/zooid/zooid
After=network.target
[Service]
Type=simple
User=zooid
Group=zooid
WorkingDirectory=/home/zooid/zooid
ExecStart=/home/zooid/zooid/bin/zooid
Restart=always
RuntimeMaxSec=3600
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=zooid
[Install]
WantedBy=multi-user.target