Nextcloud Docker Stack With A Reverse Proxy Including SSL and DuckDNS

Nextcloud Docker Stack With A Reverse Proxy Including SSL and DuckDNS

In this this video I cover installing a Nextcloud docker stack with a reverse proxy including SSL and DuckDNS.
We’ll create a network share for easy access to the docker files from a Windows machine. Then we’ll create a user to access the share.
We also have to forward a port in the router. Finally, we’ll use docker compose inside the CLI to turn up the containers.
I also included a yaml code validator below to confirm the docker-compose config formatting. Leave a comment below if you run into any issues. Ill try to help the best I can.

—–=====Question For YOU=====—–
I recorded this video different than my others.
In the past I record the audio and video separately.
This video was in real time and recorded together.
Leave me a comment on which style you like better.
Subscribe for more videos and thanks for watching.

—–=====Base Config=====—–

—–=====Docker Timezone format=====—–

—–=====Find What in Notepad Replace Field=====—–

—–=====Create A New Bridge Network=====—–
docker network create -d bridge nextcloud

—–=====Proxy Conf File Path=====—–

—–=====YAML Code Validator=====—–

version: “2.0”
container_name: nextcloud
– PUID=1000
– PGID=1000
– TZ=America/New_York
– YOUR_ABSOLUTE_PATH_HERE/nextcloud/config:/config
– YOUR_ABSOLUTE_PATH_HERE/nextcloud/data:/data
– mariadb
restart: unless-stopped
image: linuxserver/mariadb
container_name: mariadb
– PUID=1000
– PGID=1000
– TZ=America/New_York
– YOUR_ABSOLUTE_PATH_HERE/mariadb/config:/config
restart: unless-stopped
image: linuxserver/swag
container_name: swag
– PUID=1000
– PGID=1000
– TZ=America/New_York
– URL=
– SUBDOMAINS=wildcard
– VALIDATION=duckdns
– YOUR_ABSOLUTE_PATH_HERE/swag/config:/config
– 443:443
restart: unless-stopped
name: nextcloud

10 thoughts on “Nextcloud Docker Stack With A Reverse Proxy Including SSL and DuckDNS

  1. I keep getting stuck after restarting swag. Swag log shows:
    Fatal Python error: pyinit_main: can't initialize time
    Python runtime state: core initialized
    PermissionError: [Errno 1] Operation not permitted
    Current thread 0xb6fab390 (most recent call first):
    <no Python frame>
    ERROR: Cert does not exist! Please see the validation error above. Make sure your DUCKDNSTOKEN is correct.

    I have verified the duckdns token. Not sure where I went wrong.

  2. I followed your guide to the letter, but I'm getting stuck with swag.
    From the swag container's log:
    3070034832:error:0D0D90AD:asn1 encoding routines:ASN1_TIME_adj:error getting time:crypto/asn1/a_time.c:330:
    [cont-init.d] 30-keygen: exited 1.
    [cont-init.d] 50-config: executing…
    Variables set:

    Fatal Python error: pyinit_main: can't initialize time
    Python runtime state: core initialized
    PermissionError: [Errno 1] Operation not permitted

    This is so vague, I don't even know where to start troubleshooting. I have doublechecked the token and it's spot on. Would you mind advising what to try/review/change?

  3. Hi Steve, thanks for your great work. Searchig on youtube a guide for install nextcloud on my OMV5 on raspberry 4, I founded your channel. I followed your indication, but I have a problem for create the SSL certificate, here ( you can found the log of my swag, that I hope you can read for give me the right help for resolve the problem.
    Thanks very mutch and ciao

  4. hey, thanks so much for the tutorial, first off, when i try to accses duckdns from the ip it's assigned to it shows me the router login page, when i accses it from another ip, it shows a swag welcome page, any idea why this happens?

  5. Thanks for sharing this video. Also nice to have the description for copy/paste! I believe I did all the things correct and logs of the container look good. Only a minor thing about performance. Trying to acces next cloud gives me a 502 error. I can ping to my next cloud server and I am almost certain that portforward is ok. Any tips to solve this?
    Edit: somehow dockers were not attached to bridge network? With 'docker network connect nextcloud nextcloud, Mariadb and swag (3 commands) I managed to start webpage.
    Now I am left with: Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name does not resolve ??
    Again any tips?

  6. Hello,
    Can you change the port from 443 to other, cause I have an old server and nextcloud and send me untrusted domain error. At the router can't have also two ip with same port on portforward, I want two have two nextcloud accounts, thanks a lot.

  7. Thank you very much for this tutorial , im new in OMV this video help me a lot to install nextcloud externally, However cannot access Nextcloud from local network but works from other networks, any suggestion you have for this issue?

  8. Another great video, if possible at the beginning of video give a brief overview of what the docker is for or about, for example some people look at your duckdns video and don't know what it does or what they can use it for

Leave a Reply

Your email address will not be published. Required fields are marked *