Documentation

VM worker

Run your dPanel jobs on a server or VM you control. Add a VM worker in dPanel and install it on one of your servers with one button, or run one command on any other machine.

A VM worker is a server or VM (virtual machine: a computer rented or run in software) that takes your dPanel workspace's jobs. It runs all the time, asks dPanel for jobs, and runs them against your servers over SSH. Use it when servers connected over SSH are reachable only from your own network.

There are two ways to install it:

  • Install on a server (easiest): pick one of your servers that already runs the dPanel Agent, and dPanel installs the worker there. There is nothing to copy or type.
  • Copy the command: for any other machine, run one command on it.

Before you start

  • A Linux server or VM with systemd, 64-bit (x86_64 or arm64): Ubuntu 22.04 or 24.04, or Debian 12, are tested. At least 1 GB of memory and 3 GB of free disk.
  • It can reach your servers over SSH, and the internet over HTTPS (port 443): https://pawon.devetek.app, GitHub and the Python package index. Nothing needs to reach the machine: the worker connects out.
  • For Install on a server: the server is in the same workspace and its dPanel Agent is online (the server shows Agent online). If the agent needs an upgrade, upgrade it from the server's page first.
  • For Copy the command: you can run commands as root on the machine (with sudo, or as the root user).

You do not add SSH keys: dPanel gives the worker your servers' SSH access with each job.

1. Add the worker in dPanel

  1. Open Profile for your personal workspace, or your team's page.
  2. In Workers, press Add worker and choose VM.
  3. Name: for example "Office VM".
  4. Executor ID: 2 to 63 lowercase letters, digits or hyphens, for example office-vm-01. It also names the service on the machine.
  5. Press Add worker.
The Add worker dialog on the VM tab, with Name Office VM and Executor ID office-vm-01
Add worker → VM, filled in.

dPanel then asks where to install the worker, with two tabs: Install on a server and Copy the command.

2. Install the worker

On one of your servers

  1. Stay on Install on a server.
  2. Pick the server. Only servers whose agent is online can be picked; the others say why (for example Agent not reporting).
  3. Optional: Jobs at once, from 1 to 16, to let the worker run several jobs at the same time. Leave it empty for one at a time.
  4. Press Install on this server.

The server's dPanel Agent downloads the installer and runs it for you. The dialog follows it: Installing, then Starting, then Connected. A first install takes about 3 minutes. You can close the dialog; the worker's Last seen time in the Workers list shows when it is up.

From the terminal, the same install is one command, which waits until the worker connects:

bash
dnocs worker add --type vm --name office --executor-id office-01 --server-id 12

Find the server ID with dnocs server list.

On another machine: run one command

For a machine without the dPanel Agent, choose Copy the command. dPanel shows one command, for example:

bash
curl -fsSL https://pawon.devetek.app/api/v2/worker/install.sh | sudo bash -s -- --code dwe_...

The command works once, for 2 hours. Keep the dialog open: it follows the install.

Paste the command into a terminal on the machine. It:

  1. checks the machine (Linux, systemd, 64-bit, HTTPS access) and installs the few system packages it needs;
  2. creates a system user, dpanel-worker, and a private Python environment with Ansible in /opt/dpanel/vm-worker, so the system's own Python is left alone;
  3. downloads the worker and checks its checksum, then prepares the Ansible collections dPanel's modules need;
  4. saves the worker's settings, including its token, in /etc/dpanel/worker/<executor ID>.env, readable only by root. The token is never printed;
  5. starts the service dpanel-worker@<executor ID> and waits until it connects.

It ends with Done: the dPanel worker office-vm-01 is connected and takes jobs. The dialog in dPanel turns Connected at the same time. A first install takes about 3 minutes, mostly for the Python packages.

Other forms of the same command are under Already root, or no curl? in the dialog. Logged in as root, leave out sudo:

bash
curl -fsSL https://pawon.devetek.app/api/v2/worker/install.sh | bash -s -- --code dwe_...

On a machine with wget but no curl, as root:

bash
wget -qO- https://pawon.devetek.app/api/v2/worker/install.sh | bash -s -- --code dwe_...

What the installer does

Both ways run the same installer. On a server, the agent runs it for you; the install code goes from dPanel to the agent directly and is never shown.

3. Switch to private workers

In Workers, choose Private workers and confirm. From the terminal: dnocs worker mode private.

The Workers card listing a VM worker office-vm-01 and a GitHub workflow worker acme/dpanel-workers, with the Private workers option next to Shared workers
Your workers are listed under the mode switch. Choose Private workers to send jobs to them.

Upgrade, change or remove

All of these run on the machine. Upgrade every worker on the machine to the latest version:

bash
curl -fsSL https://pawon.devetek.app/api/v2/worker/install.sh | sudo bash

Change how many jobs each worker runs at once:

bash
curl -fsSL https://pawon.devetek.app/api/v2/worker/install.sh | sudo bash -s -- --slots 2

Remove one worker, or leave out --name to remove every worker and their files:

bash
curl -fsSL https://pawon.devetek.app/api/v2/worker/install.sh | sudo bash -s -- --uninstall --name office-vm-01

An upgrade keeps each worker's settings and token and restarts it only when something changed. Restarting stops the job it is running, so upgrade when no job runs. After you remove a worker from the machine, remove it in dPanel too (Workers → the bin icon), which also stops its token from working.

One machine can run several workers: add each one in dPanel and run its command on the same machine. Each gets its own service, dpanel-worker@<executor ID>.

Move or reinstall a worker

Press Install on the worker in the Workers list. Choose Install on a server and pick the server (or run dnocs worker install --id <worker ID> --server-id <server ID>), or choose Copy the command and run the new command on the machine (or dnocs worker install-command --id <worker ID>). The worker gets a new token, so a copy still running elsewhere stops taking jobs; stop it there with --uninstall.

Check the worker

To seeRun on the machine
Whether it runssystemctl status dpanel-worker@office-vm-01
Its logjournalctl -u dpanel-worker@office-vm-01 -n 100
Its log as it happensjournalctl -u dpanel-worker@office-vm-01 -f

In dPanel, the worker's Last seen time updates while it asks for jobs.

Troubleshooting

When the install stops, the dialog in dPanel shows why (the command also prints it). Fix it, then press Try again for an install on a server, or run the same command again; if 2 hours have passed, press Install on the worker for a new one. From the terminal, dnocs worker install-status --id <worker ID> shows how far the latest install got.

When you install on a serverWhat to do
The server's dPanel Agent is not connectedWait until the server shows Agent online, or restart the agent on the server, then try again.
The server's dPanel Agent is too oldUpgrade the agent from the server's page, then try again.
The agent on this server does not run as rootInstall with Copy the command instead, as root on the machine.
The server was not found in this workspacePick a server of the workspace the worker belongs to.
Another worker is being installed on this serverWait until that install finishes, then try again.
MessageWhat to do
The command was not run as rootRun it with sudo, or become root with sudo -i or su - and use the root form.
The machine does not run systemdUse a full server or VM. Containers without systemd are not supported. On Windows, use a Linux VM.
The machine is not 64-bitUse an x86_64 or arm64 system. On a Raspberry Pi, install the 64-bit Raspberry Pi OS.
A required tool is missing and could not be installedInstall curl, git, python3, python3-venv, openssh-client and libsodium23 with the system package manager (for example sudo apt-get install -y curl git python3-venv openssh-client libsodium23).
The machine cannot reach dPanel or GitHub over HTTPSAllow outbound HTTPS (port 443) to pawon.devetek.app, raw.githubusercontent.com, github.com and pypi.org. Check a proxy or firewall.
dPanel did not accept the install codeThe command was already used or is older than 2 hours. Press Install on the worker for a new one.
Python 3.10 or newer with venv could not be installedUse Ubuntu 22.04 or newer, or Debian 12 or newer. The pip messages above the error say which package failed.
The dPanel worker could not be downloaded, or failed its integrity checkA network problem cut the download. Run the command again.
The worker service did not startRead journalctl -u dpanel-worker@<executor ID> -n 100. Then run the command again.
The worker started but has not connected to dPanelThe machine reached dPanel during the install, so this is usually a proxy or firewall that drops long connections. Check the log; the worker keeps trying by itself.

The installer prepares the Ansible collections dPanel's modules need, so the first job starts right away. If it could not prepare them, the first job does it once and keeps them, and takes a few minutes longer.

Install by hand

If you prefer to set up the service yourself, run dnocs worker add --type vm --name office --executor-id office-01 --show-token. It prints the token and the settings for the executor; put them in a root-only environment file and run dpanelprod-executor from dPanel-ID/artifacts as a service, with Ansible core 2.16 on its PATH. New token on the worker replaces the token; the old one stops working at once.

Frequently asked questions

Which machine can be a VM worker?

Any Linux server or VM with systemd, x86_64 or arm64, that can reach your servers over SSH and the internet over HTTPS. Ubuntu 22.04 or 24.04 and Debian 12 are tested. It can sit inside your private network.

Does the command open a port or add an SSH key?

No. The worker connects out to dPanel over HTTPS. Nothing connects in, and no key is added to the machine.

Where is the token?

In /etc/dpanel/worker/<executor ID>.env, readable only by root. The command never prints it, and dPanel keeps only a fingerprint of it.

Can I add a VM worker from the terminal?

Yes. dnocs worker add --type vm --name office --executor-id office-01 --server-id 12 installs it on your server and waits until it connects. Without --server-id it prints the install command; dnocs worker install-command --id <worker ID> prints a new one.

Is the install code ever shown when I install on a server?

No. dPanel gives it only to your server's agent, which passes it to the installer. It is not shown in dPanel, in the terminal or in any log.

What happens when I remove a VM worker?

It stops taking jobs and its token stops working. Remove it from the machine too, with --uninstall (see Upgrade, change or remove).