Snap installation with no domain and self-signed certificate

I want to demonstrate NextCloud as a viable proof-of-concept for non-technical stakeholders. I am trying to install and deploy NextCloud as quickly and painlessly as possible; I installed via snap with an IP address (i.e. no domain name) and a self-signed certificate. I can’t access it through the browser.

Should I shutdown the snap deployment and deploy conventionally (i.e. install/configure each LAMP component and then install NextCloud) or is there something else I can do to tweak my snap deployment?

I used this guide.

I have NextCloud running (I think). I was able to get the following output from snap:

$ sudo snap services
Service                   Startup  Current
nextcloud.apache          enabled  active
nextcloud.mdns-publisher  enabled  active
nextcloud.mysql           enabled  active
nextcloud.nextcloud-cron  enabled  active
nextcloud.php-fpm         enabled  active
nextcloud.redis-server    enabled  active
nextcloud.renew-certs     enabled  active



curl -s | /bin/bash
ansible-pull --clean --force -d ~/nextcloud15 -i 'nextcloud' -U nextcloud.yml \
-e "fqdn=$(hostname -f)" \
-e "ssl_certificate_type=selfsigned" \
-e "talk_install=false" \
-e "install_onlyoffice=false" \
-e "install_collabora=false" \
-e "dhparam_numbits=1024"

@Reiner_Nippes: I’m running Ubuntu 18.04.1. I’m getting an error where the script, ./ is trying to install pip. The pip installation script thinks the system has Python 3, but /usr/bin/python is Python 2. I’ve done some googling; I’ve installed Python 3 but that hasn’t changed the version of the above python runtime. What are some things I can do?

software-properties-common is already the newest version (
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ PYTHON_BIN=/usr/bin/python
+ install_pip
+ sudo -H /usr/bin/python
+ curl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1622k  100 1622k    0     0  7915k      0 --:--:-- --:--:-- --:--:-- 7877k
Traceback (most recent call last):
  File "<stdin>", line 20890, in <module>
  File "<stdin>", line 197, in main
  File "<stdin>", line 82, in bootstrap
  File "/tmp/tmpO_1u4F/", line 19, in <module>
  File "/tmp/tmpO_1u4F/", line 8, in <module>
  File "/tmp/tmpO_1u4F/", line 11, in <module>
  File "/tmp/tmpO_1u4F/", line 2, in <module>
  File "/tmp/tmpO_1u4F/", line 203, in load_module
  File "/tmp/tmpO_1u4F/", line 115, in _resolve
  File "/tmp/tmpO_1u4F/", line 82, in _import_module
ImportError: No module named httplib


I had to do a couple things for the installation script to work:

  • First I changed the path to PYTHON_BIN to /usr/bin/python3.
  • Then I installed sudo apt install python3-distutils.

I don’t know if that makes a difference to change the script. Also, you’ve got a number of minor typos. Do a search for ‘Sytem’ in your script.

Just FYI for anyone following this thread, I gave up and just did a traditional LAMP stack installation and configuration. It was actually more straight-forward for me because I understand those technologies versus trying to troubleshoot Snap or Docker.

which edition? server or desktop?

I’m pretty sure it’s the server edition, since it was the default install from my VPS provider; it doesn’t make sense for them to install the desktop edition…

I tested the script on AWS EC2, DigitalOcean, Scaleway, VirtualBox Ubuntu 18.04.
So it’s hard for me to tell what’s missing in the Ubuntu distro of your provider. Sorry.