How we protect DirectAdmin: login, forgotten password and the API
DirectAdmin is the control panel of your hosting package. Because you can do everything with it, we give it extra protection. DirectAdmin itself runs on port 1968, and that port is closed to everyone. The familiar address with port 2222 shows a secure WebOké login page. Only after you log in successfully there does port 1968 open, and then only for your IP address. Hardly anything changes for you: you log in with the same details at the address with the server name.
1. Logging in at https://servername:2222
At the familiar address https://servername:2222 you'll see a login page that looks like the DirectAdmin login screen, in the same languages and with a light or dark theme. You can find your server name in My WebOké with your package under Manage. Always use the server name and not your own domain name: the security certificate on port 2222 belongs to the server name. With https://example.com:2222 you'll get a certificate warning.
- Enter your DA username and your DA password.
- Have you enabled two-factor authentication (2FA) in DirectAdmin? Then also enter the code from your authenticator app.
- If your details are correct, you're logged straight into DirectAdmin. The address bar will then show https://servername:1968.
After a successful login, port 1968 stays open for 24 hours, only for the IP address you logged in from. Anyone else, including someone on a different IP address, can't see port 1968. After 24 hours, or from a different internet connection, simply log in again via port 2222.
2. Logging in from My WebOké
Logging in with the Log in to DirectAdmin button in My WebOké works just as it always has. You don't need to enter a password and you go straight to the right server. Because you're already logged in with us, we open port 1968 for your IP address for 24 hours when you click it.
3. Forgotten password
On the login page, click Forgot password and enter your DA username. You'll then receive a link to choose a new password.
- The link is sent to the email address in your DirectAdmin account.
- The link is valid for 1 hour and only works once.
- This doesn't work for administrator accounts (admin).
You can also set a new DA password from My WebOké, see How do I change the password of the DirectAdmin control panel?
4. Scripts and integrations (the DirectAdmin API)
Do you use the DirectAdmin API, for example for a DDNS updater, Home Assistant, a script that fetches certificates, Docker or Traefik, or file management via the API? That will keep working as usual. You don't need to change anything.
- In your script, use the address https://servername:2222, with the server name from My WebOké, for example
https://linux20xx.webawere.nl:2222. - Not your own domain name. Does your script contain
https://example.com:2222? Replace it with the server name. The security certificate on port 2222 belongs to the server name. With your own domain name, your script will refuse the connection with a certificate error (SSL/TLS error). - Never use port 1968 in scripts: it's closed, except for the IP address someone has just logged in from.
- Your script logs in as usual with Basic authentication: your DA username with your password or a login key.
- We first check whether the details are correct. Only then is the request passed on to DirectAdmin. Requests with incorrect details never reach DirectAdmin.
- A login key that's restricted to certain IP addresses keeps working. DirectAdmin sees the real IP address of your script.
Frequently asked questions
Do I need to change anything?
Usually not. You log in with the same details and the button in My WebOké works as always. Do you use your own domain name with :2222 in a script or bookmark? Then replace it with the server name.
My script suddenly returns 401.
A 401 means the username, password or login key is incorrect. Check whether your password was changed recently, whether the key still exists and hasn't expired, and whether you're using the DA username (not your email address or domain name).
My script returns a certificate error or SSL error.
Your script probably contains your own domain name, such as https://example.com:2222. Replace it with the server name, such as https://linux20xx.webawere.nl:2222. You can find your server name in My WebOké with your package under Manage. Don't disable certificate verification in your script: that would allow someone to intercept your password along the way.
I'm getting 429.
Too many login attempts with incorrect details were made from your IP address. The block lifts automatically after 15 minutes. Correct the details first, otherwise it will start again.
I have to log in again on port 2222 every day.
That's right: after a login, port 1968 stays open for your IP address for 24 hours. After that, you log in again. With the button in My WebOké, that takes just one click.
My bookmark to port 1968 doesn't work.
Port 1968 is only open for your IP address within 24 hours of a login. Go to https://servername:2222, log in, and bookmark that page.
I'm not receiving an email after Forgot password.
The link is sent to the email address in your DirectAdmin account. Also check your spam folder. If that doesn't work, set a new DA password via My WebOké.
DirectAdmin won't open at all.
Check Am I blocked? and go through the steps in How do I access the control panel (DirectAdmin) of my hosting package?
Detailed explanation with screenshots: Logging in directly on port 2222 and Login Keys: logging in for scripts and programs in the DirectAdmin manual.
See also: Using the DirectAdmin API and Am I blocked? Your IP address and our firewall.
