Hey y’all! First time trying to self-host something, I started with a local Nextcloud instance for me and my family to use. I just wanted to make sure that no outsiders can enter the instance (access it or its files) through a browser on another connection.

I don’t have a DNS server so we access it through its IP address. The connection is unencrypted (I don’t know if this is a problem on a local instance, but from what I’ve read, I need a local DNS server to encrypt it, as well as to be able to set a domain (?) name (I don’t really know if it’s a domain name, but I’m referring to the website name, for instance google.com). I don’t think leaving it as it is (unencrypted, no domain name, only accessible through IP) will be problematic. Could other people access the server remotely with this setting? By remotely, I mean from far away. I tried out Nextcloud’s own Security Scan and it returns:

Scan failed! The scan for the specified domain failed. Either no Nextcloud or ownCloud can be found there or you tried to scan too many servers.

I’m guessing this is a good thing for what I’m trying to achieve?

for reference, the tutorial I’ve used is this one under Linux Mint

  • CondorWonder@lemmy.ca
    link
    fedilink
    English
    arrow-up
    20
    ·
    1 year ago

    In general, if you haven’t taken steps to expose your service to the Internet, it’s not accessible over or to the internet. Your router that connects you to the Internet should have a firewall that blocks all inbound, unsolicited requests, and you also need to do something explicit with most self hosted service to expose them, they will not announce themselves to the world.

    In addition if you’re using an ipv4 network address that’s likely a private address (like 10.x.y.z, 172.x.y.z, or 192.168.x.y), which also isn’t accessible outside of your network.

  • cecilkorik@lemmy.ca
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    There’s going to be a bunch of caveats here, but basically…

    Assuming you’re using a NAT router to connect to the internet (basically everyone is nowadays): If you’re using a local LAN IP address (10..., 192.168.., or 172.[16-32]..*) then nobody on the internet can access any services on that IP, unless you specifically port forward it through your router. Assuming there’s nobody dangerous on your local network (and nobody gets a remote-access virus) and your router itself is not hackable then yes it’s entirely safe.

    You don’t technically need a public domain name to set up an SSL certificate, but to smoothly streamline the process in a way that modern software trusts it, you do. A self-signed certificate can be created for any IP address and it will provide full encryption and avoid interception of traffic between established clients, but you will get a scary warning that the certificate is self-signed every time you connect a new client or browser, because it cannot be verified. It still works though, it’s just (intentionally) scary, because it doesn’t know what you’re doing with it and it doesn’t know how to establish trust. You probably don’t need this, but it is an option. Setting up a self-signed certificate will have various degrees of complexity in documentation depending on what web server you’re using, I would recommend using the simplest guide you can find for the relevant web server if you choose to go that route, you don’t need anything complex for this. The keywords you’re looking for are “self-signed certificate”

    Welcome to self-hosting. Nextcloud is a great thing to self-host, too. Hope you enjoy.

    • cmnybo@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      If you add the CA for the self signed certificate to all of your devices, they will trust it and the warning will go away.

    • Qvest@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Oh, we’re enjoying it alright! Ever since Apple announced that they would kill off a service that we were using (basically to sync files between different computers and TVs) and replace it with iCloud (for which we would have to pay a lot). It was a pain trying to set it up but eventually I got it working. Very impressed at how well it does its thing.

  • Morethanevil@lmy.mymte.de
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    If you use private IP adresses, then no traffic will leave your internal network. Those IPs are not routed trough the Internet 😊

    So no one can access your nextcloud outside your network

  • CAPSLOCKFTW@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Since your other question is already answered:

    think leaving it as it is (unencrypted, no domain name, only accessible through IP) will be problematic.

    Yes, that’s no biggy since it is on your local network only. But be aware that everyone that has access to your network could potentionally capture all the files you’re transfering and your nextcloud credentials as well. Other than that, your communication with nc will be encrypted on the wifi layer.

  • passepartout@feddit.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    It sounds like you are accessing it only from your local network, and as long as it stays that way its fine. I have a DNS Server at home, set up a domain name, therefor have certificates from letsencrypt which get automatically renewed for https access, AND STILL I only access it from my local network with no ports open to the www.

    If you have your instance openend up to the internet (e.g. by port forwarding from your ISPs router to your nextcloud instance) and have no encryption / no certificate, thats a major flaw and i would advise you to shut it down immediately and close the port.