You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JSON should contain an array of relay URLs, which default to wss:// if you don't explicitly specify the protocol.
82
82
83
-
### 4. Create a Systemd Service
83
+
### 4. Run on System Startup
84
84
85
+
### Linux - Create a Systemd Service
85
86
To have the relay run as a service, create a systemd unit file. Make sure to limit the memory usage to less than your system's total memory to prevent the relay from crashing the system.
86
87
Replace the values for `ExecStart` and `WorkingDirectory` with the actual paths where you installed Haven and stored the `.env` file.
87
88
@@ -128,6 +129,28 @@ sudo systemctl start haven
128
129
sudo systemctl enable haven
129
130
```
130
131
132
+
### MacOS - Create a login item App
133
+
To have the relay run on boot, create a script that will open terminal and run the haven binary, the termainal will remain open and the relay running with it. Be sure the download /haven directory is locacted in the MacOS home folder ~/
134
+
135
+
1. Create the App: Open Script Editor
136
+
137
+
2. Add the following contents:
138
+
139
+
```ini
140
+
tell application "Terminal"
141
+
activate
142
+
do script "cd \"$HOME/haven\"; ./haven; exec $SHELL"
143
+
end tell
144
+
```
145
+
3. Save in Applications folder
146
+
147
+
4. Open System Settings - General - Login Items
148
+
Hit the plus, add run_haven from Applications folder
149
+
150
+
5. Reboot - On initial restart and terminal auto-open choose “allow”
151
+
152
+
6. Reboot again to test login item
153
+
131
154
### 5. Serving over nginx (optional)
132
155
133
156
To have a domain name (example: relay.domain.com) point to your machine, you will need to setup an nginx.
0 commit comments