Find a file
2024-05-20 02:51:07 -04:00
docker-compose.yml Provide image for both archs 2024-05-19 21:31:51 -04:00
Dockerfile Update comments 2024-05-17 20:49:36 -04:00
LICENSE Upload files to "/" 2024-05-17 05:07:59 -04:00
README.md update 2024-05-20 02:51:07 -04:00
token.conf Upload files to "/" 2024-05-17 05:07:59 -04:00

Netweak Agent for Docker

Cover

This is an unofficial Docker Image for Netweak's agent.

Running

Requirements

  • Supported OS:
    • Linux
    • macOS
    • Windows 10 or newer
  • Supported Architecture:
    • x86_64 / amd64
    • arm64 / aarch64
  • Docker Engine:

For some setups, having sudo access may be required.

Docker Compose

Create a folder somewhere on your server called netweak-agent:

mkdir ./netweak-agent
cd ./netweak-agent

Create new files called docker-compose.yml and token.conf:

touch docker-compose.yml
touch token.conf

In the docker-compose.yml file, add the following:

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

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:

docker compose up -d

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.

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.

Is this an offical Docker Image for Netweak?

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.