Accessing remotely

Hi everyone!
I installed DietPi on my RPi 4.
I need to access my RPi remotely.
I made some tentatives but I was not able to access it.
Can you help me by suggesting how can I do it?

Do you want to connect via SSH or what is your plan? VNC?

I access locally via SSH.
I need to access remotely via HTTP/HTTPS.

Then you can have a look into dietpi-dashboard or webmin.
I you need to use port 80/443 i’m not shure if you can setup a reverse proy with the dashboard.

If SSH access would be enough you can setup a VPN server with e.g. wireguard on you Pi, forward that port and just connect via VPN so you can do all the stuff like you’re in your LAN.

I see diet-dashboard and I cannot reach that page outside the LAN.
I am trying to install pivpn to check it.
As I said I want to reach some webpages like for example nextcloud by reaching them outside of my LAN.
I hope it will be possible via VPN.

There is no need to use the Dashboard. Simple forward port HTTP 80 and HTTPS 443 on your router to your DietPi device.

You can use following as startig point How can I secure connection to nextcloud? - #4 by Joulinar

Thank you.
I will try,
However, I am looking for a general solution to connect to dietpi server and not only nextcloud.

NC was just an example. Similar can be done for other apps which are reachable via HTTP. If you give some examples, which apps are in question, we could probably assist.

Ok. Tks

I have a static IP address, so I should not need a DDNS service.
I have to investigate how to configure the router.

Without domain name, you will not be able to generate SSL certificates to activate HTTPS.

I have both domain name and a static IP.
How can I configure DietPi with them?

On the linked post above everything is explained in detail. Simply adjust on your needs.