|
20 | 20 |
|
21 | 21 | ### Pre-built Binaries |
22 | 22 |
|
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. |
24 | 24 |
|
25 | 25 | ### Go Package Installation |
26 | 26 |
|
27 | | -Install SysCapture with the following command: |
| 27 | +You can also install SysCapture using Go: |
28 | 28 |
|
29 | 29 | ```shell |
30 | 30 | go install github.com/nodebytehosting/syscapture/cmd/syscapture@latest |
31 | 31 | ``` |
32 | 32 |
|
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 | | - |
66 | 33 | --- |
67 | 34 |
|
68 | 35 | ## Environment Variables |
@@ -90,17 +57,76 @@ export PORT=your_port # Optional: defaults to 59232 if not set |
90 | 57 | To run SysCapture with minimal configuration: |
91 | 58 |
|
92 | 59 | ```shell |
93 | | -API_SECRET=your_secret ./dist/syscapture |
| 60 | +API_SECRET=your_secret ./syscapture |
94 | 61 | ``` |
95 | 62 |
|
96 | 63 | Or with a full configuration: |
97 | 64 |
|
98 | 65 | ```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 |
100 | 67 | ``` |
101 | 68 |
|
102 | 69 | --- |
103 | 70 |
|
| 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 | + |
104 | 130 | ## API Documentation |
105 | 131 |
|
106 | 132 | SysCapture’s API is documented using the OpenAPI specification. |
|
0 commit comments