MotionEye - Outside access with SSL

  • It should work if you just add motion eye to the same stack and re-doploy the stack. You need to do the equivalent modifications to the config files.

    Just looked at the guide I looked at when I set up my Nextcloud and was a guide you made, what's parts would I need to change and would they both work?

  • what's parts would I need to change

    • adjust the docker-compose file to your needs
    • perform the step for the proxy configuration for motioneye

    would they both work?

    yes, if you use the subdomain approach, nextcloud would be available as nextcloud.youdomain and motioneye as motioneye.yourdomain

  • So below is the compose file im using, im still at a lose to where i add the line for motioneye? i have motion eye already installed on my machine

    version: "2"



    image: linuxserver/nextcloud

    container_name: nextcloud


    - PUID=998 #change PUID if needed

    - PGID=100 #change PGID if needed

    - TZ=Europe/London #change Time Zone if needed


    - /var/lib/docker/containers/nextcloud/nextcloud/config:/config #/srv/dev-disk-by-label-disk1 needs to be adjusted

    - /srv/dev-disk-by-label-MyCloud/Nextcloud/data:/data #/srv/dev-disk-by-label-disk1 needs to be adjusted


    - mariadb

    # ports: # uncomment this and the next line if you want to bypass the proxy

    # - 450:443

    restart: unless-stopped


    image: linuxserver/mariadb

    container_name: nextclouddb


    - PUID=998 #change PUID if needed

    - PGID=100 #change PGID if needed

    - MYSQL_ROOT_PASSWORD=*** #change password

    - TZ=Europe/London #Change Time Zone if needed


    - /var/lib/docker/containers/nextcloud/nextclouddb:/config #/srv/dev-disk-by-label-disk1 needs to be adjusted

    restart: unless-stopped


    image: linuxserver/swag #swag is the replacement for letsencrypt (see link below)

    container_name: swag




    - PUID=998 #change PUID if needed

    - PGID=100 #change PGID if needed

    - TZ=Europe/London # change Time Zone if needed

    - URL=*** #insert your domain name - yourdomain.url

    - SUBDOMAINS=www,

    - VALIDATION=http

    - EMAIL=*** # define email; required to renew certificate


    - /var/lib/docker/containers/nextcloud/swag:/config #/srv/dev-disk-by-label-disk1 needs to be adjusted


    - 444:443

    - 81:80

    restart: unless-stopped

  • So i have managed to add motion eye to the same network, i am assuming i need to find/create a file called "motioneye.subdomain.conf.sample" rename it to "motioneye.subdomain.conf" and then edit it? now i took your suggestion and looked online for what to edit it with but cant find anything?

    Sorry if im sounding dense, didnt think this would be this complicated!!!

  • I did this for trilium. I took the conf file from tautulli and changed it for trilium. Here is the result:

    Remember that everything in a line after # is ignored

  • Does this look right to you? I'v adjusted the port to the port number of the motion eye and im also assuming if i change where it says "trilium" to that of the IP of the Motion eye it will work?

    server {

    listen 443 ssl;

    listen [::]:443 ssl;

    server_name motioneye.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth, fill in ldap details in ldap.conf

    #include /config/nginx/ldap.conf;

    # enable for Authelia

    #include /config/nginx/authelia-server.conf;

    location / {

    # enable the next two lines for http auth

    #auth_basic "Restricted";

    #auth_basic_user_file /config/nginx/.htpasswd;

    # enable the next two lines for ldap auth

    #auth_request /auth;

    #error_page 401 =200 /login;

    # enable for Authelia

    #include /config/nginx/authelia-location.conf;

    include /config/nginx/proxy.conf;

    resolver valid=30s;

    set $upstream_app trilium; # use ip instead of name if name is not working

    set $upstream_port 8765; # note: as trilium is sharing the same docker network as letsencrypt, internal port to be used

    set $upstream_proto http;

    proxy_pass $upstream_proto://$upstream_app:$upstream_port;



  • Where you got your domain for nextcloud. There you need to specify that your subdomains (nextcloud and motioneye) are redirected to your external IP. You probably did this for nextcloud (if your nextcloud is accessible from outside). Now you need to do the same for motioneye.

    In the docker-compose file for letsencrypt you also need to add the subdomain

    - SUBDOMAINS=www,nextcloud,motioneye

    unless you use a Wildcard certificate

  • So i tyrped the follwing


    and got this

    which i remember with Nextcloud i had to change line 36 from "proxy_max_temp_file_size 2048m;" to proxy_max_temp_file_size 1024m; and also change the file name from "nextcloud.subfolder.conf.sample" to "nextcloud.subfolder.conf"

    Im assueming that would be the kind of the same for MotionEYE use a random .subfolder.conf.sample file change it to match motionEYE and change "2048" to "1024"?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!