Can i using SSL without domain? What about other app on server?

I want to install nextcloud and also other app like openvpn . Can i use this with ssl but withoud custom domain?
How to install it correctly ? Need i setup port forwarding ?

Yes, you can use a self-signed certificate.

TCP 80 and 443.

Okay, but how do I install another application now? How do I redirect ports ? Like openvpn ?

These are basic OS related questions and are out of scope of the Nwytcloud support forum. Please ask aunt G. for information how to install these apps:

https://www.google.com/search?q=linux+install+openvpn&oq=linux+install+openvpn

Not base because I’ve already had a problem last time. I installed openvpn first, then nextcloud. I changed your ports to 81 and 444.
like here

sudo snap set nextcloud ports.http=81 ports.https=444

but the script has stopped on the message “waitng for php…”

I think you do not use port forwarding because with vpn you are in your local network. But with vpn you can not share files and folders to other people.

I don’t understand , nextcloud is basically a separate snap container so what’s the problem?

Sorry. My fault.

at last u tryed

But what is the point?

  1. You want to set OpenVPN Server, and make Local Nextcloud only accessible via OpenVPN connetcion without any access from internet?
  2. Or you want to install OpenVPN Server and Nextcloud and make both accessible via Internet to the world?

Exactly. I want myadress.com/admin to be able to connect to openvpn settings (i.e. main ports 80 and 443) but I also want to log into myadress.com/nextcloud panel on the same server (ip) (and now I don’t know if I have to set the ports to connect like that “myadress.com:500/nextcloud” - if so, how to do it?

What do you use as OpenVPN web Frontend?

Basically you can open only 443 and 80 Ports for this tast. Then you have 2 ways:

  1. As you mentioned to access myadress.com/admin and myadress.com/nextcloud you have to create 1 Virtual Host under Apache2 and configure 2 directories, aliases, or proxy pass to your nextcloud and openvpn Settings fronted.
    In this case you will create e.g. http --> Port 80/443 on Apache2 --> OpenVPN (some other Port) or Nextcloud as directory.

  2. You can register more domains e.g. cloud.myadress.com and openvpn.myadress.com and create Virtual host for each of them.

Here you can find few examples VirtualHost Examples - Apache HTTP Server Version 2.4

As mentioned here you can create config for Nexctloud e.g. under /etc/apache2/sites-enabled/nextcloud.conf and enable it.

1 Like

I’m about to start reading, but I’ll ask first. Can Træfik-style tools be helpful here?

Sure, it makes all easier. But I did not try it jet.

And yet, this advice is about standard installation and what if I use a snap ?

If you need to do a non-standard setup, then I would recommend against using the snap package as it can be somewhat inflexible.