LuoboyunNo wish to host? New users get 1 GB of trial traffic for 24 hoursWorks with Clash / Mihomo; pay by Alipay, WeChat or cryptoTry 1 GB freeAdLuoboyun: 1 GB of trial trafficValid 24 hours; Alipay, WeChat, cryptoTry 1 GB freeAd
hi-ddify.org
A berth holds one ship at a time

Installing

Port 443 is taken. What now

A berth holds one ship at a time Downtowngal, CC BY-SA 4.0

If Nginx, a hosting panel or another proxy already sits on the server, they fight for 80 and 443. Who holds them, and why not to mix.

A port belongs to one program at a time. Hiddify Manager needs 80 and 443, and beside an existing website at least one of them will not open.

Why 443? It is the port of the web, open almost everywhere and the least conspicuous. Port 80 is needed because the certificate issuer checks from there that the domain is yours. Without either, other errors follow.

Who has it

Server
ss -tulpn | grep -E ':(80|443) '

The last column names the program.

You seeIt is
nginx, apache2A web server
docker-proxyA container with that port
xray, sing-box, x-uiAnother proxy panel
caddyA web server with automatic certificates
A taken parking space: if something holds 443, the new service cannot park
A taken parking space: if something holds 443, the new service cannot park John Robert McPherson, CC BY-SA 4.0

Three ways out

  1. Another machinesimplest, a few dollars
  2. Move the websitestatic hosting, often free
  3. Website on another portwith a CDN in front
Least trouble first

The docs are plain: install only on a dedicated server; it changes settings and breaks other sites or panels on the same one.

Coming from another panel

Users can be imported from X-UI. Export there, stop and remove the old panel, restart, see that 443 is free, then install.

Ports on a switch: first find out who holds the port
Ports on a switch: first find out who holds the port Bkvrova, CC BY-SA 4.0

Found out too late

Do not delete in haste:

  1. Download a backup from the panel.
  2. Stop the other program, for example systemctl disable --now nginx.
  3. Run hiddify restart, then hiddify status.

What it looks like

The installer does not always say that a port is taken. Instead:

The log of that service ends with Address already in use:

Server
journalctl -u hiddify-haproxy -n 30 --no-pager

Usual neighbours

A hosting panel keeps its nginx alive and starts it again. Use another machine.

A website in Docker: docker ps shows 0.0.0.0:443->443/tcp. Map it to another port.

An earlier panel not fully removed:

Server
systemctl list-unit-files | grep -E "xray|v2ray|trojan|x-ui|sing-box|hysteria"

Apache from the image: apt purge apache2 -y.

If they must share

Move the website to another port and reach it through a CDN, which can fetch from 8443 or 2053 while visitors see ordinary https.

  1. The website listens on 8443Same certificate
  2. A rule in the CDNThis domain to 8443
  3. Install Hiddify Manager80 and 443 are free
  4. Certificates for the siteBy DNS from now on
The smallest change

Cleaning up a mess

Fastest is not repairing piece by piece but: back up, reinstall the system, install the panel, restore. Half an hour. Without a backup, write down users and dates first.

One minute before installing

No output means free
ss -tulpn | grep -E ':(80|443) '

In the host's firewall open TCP 80 and 443 and UDP 443, which Hysteria2 uses.

Can I use other ports?

Configs may use more ports, but certificates and subscription pages still need 80 and 443.

Only 80 is taken. Is that all right?

No, automatic certificates use 80.

nginx came back after a reboot?

Use systemctl disable --now, not only stop.

What if UDP 443 is taken?

Only nodes over UDP fail. See ss -ulpn.

Is 80 needed later?

Yes, for renewals every two or three months.

Two more to read

DomainsDirect or behind a CDNDirect is fast and shows the IP, a CDN is steadier and takes a detour. One table, and how to have both with Direct for everyday.FixingThe panel's link is goneForgotten address or password, or a link that will not open: the commands to recover it, by whether you can still log in to the server.

While you are here

About: port 443 already in use, Hiddify and Nginx conflict, Hiddify port 443