Nextcloud + CODE, tuna-style

Docker image for Collabora’s CODE for for developers and home users: Docker

I am trying to figure out what the steps are.

new $5/mo digitalocean droplet
firewall on the digitalocean droplet
use the script to automate creating a user and stuff on the digitalocean droplet
redo nextcloud.judytuna.com settings on gandi dns
redo Let’s Encrypt

looking for examples

https://www.reddit.com/r/selfhosted/comments/8lx3lj/setting_up_nextcloud_via_docker_on_vps/dzkw151/

—>

https://github.com/nextcloud/docker/tree/master/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm

later

uh, maybe i can use this “univention” image: Collabora Online Development Edition with Nextcloud

What the hell is .qcow2 ? What is KVM? Oh dear. https://www.linux-kvm.org/page/Qcow2

using custom images on digitalocean: Bring Your Custom Image to DigitalOcean says it can use a .qcow2 image file! hahahaha???

1 Like

did you pick some number of gigabytes for your Space, @maiki? Or did you use the 100gig Space for $10/mo?

using Docker to set up both Nextcloud and Collabora/CODE, talking to mariadb, behind a reverse proxy(?) and with another container handling Let’s Encrypt (or something?) might be too hard for me, but I’m still reading guides!

in the meantime I’m distracting myself with this “custom image” … i just want to see what happens (and how much money it will cost to download the image from Univention to DigitalOcean. i have watched the “monthly usage” fee go up by 35 cents so far).

There is Block Storage, which is a mountable drive. Spaces is object storage, and is accessed via api. I use spaces, so I don’t have to know how much I’m using, or pay for drive space I have used yet.

I think I pay a minimum, but I have maybe 20 Spaces, and pay less than $5 total for using it.

Replying on phone now, but later I’ll explain more. :slight_smile:

I imported the KVM image found at Collabora Online Development Edition with Nextcloud Univention into digitalocean as a “custom image” and then created a droplet from it. It had to be a $10/mo one because it’s a 50gb image.

It’s running, but I don’t know what it is or how to use it, really. Apparently it … has a portal … from which I can access Nextcloud… and I can log in as an admin to both the portal and to the Nextcloud instance… but how do I access Collabora/CODE? I am very confused by what this is. 165.227.61.231

The webpage at https://nextcloud.judytuna.com/loleaflet/2fc9aba/loleaflet.html?WOPISrc=https%3A%2F%2F165.227.61.231%2Fnextcloud%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F290_ocf3uqv9cunc&title=New%20Document.odt&lang=en-en&closebutton=1&revisionhistory=1 might be temporarily down or it may have moved permanently to a new web address.

haha. that’s… something! i think i totally screwed up the domain name stuff. it’s trying to use its own A names and it is confused. but not as confused as i am!

Since I have no idea what that Univention portal does, I turned it off and started over.

  1. :white_check_mark: new $5/mo droplet
  2. :white_check_mark: initial setup: haha i had it email me a new root password using the web gui, logged in, changed pw, ran the automatic script to create a new user, changed pw again
  3. :white_check_mark: made the new A name DNS record change on gandi
  4. :white_check_mark: began instructions from this reddit post, like …
  • :white_check_mark: git clone https://github.com/nextcloud/docker
  • :white_check_mark: mv docker/.examples/docker-compose/with-nginx-proxy/mariadb/apache/ ./nextcloud-letsencrypt
  • :white_check_mark: cd nextcloud-letsencrypt/ and vi docker-compose.yml
  • :white_check_mark: Find where it says “VIRTUAL_HOST=” and set it to the domain you’re using
  • :white_check_mark: Enter the same domain for LETSENCRYPT_HOST
  • :white_check_mark: Enter a valid email for LETSENCRYPT_EMAIL
  • :white_check_mark: Set MYSQL_ROOT_PASSWORD to a secure password
  • :white_check_mark: vi db.env
  • :white_check_mark: Choose another secure password for MYSQL_PASSWORD
  • :red_circle: how do i change the Dockerfile to do the right thing and install libreoffice?
  1. i tried docker-compose build --pull but it said docker-compose could not be found, can be installed with sudo snap install docker so i did that

okay it is telling me VirtualBox is not installed

I am going to trash this and start over AGAIN with the docker image

  1. destroy the old droplets haha
  2. new $5/mo droplet with the Docker image from the marketplace with password via email
  3. logged in as root via the web console and changed pw
  4. made the A name change on gandi again
  5. ok trying this all again
git clone https://github.com/nextcloud/docker
mv docker/.examples/docker-compose/with-nginx-proxy/mariadb/apache/ ./nextcloud-letsencrypt
cd nextcloud-letsencrypt/
vi docker-compose.yml

:white_check_mark: Find where it says “VIRTUAL_HOST=” and set it to the domain you’re using
:white_check_mark: Enter the same domain for LETSENCRYPT_HOST
:white_check_mark: Enter a valid email for LETSENCRYPT_EMAIL
:white_check_mark: Set MYSQL_ROOT_PASSWORD to a secure password

vi db.env

:white_check_mark: Choose another secure password for MYSQL_PASSWORD
:red_circle: how do i change the Dockerfile to do the right thing and install libreoffice? i still don’t know the answer to this question and i’m ignoring it. i think i don’t want it int he Dockerfile actually. Because I just want normal the normal Nextcloud docker. Or something.

  1. ok trying docker-compose build --pull now
    ooh it’s doing stuff

  2. ok trying docker-compose up -d
    cool now it’s doing more stuff, like pulling mariadb and a lot of other stuff
    wow
    this is cool
    okay now pulling from library/nextcloud
    ok creating all those things
    okay

  3. oh my god it works. https://nextcloud.judytuna.com/

okay next i am looking at Collabora Online Office – Nextcloud

  1. uhhhhhhhhh do i need ANOTHER DROPLET to run the collabora server? what the hell am i doing? uuuuggggghhhhh i don’t know
    okay i have watched the video on that site, the direct link is https://youtu.be/MDc1bNxn3js , and no, you don’t need another server. you just need to do apache reverse proxy stuff to make it so that one domain goes to your collabora online (in his example, it’s office.blabla.com) server, and your normal domain that goes to your nextcloud (in his example, it’s cloud.blabla.com).

  2. i am not prepared to mess this much with apache. i am going to give up for now and play underlords. bye!

  3. okay just kidding

https://medium.com/@jmarhee/running-multiple-web-applications-on-a-docker-host-with-apache-85f673f02803

uhhhh

i made a new droplet for funz because i didn’t figure out apache virtualhosts yet haha

but now i’m trying to figure out vhosts anyway because right now my apache2 is not serving the docker container

OKAY i can’t figure out how to get apache2 to send along traffic to the docker container which is hanging out on localhost:9980

It may be the case that you can rub multiple containers on a single host, but I’m betting it isn’t worth the cost of a single host to make CODE and Nextcloud play well together; maybe for a single user.

I think a CODE server can technically serve back end for multiple Nextcloud integrations. Given that, it might be better to have two VPS.

Anyhow, ganbatte!

thanks!

i haven’t seen any documentation supporting the theory that a collabora/code server can serve multiple nextcloud integrations; it seems to be the case that you must specify your nextcloud server when you start up the collabora/code server.

i am reading Apache Virtual Host documentation - Apache HTTP Server Version 2.4

i am thinking that i am going to delete the second VPS and try to figure out virtual hosts on apache! however i don’;t know how this is going to break my Let’s Encrypt certs for office.judytuna.com on that second VPS. i guess i can throw them away and redo them?

Yep, and at your rate I’m sure your fine, though I’d probably try this on a test domain just in case. Being able to replicate the process is kinda of the goal, ne? :slight_smile: