Passa al contenuto principale

Riottenere l'accesso a YunoHost

Ci possono essere diverse ragioni che possono portare al blocco parziale o totale degli accessi a amministratore ad un server YunoHost. Spesso però se un metodo di accesso è bloccato altri sono possibili.

Questa pagina cercherà di trovare il problema, riottenere l'accesso ed eventualmente riparare il vostro sistema. Le cause più comuni sono all'inizio per cui siete invitati a seguire questo tutorial dall'inizio.

Hai l'accesso al server usando l'indirizzo IP locale ma non dal nome di dominio

Se il server è self-hosted a casa: controlla il port forwarding

Controlla di riuscire ad accedere al server usando l'IP pubblico (lo puoi trovare su https://ip.yunohost.org). Se questo non funziona:

  • Make sure you have set up forwarding
  • Some ISP routers do not support hairpinning, which prevents you from reaching your server by its domain name from within your local network. If so, you can use one of the following workaround:
    • use a cellular connection (4/5G)
    • tweak your /etc/hosts file on each of your client devices
    • add YunoHost's local IP as DNS resovler in your router (usually in the DHCP section) and open port 53 (UDP) in YunoHost's firewall, making sure to not enable UPnP forwarding. (Do not open port 53 on your router)

Configura i record DNS

suggerimento

Questo non è un problema se stai usando un dominio fornito da nohost.me, noho.st or ynh.fr

Devi configurare i tuoi record DNS (come minimo i record A e AAAA se usi una connessione IPv6).

Puoi verificare la correttezza dei record DNS confrontando i risultati dati da questo servizio con l'IP restituito dal nostro servizio.

Altre probabili cause

  • You domain noho.st, nohost.me, or ynh.fr is unreachable following a failure on YunoHost's infrastructure. Check the forum for announcements or people posting about the same issue.
  • Your domain name may be expired. Check that on your registrar's client panel, or by using the command whois yourdomain.tld.
  • You have a dynamic IP address. In that case, you need to set up a script or a client that takes care of regularly update it. Refer to the page on DNS with a dynamic IP to see how. You can also use a domain nohost.me, noho.st or ynh.fr that includes this features.

Stai ricevendo un errore sul certificato che non ti permette di raggiungere la pagina di amministrazione

  • A certificate error may be displayed if you have made a typo in the address bar of your browser.

  • If you have just installed your server, or just installed a new domain, it uses a self-signed certificate. In that case, it is possible and understandable to add a temporary security exception so that you can install a Let's Encrypt certificate, provided you have a secure Internet connection.

Puoi accedere via SSH ma non dalla pagina di amministrazione o l'inverso

Stai provando a loggarti via SSH come root invece che con l'utente admin

Di default è possibile loggarsi via SSH solo come admin. È possibile loggarsi come root solo dall'interno della rete locale del server. Se il server è su una VPS la console web o VNC fornita dal provider DPS dovrebbe funzionare.

Se stai provando ad avviare i comandi yunohost dalla riga di comando come admin è necessario avviarlo preceduto dal comando sudo (ad esempio sudo yunohost user list). È possibile diventare root anche con il comando sudo su.

Sei stato bannato temporaneamente

Il tuo server YunoHost include il servizio Fail2Ban che banna automaticamente gli indirizzi IP che falliscono più volte di seguito. In alcuni casi possono essere programmi configurati con password vecchie (ad esempio client Nextcloud) oppure un utente che ha il tuo stesso IP.

Se sei stato bannato provando ad accedere ad una pagina web sarà irraggiungibile solo questa e potrai collegarti al tuo server via SSH. Viceversa se sei stato bannati da SSH la pagina di amministrazione funzionerà.

Se sei stato bannato sia da SSH che dalla pagina di amministrazione puoi provare a raggiungere il tuo server attraverso un altro indirizzo IP. Ad esempio puoi provare a collegarti usando la connessione cellulare del tuo telefono, attraverso una VPN, Tor o un altro proxy.

Vedi anche: togliere il ban ad un indirizzo

note

I ban normalmente durano dai 0 ai 12 minuti e solo su IPv4.

Il server web NGINX non funziona

Maybe the NGINX web server is out of order. You can check that trough SSH with the command yunohost service status nginx. If it is failing, check that its configuration is correct by running nginx -t. If it is indeed broken, it may be due to the installation or removal of a low-quality app... If you need support, ask for it.

The NGINX or SSH servers may have been killed due to a lack of storage space, RAM, or swap.

  • Try restarting the service with systemctl restart nginx.
  • You can check used storage with df -h. If one of your partitions is full, you need to identify what fills it and make room. You can use ncdu command (install it with apt install ncdu) to browse from the root directory: ncdu /
  • You can check RAM and swap usage with free -h. Depending on the result, it may be necessary to optimize your server to use less RAM (removal of heavy or unused apps...), add more RAM or add a swap file.

Your server is reachable by IPv6, but not IPv4, or inversely

You can check that by pinging it:

ping -4 yourdomain.tld # or its IPv4
ping -6 yourdomain.tld # or its IPv6

If one of the two is working, use it to connect by SSH or the webadmin.

If none are working, you need to resolv your connection issue. In some cases, an update of your router may have enabled IPv6 and DNS configuration may be disrupted.

Webadmin is working, but some web apps are returning 502 errors

It is highly probable that the underlying service for these apps is failing (e.g. PHP apps requiring php7.0-fpm or php7.3-fpm). You can then try to restart the services, and/or ask for help

You have lost your admin password, or the password is seemingly wrong

If you can reach the webadmin login page (force reload with CTRL + F5 to be sure), and you cannot log in, your password is probably wrong.

If yoy are sure of your passord, it may be due to the slapd service failing. If that's the case, log into the server by SSH as root.

  • If your server is at home, you most likely have access to the local network. From this network, you can follow the SSH instructions`.
  • If your server is a VPS, your provider may offer a web console.

Once logged in, you have to check the state of the service with yunohost service status slapd and/or reset your admin password with yunohost tools adminpw.

If this is still failing, on a VPS you may be able to reboot in rescue mode. Do not hesitate to ask for help

warning

To be completed

Your VPN expired or does not connect any more

If you have a VPN with fixed IP, maybe it has expired, or the provider's infrastructure is failing.

In that case, contact your VPN provider to renew it and update the parameters of the VPN Client app.

Meanwhile, try reaching your server if it is at home, by:

  • its local IP, using one of the method listed on the corresponding page
  • reaching it at yunohost.local, assuming your client supports the Bonjour protocol (or yunohost-2.local, etc. depending on how many YunoHost servers are on your network)
warning

To be completed

Your server does not boot

In some cases your server may be stuck at boot. It may come from a new, buggy, kernel. Try changing to another kernel on the boot screen (via VNC for VPS).

If you are in "rescue" mode with grub, it may be due a misconfiguration of grub, or a corrupted drive.

In that case, access the storage drive from another system (your provider's "rescue" mode, live USB drive, read the SD or drive on another computer) and try to check partitions integrity with smartctl, fsck, and mount.

If disks are corrupted or hard to mount, you have to save your data and maybe reformat, reinstall, and/or change the drive. If you succeed in mounting the drive, you can use systemd-nspawn to access its database.

Otherwise, run grub-update, grub-install again with chroot or with systemd-nspawn.

VNC or screen access does not work

It may be due hardware issue on your server, or with the hypervisor if it is on a VPS.

If you are renting your server, contact the support of your provider. Otherwise, try fixing your machine by replacing failing components.