TL,DR: beginner tries to set up NextCloud via docker components without having a domain. Trying to access via IP doesn’t work. Probably made a few mistakes/missed some important stuff along the way

Hi everyone,

I am completely new to self hosting. Like many others I want to move away from Google, Apple, Microsoft… for my Calendar, Tasks and Contacts, and I thought I would try self hosting all that in NextCloud. I have already tried a 3rd-party hosted NextCloud instance and I feel comfortable with it, so now I want to do the next step and host it myself on a RaspBerry Pi 4 (4GB) that I recently purchased.

I have read around and searched for tutorials, and although I am still a bit lost I decided I would start working on it and see what problems I find along the way, and learn from this. Once I’m done I hope to have learned properly, and I plan to wipe everything and do it again, this time knowing better what I’m doing.

So, to begin with I decided to do it using Docker Compose, as I’ve read it makes setup and troubleshooting easier. I found 2 tutorials that looked good to me: tutorial 1 and tutorial 2, but going through them I see the most frequent case they require that I have my own domain (tutorial 1 has only that option, tutorial 2 offers that option or using an IP address). Do I need to have my own domain to have NextCloud calendar, tasks and contacts shared between my computer and my smartphone? If both options are possible, is one of them more secure than the other? is there some strong reason to avoid one of them?

Since I don’t have a domain (I’m completely new to this), I opted to try tutorial 2 with IP address, but I got stuck in the end, where I am supposed to access my NextCloud Web Interface. Tutorial 2 suggests getting my Raspberry Pi IP address with hostname -I (step 17), but this way I get five different IP addresses (4 IPv4 and one IPv6), not just one. When I try any of those IPs on a browser (step 18) none of them work. I guess I am missing something basic here, so I’d be grateful if someone can point me in the right direction.

Searching for an answer I found a comment on reddit saying that I can skip getting a domain and host locally (no domain) and set up a VPN.

Would it be necessary in my case to get a domain? If I skip the domain, what steps am I missing to be able to access my current NextCloud docker installation? What mistakes have I made so far, and what resources can I use to learn about what I’m missing? Do you have any other tips for an absolute beginner (who is comfortable around the linux command line)?

  • socphoenix@midwest.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 months ago

    We can get the port list another way. From the terminal on the raspberry pi run the command “nmap localhost”. Let us know what that shows, but I would expect to see either 80, 443, or both.

    As a side note, if you did not give the nextcloud container a certificate when you made it, you cannot use https:// on the browser, as it has no way to talk using that security mechanism. It is only capable in that case of using http:// and port 80. You will need to disable forced https to access the site (this is fine on the local network if every device is trusted, and only encrypted vpn service in like zerotier is used imo). This might be your problem here, especially if you are seeing both ports listed as open on the pi.

    • nshibj@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 months ago

      Thank you for this new tip, I think we found the problem: ports 80 and 443 are not open. After I installed nmap (which was surprisingly not present in my Raspbian installation), the output of nmap localhost reads:

      Not shown: 997 closed ports
      PORT    STATE SERVICE
      22/tcp  open  ssh
      53/tcp  open  domain
      631/tcp open  ipp
      

      I guess I did something wrong when following the tutorial (or the tutorial had some mistake, but I’d me more inclined to think the mistake was mine). I will try to clear this installation on docker and start all over again, then I will check nmap localhost again to see if it works fine then.

      Thank you very much for your support. I still feel quite lost, but I finally found out why this is not working and I can repeat the steps and pay special attention… or look for a different method (someone here suggested using Nextcloud All-In-One).

      • socphoenix@midwest.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 months ago

        Glad we got to the root issue! As others have said this is a learning process and you picked one of the more complicated ones to start with. Once this is done e everything else will start to feel much easier!