this post was submitted on 23 Jun 2026
40 points (93.5% liked)
Selfhosted
60074 readers
635 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:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam.
-
Posts here are to be centered around self-hosting. Please ensure it is clear in your post how it relates to self-hosting.
-
Don't duplicate the full text of your blog or git here. Just post the link for folks to click.
-
Submission headline should match the article title.
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I use Docker Compose to run my Nextcloud server using the community image, which in turn lives inside an unprivileged LXC container.
compose.yaml
Nextcloud's file storage is a mount point at
/srv/nextcloud, which is backed by a ZRAID pool. The secrets are stored in files with600permissions. The web server is initially exposed on port 8080.When you run the container for the first time, it will show a first time setup dialog. You'll have to fill it out manually, using mariadb for the database type and
dbfor the database hostname.If Nextcloud works through HTTP, you can then set up a proxy for HTTPS. I used Nginx running on the same LXC. I can't guarantee that my config is adequately secure, use it at your own risk.
10-nextcloud.conf
To allow the web app to work using the DNS name, you'll have to edit
/var/www/html/config/config.phpand change/add these values:config.php (partial)
If at any point you need to start over, remember to delete the contents of
/var/www/html.(edit) Forgot to mention: the web server will accept connections from all addresses, you'll need to set up a strict firewall to only allow 443 (maybe 80) and 22.