PortGate

Resources · Product docs · Product doc

Quickstart: your first server in 5 minutes

Create an account, add a server, paste one command on it, and read your first security score.

This gets one Linux server reporting to PortGate. You need a server you can reach over SSH, sudo on it, and python3 (every current Ubuntu, Debian, Rocky, Alma and Alpine image has it or installs it in one command).

1. Create your account

Sign up at portgate.dev/register and confirm your email. The free plan covers one server.

2. Add the server in the dashboard

Open Servers, choose Add server, and give it a name you will recognise in an alert, such as prod-web-1. PortGate shows an install command with a token in it. The token is shown once, so copy the whole command now.

The command looks like this:

curl -fsSL https://portgate.dev/downloads/install.sh | sh -s -- --token 'YOUR_TOKEN' --mode server --url 'https://portgate.dev'

If you would rather read the script first, download it, read it, then run it with the same flags:

curl -fsSLO https://portgate.dev/downloads/install.sh
less install.sh
sudo sh install.sh --token 'YOUR_TOKEN' --mode server --url 'https://portgate.dev'

The agent itself is one readable Python file: agent.py.

3. Run it on the server

SSH in and paste the command. The installer:

  • puts the agent and its config in /opt/portgate/ (config file mode 600);
  • schedules a heartbeat every 5 minutes in /etc/cron.d/portgate;
  • sends the first heartbeat straight away.

Nothing is opened on the server. The agent only makes outgoing HTTPS calls to the dashboard.

4. Read your first results

Within a minute or two the server page switches from Waiting for agent to your score. You will see:

  • Open ports and which process owns each one, with database and admin ports flagged when they listen on a public address;
  • SSH settings, such as password login and root login;
  • Failed SSH logins in the last 24 hours;
  • File integrity for /etc/passwd, /etc/group, /etc/ssh/sshd_config and /etc/crontab.

Each finding has a plain explanation and a fix command. Fix it on the server, and the next heartbeat updates the score.

5. Know what the baseline is

The first check-in becomes the baseline: the open ports and file hashes PortGate treats as normal. From then on, a new open port or a changed file shows up as a change against it, and you get an alert.

When you change the server on purpose (a new service, an edited sshd_config), check the finding is yours, then choose Approve Current State as New Baseline on the server page. An approval you do not recognise is the incident, not the fix.

6. Choose where alerts go

Open Alerts to send alerts to Slack, Discord, Telegram or your own webhook, as well as email.

If nothing arrives

Run the heartbeat by hand. It prints the error instead of writing it to the log:

sudo python3 /opt/portgate/agent.py --mode server --config /opt/portgate/config.json

The most common causes are a firewall that blocks outgoing HTTPS, a server clock that is far off, and a token that was revoked. See Troubleshooting, or report a problem and we will help.

Next steps