Skip to content

Commit c85cdf1

Browse files
committed
feat(update): stuff
1 parent 0ed65a8 commit c85cdf1

File tree

1 file changed

+63
-37
lines changed

1 file changed

+63
-37
lines changed

README.md

Lines changed: 63 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,49 +20,16 @@
2020

2121
### Pre-built Binaries
2222

23-
Download the latest binaries from the [GitHub Releases](https://github.com/nodebytehosting/syscapture/releases) page.
23+
We highly recommend using our pre-built binaries to get started quickly. Simply download the appropriate binary for your platform from the [GitHub Releases](https://github.com/nodebytehosting/syscapture/releases) page.
2424

2525
### Go Package Installation
2626

27-
Install SysCapture with the following command:
27+
You can also install SysCapture using Go:
2828

2929
```shell
3030
go install github.com/nodebytehosting/syscapture/cmd/syscapture@latest
3131
```
3232

33-
### Build from Source
34-
35-
#### Prerequisites
36-
37-
- [Git](https://git-scm.com/downloads) for cloning the repository.
38-
- [Go](https://go.dev/dl/) for building the project.
39-
40-
#### Steps
41-
42-
1. **Clone the repository:**
43-
44-
```shell
45-
git clone [email protected]:nodebytehosting/syscapture.git
46-
```
47-
48-
2. **Change directory:**
49-
50-
```shell
51-
cd syscapture
52-
```
53-
54-
3. **Build SysCapture:**
55-
56-
```shell
57-
go build -o dist/syscapture ./cmd/syscapture/
58-
```
59-
60-
4. **Run SysCapture:**
61-
62-
```shell
63-
./dist/syscapture
64-
```
65-
6633
---
6734

6835
## Environment Variables
@@ -90,17 +57,76 @@ export PORT=your_port # Optional: defaults to 59232 if not set
9057
To run SysCapture with minimal configuration:
9158

9259
```shell
93-
API_SECRET=your_secret ./dist/syscapture
60+
API_SECRET=your_secret ./syscapture
9461
```
9562

9663
Or with a full configuration:
9764

9865
```shell
99-
API_SECRET=your_secret GIN_MODE=release PORT=your_port ./dist/syscapture
66+
API_SECRET=your_secret GIN_MODE=release PORT=your_port ./syscapture
10067
```
10168

10269
---
10370

71+
## Running as a systemd Service
72+
73+
For a more robust local setup, you can run SysCapture as a systemd service to ensure it starts on boot and automatically restarts if it fails.
74+
75+
#### Sample systemd Service File
76+
77+
Create a file at `/etc/systemd/system/syscapture.service` with the following content (be sure to update paths and usernames as needed):
78+
79+
```ini
80+
[Unit]
81+
Description=SysCapture Monitoring Agent
82+
After=network.target
83+
84+
[Service]
85+
User=your_username # Change this to your local username
86+
Group=your_username # Change this accordingly
87+
ExecStart=/path/to/syscapture # Replace with the full path to your binary
88+
Restart=always
89+
Environment="API_SECRET=your_secret"
90+
Environment="GIN_MODE=release"
91+
Environment="PORT=59232"
92+
93+
[Install]
94+
WantedBy=multi-user.target
95+
```
96+
97+
#### Setup Steps
98+
99+
1. **Copy the service file:**
100+
Save the above configuration to `/etc/systemd/system/syscapture.service`.
101+
102+
2. **Reload systemd configuration:**
103+
104+
```shell
105+
sudo systemctl daemon-reload
106+
```
107+
108+
3. **Enable the service:**
109+
110+
```shell
111+
sudo systemctl enable syscapture
112+
```
113+
114+
4. **Start the service:**
115+
116+
```shell
117+
sudo systemctl start syscapture
118+
```
119+
120+
5. **Check the service status:**
121+
122+
```shell
123+
sudo systemctl status syscapture
124+
```
125+
126+
This setup ensures that SysCapture runs continuously in the background, even after reboots.
127+
128+
---
129+
104130
## API Documentation
105131

106132
SysCapture’s API is documented using the OpenAPI specification.

0 commit comments

Comments
 (0)