Documentation

Connect a server with the dPanel agent

Add any Linux server you already have, a home server, a homelab PC, a Raspberry Pi, a VPS or a VM behind a router, to dPanel with one command. It needs no public IP, no open port and no SSH.

This is the recommended way to add a server you already have: a home server, a homelab PC, a Raspberry Pi, a VPS at any hosting company, a dedicated server, or a VM behind a router. You run one command on the machine. It installs the dPanel agent, a small program that connects out to dPanel and keeps that connection open. Everything you do in dPanel afterwards (installing software, deploying apps, the browser terminal, opening databases) travels over that connection.

Nothing connects in to your machine. You don't put a dPanel SSH key on it, you don't open or forward a port, and it doesn't need a public IP address.

This guide walks through the whole thing with a real machine called home-server. It takes about five minutes.

What you need first

  • A 64-bit Linux machine (Intel/AMD x86_64 or ARM arm64) that runs systemd. Ubuntu or Debian are recommended; Raspberry Pi OS 64-bit, Fedora and most other full Linux systems work too.
  • A terminal on that machine, sitting in front of it or through the login you already use, where you are root or can run commands with sudo.
  • Outbound HTTPS (port 443) from the machine to dPanel and to github.com, where the agent is downloaded from. It only connects out, so nothing has to be opened on your router.
  • A dPanel account. You don't need an SSH key, a cloud account or dnocs on the machine.
Your machineCan it run the agent?
Linux server, VPS or PCYes
Raspberry PiYes, with a 64-bit system (uname -m prints aarch64)
Windows PCYes, inside Ubuntu on WSL2 with systemd turned on: see Windows (WSL2)
MacNo. Use a Linux virtual machine on the Mac, a VPS, or a cloud server
Phone or tabletNo. Use a VPS, a Linux PC or a cloud server; you can still manage it from your phone
Docker container, Alpine LinuxNo: they don't run systemd. Use a full Linux server or VM

Step 1: Connect the machine

The easiest way is from the dPanel website. You copy one command and run it on the machine.

  1. In dPanel, pick the workspace the machine should belong to, open Servers, then Create Server.

  2. On the Connect a server with the dPanel agent card, choose what kind of machine it is. For a Linux server or VPS the card goes straight on; for a Windows PC it first shows the WSL2 steps (see Windows (WSL2)); for a Mac or a phone or tablet it explains why the agent can't run there and what to use instead.

  3. Type a name for the server if you like, for example my-server. Leave it empty and the server takes the machine's own name once it connects.

  4. Choose Get install command. dPanel shows a one-line command in a dark box. Choose Copy.

  5. On the machine, paste the command into the terminal and run it. It looks like this:

    bash
    curl -fsSL --data 'code=dpe_…' https://…/api/v2/agent/install | sudo bash
    

    It may ask for your password, because of sudo. Already root, or no sudo on the machine? Open Already root, or no curl on the machine? under the command for the same command without sudo, and one that uses wget for a machine without curl.

    The command checks the machine first and stops with a clear message if something is missing. At the end it waits up to 90 seconds for the agent to connect and prints Done: this machine is connected to dPanel or what went wrong and what to check.

  6. Back in dPanel, the card says Waiting for the machine…, then Installing once the command runs there, and Connected! as soon as the agent connects, usually within a few minutes. If the install stops, the card shows why. Choose Open server.

The Connect a server with the dPanel agent card after Get install command: the one-line command with a Copy button, how long it works, and the Waiting status with Open server
The card waits for the machine and changes to Connected! by itself. The code in the command is shown here as a placeholder.

The command works once, for 2 hours. For another machine, choose Get a new command; each command adds a new server. You don't install dnocs or sign in on the machine, and nothing needs a public IP, an open port or a dPanel SSH key.

What the command does. It downloads dPanel's install script, sending its single-use code in the request body (never in a web address). The script creates a Linux user for your dPanel account, installs the agent as the system service dpanel-agent, and the agent connects out to dPanel.

Why sudo? Connecting changes the machine itself: it creates a Linux user and installs the agent as a system service, which only an administrator may do.

Want to read it first? Replace | sudo bash at the end of the command with > install.sh, read install.sh, then run sudo bash install.sh. The code is used up only when the agent connects, so saving the script first does not waste it.

Prefer the command line? Use dnocs

If you already use dnocs, the dPanel command line tool, you can connect the machine with it instead. The card's Prefer the CLI? section shows the same command.

On the machine:

  1. Install dnocs. Follow Install dnocs.

  2. Sign in as your normal user, without sudo:

    bash
    dnocs auth login -u <your username>
    
  3. Optional: pick the workspace the machine belongs to. Skip this to keep it in your personal space.

    bash
    dnocs workspace list
    dnocs workspace set --id <workspace id>
    
  4. Connect the machine:

    bash
    sudo dnocs machine register
    

    sudo dnocs server register does the same.

dnocs names the workspace and asks you to confirm. Then it creates a Linux user for your dPanel account, installs the agent as a system service and waits until the server is ready. That usually takes under a minute.

A terminal on home-server running sudo dnocs machine register: it confirms, creates the Linux user, installs the agent and prints that server 206 is ready

Sign in and pick the workspace as your normal user; sudo dnocs machine register then uses that sign-in. If it says please login first using 'dnocs auth login' although you signed in, update dnocs to the newest version, or sign in with sudo dnocs auth login -u <your username> first. sudo dnocs machine register --print-only prints the install script without running anything.

To get the one-line command of the website from a computer where you use dnocs, run dnocs server agent-install --name home-server. It prints the same command, valid once for 2 hours, to run on the machine.

The machine now appears on your Servers page with the status Ready and a Private badge, which means dPanel reaches it through its agent. Its address is its address on your own network.

The servers page listing home-server with a Private badge, status Ready, provider Private server, no public IP, and its local address

Windows (WSL2)

A Windows PC runs the agent inside Ubuntu on WSL2 (the Windows Subsystem for Linux), with systemd turned on. On Windows 10 (version 2004 or newer) or Windows 11:

  1. Open PowerShell as administrator and install Ubuntu:

    powershell
    wsl --install -d Ubuntu
    

    Restart if Windows asks, then open Ubuntu from the Start menu and create your Linux user and password.

  2. In the Ubuntu window, turn on systemd, which the agent needs:

    bash
    printf '[boot]\nsystemd=true\n' | sudo tee /etc/wsl.conf
    
  3. Back in PowerShell, restart WSL, then open Ubuntu again:

    powershell
    wsl --shutdown
    
  4. In dPanel, choose Windows PC on the card, get the install command and run it in the Ubuntu window.

Your server and its apps run only while the PC is on and awake and Ubuntu is running. For a server that stays online, use a VPS or a cloud server.

Why the agent is the default

  • Nothing connects in. The agent dials out to dPanel over HTTPS, like a browser does. Your router and firewall stay closed.
  • No keys to hand over. dPanel never needs your SSH access and never puts its SSH key on your machine.
  • You stay in control. You can read the install script first, stop the agent at any time, and delete the server in dPanel, which revokes the agent's access at once.

dPanel agent or SSH: which one?

dPanel can also connect to a server over SSH instead. Both are fully supported; the agent is the recommended default.

  • dPanel agent: nothing connects in to your server; the agent connects out to dPanel. You need no public IP, no open port and no dPanel SSH key, and you never give dPanel administrator (root) access over SSH. The trade-off: the work runs on your server. Besides the agent itself, which is light and always running, installing software or deploying an app uses an installer that the agent prepares on the machine (Python and Ansible, set up once, which takes a few minutes the first time). It runs the job on the machine and stops again after 10 quiet minutes. So installs and deploys use some of your server's CPU, memory and disk while they run.
  • SSH: dPanel puts its SSH key on your server for a user with administrator (sudo) rights and connects in from dPanel's own workers. Those workers do the heavy lifting of installing and configuring software from outside, so your server carries less load, which helps on a small VPS. The trade-off: you trust dPanel's SSH key with administrator access to your machine, and the server needs a public IP with SSH reachable from the internet.
dPanel agent (recommended)SSH
Where installs and deploys runOn your serverOn dPanel's workers, which connect to your server
Load on your serverA little more while a job runsLess
Access you give dPanelNone: the agent connects outdPanel's SSH key, with sudo rights
Public IP neededNoYes
Open port neededNoYes, SSH reachable from the internet
Best forHomelabs, PCs, servers behind a router, anyone who keeps SSH privateA small VPS with a public IP, if you prefer SSH

To connect over SSH instead, see Connect your own server over SSH. New cloud servers make the same choice in their How dPanel connects step; see Create a cloud server.

Step 2: Look around the server page

Open the server. It has the same tabs as any other server: live usage, modules, services, users, network, files, logs and settings. The details say how dPanel reaches it: Local address (its address on your own network), Connects from (the public address your network uses to reach the internet, or Unknown: the agent connects from a private network) and Connection: Through the dPanel agent (no public IP or SSH), instead of an SSH login.

The home-server page: live CPU, memory and disk usage, counts of applications, databases and modules, and details with Local address 172.17.0.2, Connects from, Connection through the dPanel agent and the agent version
The public address under Connects from is blurred here.

Step 3: Install a database or other software

Open the Modules tab and choose Add module. Pick from the same catalog as any other server: databases such as MariaDB, PostgreSQL or Redis, language runtimes, Docker and more.

The Add module catalog for home-server with MariaDB, PostgreSQL and Redis installed and Docker, k3s, MongoDB and others ready to install

The first install takes a few minutes longer, because the agent prepares dPanel's installer on the machine once. After that, each install starts right away.

You can also install from the machine's terminal, for example dnocs module install mariadb --server-id <id> --generate-secrets, which saves the generated admin password to a file only you can read.

The Modules tab of home-server listing Go, MariaDB, PostgreSQL and Redis as installed, with Open database on MariaDB and PostgreSQL

Step 4: Open a database in the browser

Choose Open database next to MariaDB or PostgreSQL. dPanel's database manager opens. Sign in with a database account, such as the admin account set when the database was installed.

The Open a database form for home-server: MariaDB on port 3306, a database user and database name, and the password field

Browse tables, run queries, and use Import and Export. Exports and imports run the database's own tools on your machine, through the agent. The database never has to be open to the internet or even to your network.

The database manager connected to the shop database on home-server, showing the products table with three rows

Step 5: Deploy an application

Create an application from your GitHub repository as usual (see Create an application). When you pick the server, servers connected with the agent show their local address and Private · through the agent.

The build and the deploy run on the machine itself. Apps listen on the machine, so on your own network you open them at the machine's address and the app's port, for example http://192.168.1.20:3000. To publish one on a domain, add a load balancer (below).

The goexample application page: Live, the current deployment on home-server, one server serving, the last build passed, port 3000

Step 6: Open a terminal

Choose Open terminal at the top of the server page. You get a root shell on the machine in your browser, relayed through the agent, with no SSH. From your computer, dnocs server exec --id <id> --command '<command>' runs a command the same way.

A browser terminal on home-server: curl to localhost returns the newly deployed page title, and the app and MariaDB services are active

What you can do with it

You canNot available
See CPU, memory and disk usageChanging SSH connection details (there are none)
Browse and edit files
Start, stop and restart services, read logs
Manage Linux users
Install modules such as MariaDB, PostgreSQL, Redis or Docker
Open MariaDB and PostgreSQL in the database manager, with import and export
Build and deploy applications
Open a terminal in the browser or with dnocs server exec
Add load balancers and domains
Join a Kubernetes cluster with servers on the same private network

Put a load balancer on it

You can add a load balancer to a server connected with the agent; it is set up through the agent like everything else. Visitors still have to reach the machine on ports 80 and 443:

  • A VPS with a public IP: nothing extra. A DNS record dPanel manages points at the server's public IP.
  • A home server or homelab PC: a DNS record dPanel manages points at your router's public IP. Forward ports 80 and 443 on your router to the machine, or the site cannot be reached and the load balancer cannot get its HTTPS certificate.
  • A domain you manage yourself: point it at the server's public address yourself.

If the server's Connects from reads Unknown, use your own domain and point it at the server yourself.

If the machine is off or offline when you start an install or a deploy, the job waits and then fails; start it again once the machine is back.

Share it with your team

A machine connected from your personal space is only yours. To give a team access, connect it into a team workspace or move it there: see Share a homelab with your team.

Keep the agent up to date

When a newer agent is released, the server page shows Agent update available with an Upgrade to button, and Agent stopped reporting when the machine has gone quiet. See Agent notices.

You can also reinstall the agent yourself: open the server's Settings tab and press Reinstall under Setup. On a server connected with the agent this reinstalls only the agent, from the latest release; nothing else on the machine changes. If the agent already runs the latest release, nothing is done, unless you tick Reinstall even if the agent is already current. The connection drops for a few seconds, and if the new agent cannot reach dPanel, the previous one comes back by itself within 3 minutes.

Connect it again

Running sudo dnocs machine register again on the same machine reconnects the same server in dPanel and gives its agent a new credential. A machine belongs to one workspace at a time. A command from Get install command always adds a new server; to repair the agent of a server you already have, use Reinstall (above).

Your personal space can connect up to 10 machines this way, and so can each team workspace. Cloud servers that dPanel creates for you don't count toward that limit, and neither do servers whose install never connected and failed.

Remove it

Delete the server in dPanel (from its page, or with dnocs server delete --id <id>). dPanel removes it at once, and the agent's access is revoked. If the machine is already gone, use Remove from dPanel; see Delete a server. Then stop the agent on the machine:

bash
sudo systemctl disable --now dpanel-agent

Frequently asked questions

Does my home server need a public IP or port forwarding?

No, not to be managed by dPanel. The agent only connects out. You need ports 80 and 443 forwarded only if you want to publish a website from it on the internet.

Can I use a Raspberry Pi?

Yes, a 64-bit (arm64) Linux with systemd, such as 64-bit Raspberry Pi OS or Ubuntu. Run uname -m on it: aarch64 is right, armv7l means a 32-bit system, which the agent can't run on.

The server says Waiting for agent. What does that mean?

dPanel has created the server and is waiting for you to run its install command on the machine. The command works for 2 hours. If nothing connects by then, the server shows Failed with a note that the install command was never run on the machine. Delete that server (a server whose command never ran can be deleted at once), then choose Get install command again and run the new command on the machine.

The command waits and the server never turns Ready. What do I check?

Read the last lines the command printed: it says what went wrong. The server page in dPanel shows the same reason. Then check on the machine:

bash
sudo systemctl status dpanel-agent
sudo journalctl -u dpanel-agent -n 50

The machine must reach dPanel and github.com over HTTPS (port 443). A company network, a proxy or a firewall that blocks outgoing HTTPS keeps the agent from connecting. Once the agent connects, the server turns Ready by itself, even after it showed Failed.

What does the server's error mean?

When a machine added with the install command does not connect, the server shows one of these:

  • The install command was never run on the machine. The command expired before anyone ran it. Get a new one and run it on the machine.
  • The install ran on the machine but stopped: followed by the reason. Fix it and run the command again (get a new one if it expired).
  • The dPanel Agent was installed but couldn't connect to dPanel. The agent is on the machine but can't reach dPanel; check its status and journal as above.
Reason shownWhat to do
The command was not run as rootRun it with sudo, or as root (su -) with the command that has no sudo
The machine does not run LinuxUse a Linux machine; on Windows see Windows (WSL2)
The machine does not run systemdUse a full Linux server or VM; on WSL2 turn on systemd; Docker containers and Alpine can't run the agent
The machine is not 64-bitInstall a 64-bit system (on a Raspberry Pi, the 64-bit Raspberry Pi OS)
A required tool is missingInstall curl, tar and sha256sum (package coreutils) with the system's package manager
The dPanel Agent could not be downloadedLet the machine reach github.com over HTTPS
The downloaded agent failed its integrity checkRun the command again; if it keeps failing, something on the network changes downloads
The owner's Linux user could not be createdCheck that useradd works on the machine and the disk is not full
The agent files could not be writtenFree disk space under /opt, then run the command again
The dpanel-agent service did not startRead sudo journalctl -u dpanel-agent -n 50
dPanel did not accept the install codeThe command expired or was already used: get a new one
The agent could not reach dPanelAllow outgoing HTTPS (port 443) to dPanel

Can I add a machine on my home network over SSH?

No. SSH joins need an address dPanel can reach from the internet, so local, private network (LAN, such as 192.168.x.x or 10.x.x.x) and example addresses are refused. Connect such a machine with the agent install command instead; it needs no public IP.