Netweak-Agent-Docker/README.md

101 lines
3.4 KiB
Markdown
Raw Permalink Normal View History

2024-05-17 04:07:59 -05:00
# Netweak Agent for Docker
2024-05-19 20:31:41 -05:00
![Cover](https://md.sudovanilla.org/images/network-plus-docker.png)
2024-05-17 04:07:59 -05:00
2024-05-20 01:49:52 -05:00
> This is an unofficial Docker Image for Netweak's agent.
2024-05-17 04:07:59 -05:00
2024-05-20 01:49:52 -05:00
## Running
### Requirements
- Supported OS:
- Linux
- macOS
- Windows 10 or newer
- Supported Architecture:
- x86_64 / amd64
- arm64 / aarch64
- Docker Engine:
- [Linux](https://docs.docker.com/engine/install/#supported-platforms)
- [macOS](https://richstone.io/best-way-to-install-docker-on-a-mac/) ([Homebrew](https://brew.sh/), without Docker Desktop)
- [Windows](https://dev.to/felipecrs/simply-run-docker-on-wsl2-3o8) ([WSL2](https://learn.microsoft.com/en-us/windows/wsl/install), without Docker Desktop)
> For some setups, having `sudo` access may be required.
### Docker Compose
Create a folder somewhere on your server called `netweak-agent`:
```bash
mkdir ./netweak-agent
cd ./netweak-agent
```
Create new files called `docker-compose.yml` and `token.conf`:
```bash
touch docker-compose.yml
touch token.conf
```
In the `docker-compose.yml` file, add the following:
```yml
services:
netweak-agent:
# For AMD64 Machines:
image: ark.sudovanilla.org/korbs/netweak-agent:amd64
# For ARM64/V8 Machines:
# image: ark.sudovanilla.org/korbs/netweak-agent:arm64
restart: unless-stopped
container_name: netweak_agent
volumes:
- ./token.conf:/etc/netweak/token.conf
```
Run the Docker Pull command to get download the Docker image:
```
docker compose pull
```
![](https://md.sudovanilla.org/images/nafd-int-token.png)
Now, try adding a new server to your Netweak dashboard and grab the token. The instructions on screen will show a command, you don't need this command for this setup, but you need the randomly generated token that is at the end of the provided command. Copy that and paste it into the `token.conf` file.
Once done, click Continue in Netweak.
Run the agent:
2024-05-17 04:07:59 -05:00
```bash
docker compose up -d
```
2024-05-20 01:49:52 -05:00
After a few moment, Netweak will detect the agent if you've setup things correctly.
## Questions and Answers
**Does this support macOS and Windows?**
Yes, by using Docker it does support both of these operating systems. This has been tested successfully on a Mac Mini M2 running macOS 13/14.
This should also work on the Raspberry Pi 4 and up. Although, this has not been tested. Contact me or leave an issue if you've gotten this to run on a Raspberry Pi, I would like to know.
**Can I really trust providing my server's token?**
SudoVanilla does not have access to any Docker containers you run on your server and does not have access to your Netweak account.
**Metric information is wrong, why is this?**
This depends on how Docker is setup, I've not yet looked into correcting this behavior.
2024-05-17 04:07:59 -05:00
2024-05-20 01:49:52 -05:00
**Why does it say I'm running Debian? I'm not.**
This Docker Image is based on slim edition of Debian 12. When the Netweak agent runs in this Docker Image, it will detect this and assume you're using Debian 12. This is expected behavior.
2024-05-17 04:07:59 -05:00
**Is this an offical Docker Image for Netweak?**
2024-05-20 01:49:52 -05:00
No, SudoVanilla is not affiliated with Netweak in any way. This is NOT an official Docker image. SudoVanilla is only an enterprise customer of Netweak.
**How do I uninstall the agent?**
In Netweak, skip the uninstall instructions and just delete the server.
As for on your server, run:
```
cd ./netweak-agent
docker compose down
```
Then delete the `netweak-agent` folder you created.