How we protect DirectAdmin: logging in, forgotten passwords and the API
DirectAdmin is the control panel of your hosting package. Because it gives you access to everything, we add extra security to it. DirectAdmin itself runs on port 1968, and that port is closed to everyone. The familiar address with port 2222 now has a secure login page from WebOké. Only after you log in successfully there does port 1968 open, and only for your IP address. For you, hardly anything changes: you log in at the same address, with the same credentials.
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.
- 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 credentials 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 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 like always. 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. Forgot your 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 works only 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.
- The address stays https://servername:2222. 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 always with Basic authentication: your DA username with your password or a login key.
- We first check whether the credentials are correct. Only then is the request passed on to DirectAdmin. Requests with incorrect credentials never reach DirectAdmin.
- A login key that is 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?
No. You log in at the same address with the same credentials, the button in My WebOké works as always and your scripts and integrations keep working.
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).
I'm getting 429.
There have been too many login attempts with incorrect credentials from your IP address. The block is lifted automatically after 15 minutes. Correct the credentials first, otherwise it will start all over 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 when using 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.
Then 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.
