this post was submitted on 23 Jun 2026
52 points (94.8% liked)

Selfhosted

60210 readers
811 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

I've tried NextCloud before and didn't really love it and I'm now happy with a combination of syncthing and LibreOffice. But my wife wants the full google drive, with sheets, docs etc. without the google, and I think NextCloud is my best option for that.

I'm and experienced *nix admin and already have a Linux server running with both VMs and docker containers and also have a working OpenVPN setup for remote access. But I found the NextCloud setup frustrating. We had a discussion about it (here I think) and determined that this was because NextCloud would rather sell their hosted service, so they don't go out of their way to make the self hosted option easy. I get that and don't hold it against them at all.

But, now that I'm wanting to try it again, I'm looking for pointers to guides for setting up self hosted NextCloud. I've searched, but nothing I found seemed like "the one".

you are viewing a single comment's thread
view the rest of the comments
[–] The_Zen_Cow_Says_Mu@infosec.pub 4 points 5 days ago (1 children)

I run nextcloud in a podman pod because I'm coocoo bananas that way. It uses authentik as an SSO provider using the nextcloud OIDC plugin. And I use the linuxserver.io container rather than the official nextcloud one because gosh darn it , it actually works

[Pod]
PodName=nextcloud
PublishPort=10443:443
PublishPort=9980:9980

Nextcloud-db.container

Description=db
Wants=network-online.target
After=network-online.target

[Service]
Restart=always

[Container]
Pod=nextcloud.pod
ContainerName=nextcloud-db
Image=docker.io/library/mariadb:11
AutoUpdate=registry
Volume=nextcloud-db.volume:/var/lib/mysql:Z
Environment=MARIADB_HOST=nextcloud
Environment=MARIADB_DATABASE=nextcloud
Environment=MARIADB_USER=nextcloud
Environment=MARIADB_PASSWORD=nextcloud
Environment=MARIADB_ROOT_PASSWORD=nextcloud

[Install]
WantedBy=default.target

Nextcloud-app.container

[Unit]
Description=Nextcloud
Wants=network-online.target
After=network-online.target

[Service]
Restart=always

[Container]
#Label=app=nextcloud
ContainerName=nextcloud-app
Pod=nextcloud.pod
Image=lscr.io/linuxserver/nextcloud:latest
AutoUpdate=registry
Volume=nextcloud-config.volume:/config:Z
#Volume=nextcloud-data.volume:/data:Z
Volume=/home/nextcloud/:/data:Z
Environment=TZ=America/New_York
Environment=PUID=1000
Environment=PGID=1000
#PublishPort=10443:443

[Install]
WantedBy=default.target

Nextcloud-office.container

[Unit]
Description=Nextcloud-office
Wants=network-online.target
After=network-online.target

[Service]
Restart=always

[Container]
#Label=app=nextcloud
ContainerName=nextcloud-office
Pod=nextcloud.pod
Image=docker.io/collabora/code:latest
AutoUpdate=registry
Environment=server_name=office.app.myserver.org
Environment=aliasgroup1="https://nextcloud.app.myserver.org/"
[Install]
WantedBy=default.target
[–] pmk@piefed.ca 1 points 5 days ago (1 children)

Always nice to see podman used well! Do you have a dedicated user or is it rootful?

[–] The_Zen_Cow_Says_Mu@infosec.pub 0 points 5 days ago (1 children)

many of the linuxserver containers don't work rootless. i didn't have luck when i tried it as a user service

[–] pmk@piefed.ca 1 points 5 days ago (1 children)

Interesting, do you remember which didn't work? I recently set up a simple service (navidrome) as rootless podman with an ansible script, but it was... there were some hoops to jump through, mainly with the uid/gid and machinectl to get it to work.

[–] The_Zen_Cow_Says_Mu@infosec.pub 1 points 4 days ago* (last edited 4 days ago)

the only linuxserver containers I run are nextcloud and plex. both are running as rootful containers. I also tried their calibre-web container (no longer using it), which didn't work as rootless, but worked fine as a rootful container.

most of my other non-linuxserver applications are working just fine rootless. so clearly a linuxserver thing.