How To Deploy Nextcloud AIO with Object Storage

Why Self-Host Nextcloud?

The phrase “de-google-ify” or de-iCloud-ify gets me genuinely excited because data sovereignty feels more critical than ever in 2025. While tech giants increasingly monetize our personal information and change terms of service at will, NextCloud offers a compelling alternative, being an open-source, self-hosted collaboration platform.

I’ve fully embraced NextCloud’s ecosystem, automatically syncing my camera roll and contacts while using NextCloud Notes as my primary note-taking app. The mobile app isn’t perfect but generally backs up photos, videos, and contacts to my own storage server, which I also share with family. For lighter project management, NextCloud Deck works well, though it’s not quite a full Jira replacement.

My setup runs on object storage because it’s scalable, affordable, performant, and easy to backup. The peace of mind knowing my data isn’t being analyzed for ad targeting or subject to sudden policy changes makes the initial setup effort worthwhile. In an era where our digital lives are increasingly surveilled and commoditized, self-hosting is just good digital hygiene.

Deployment Processes

First provision a fresh Linode VPS and place it behind a Cloud Firewall to further reduce the attack surface. You should only open TCP Ports 80, 443, 8080, and 8443. You will also need to open UDP Port 443 to enable HTTP3 on the web server.

Go ahead and deploy your A/AAAA DNS Records since propagation time can vary.

sudo apt update && sudo apt upgrade -y
sudo apt install s3fs -y
sudo mkdir /mnt/MyBucket
sudo timedatectl set-timezone America/Denver
sudo hostnamectl set-hostname YOUR_HOSTNAME

Follow Dockers official docs to uninstall and purge outdated packages and their respective config files. Then you will get a fresh, clean container environment setup.

Docker - Ubuntu Install

Once you have Docker installed I advise you create a Limited Sudo User to complete this setup and execute the NextCloud launch parameters.

sudo useradd -m MY_NEW_USER
sudo usermod -aG sudo MY_NEW_USER
sudo usermod -aG docker MY_NEW_USER
sudo passwd MY_NEW_USER

At this point, go ahead and append your IPv4 and IPv6 addresses and FQDN to the host file. Then harden the system to meet your requirements.

Now we will create an Object Storage Bucket on the Akamai Cloud Manager interface. Then generate an Access Key & Secret Key pair with Read/Write permissions for the new specific bucket.

Run the following bash command to append the Access Key and Secret Key into /var/.passwd-s3fs. This will be the file called by fstab during boot up to auto-magically mount the Object Storage on system startup.

echo "ACCESS_KEY:SECRET_KEY" | sudo tee /var/.passwd-s3fs > /dev/null
sudo chmod 600 /var/.passwd-s3fs

Append the following /etc/fstab/ to allow the Object Storage to mount on system startup. If you are not using Akamai/Linode then you may need to make adjustments.

<bucket_name> /mnt/MyBucket fuse.s3fs _netdev,allow_other,use_path_request_style,url=https://your-region.linodeobjects.com,passwd_file=/var/.passwd-s3fs 0 0

Now go ahead and reboot your VPS. When you log back in, you should see that /mnt/MyBucket is mounted!

Initial Launch Party

Here are my deployment parameters… I define a small number of default values for the sake of easier adjustments in the future.

sudo docker run --init --sig-proxy=false --name nextcloud-aio-mastercontainer --restart always --publish 80:80 --publish 8080:8080 --publish 8443:8443 --env SKIP_DOMAIN_VALIDATION=false --env NEXTCLOUD_MOUNT="/mnt/MyBucket" --env NEXTCLOUD_MAX_TIME=3600 --env NEXTCLOUD_MEMORY_LIMIT=4096M --env NEXTCLOUD_UPLOAD_LIMIT=16G --env NEXTCLOUD_ADDITIONAL_APKS="imagemagick nano" --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config --volume /var/run/docker.sock:/var/run/docker.sock:ro nextcloud/all-in-one:latest

My NextCloud master container launch parameters enforce the following six things…

  1. Forces Domain Validation.
  2. Sets the Data Directory to the S3 Mount.
  3. Sets 10 Minute Upload Timer.
  4. Increases Container PHP Memory Limit to 4GB.
  5. Allows 16GB File Uploads. (default)
  6. Installs imagemagick and nano apt packages to all containers.

Now navigate to the newly spun up master container by opening your browser and going to https://IPv4:8443

2025

Back to top ↑

2024

Javascript Cat!

how-to add oneko.js to the minimal-mistakes jekyll template.

Back to top ↑

2023

Ditching WordPress

Method of Procedure for migrating from WordPress to plain HTML.

Mom Said Redefine Success

In High School I had one dream that stands out. Own a Porsche by the time I was 26. Looking back, I have no idea where this dream came from; because I was ra...

Back to top ↑

2022

Back to top ↑

2021

Back to top ↑