Jump to content

Docker


Luke

Recommended Posts

feardamhan

Im trying (and failing) to move my emby system over to docker. 

 

I've gotten docker installed, and emby installed, and running through docker and available on the home network

 

What I'm struggling with is getting emby to auto start when the host machine boots

 

Its a debian system running under vmware fusion for the moment as it give me flexibility to play around  /take snapshots / restore etc, but I plan to port to raspbian on pi2 once I've worked out the installation kinks

 

Ive tried the following to no avail

 

# Install Emby Current User
sudo docker run -it --rm -v /usr/local/bin:/target \
    emby/embyserver instl
 
sudo docker run -it --rm -v /etc/systemd/system:/target  \
    emby/embyserver instl service
 
sudo systemctl enable embyserver@${USERNAME}
 
I get the following in response to the last command
Failed to enable unit: File embyserver@.service: No such file or directory
 
Anybody done this successfully / have any insight?
Link to comment
Share on other sites

@@pir8radio ok so I've done as suggested and removed /emby from my config but it still doesn't work with the latest update. And should I be able to access xxxx.domain.com/emby after removing /emby from my proxy config? Because I can access both now. xxxxx.domain.com and xxxxx.domain.com/emby , I can't log into either one with emby connect accounts with the latest update tho. 

Link to comment
Share on other sites

pir8radio

@@pir8radio ok so I've done as suggested and removed /emby from my config but it still doesn't work with the latest update. And should I be able to access xxxx.domain.com/emby after removing /emby from my proxy config? Because I can access both now. xxxxx.domain.com and xxxxx.domain.com/emby , I can't log into either one with emby connect accounts with the latest update tho. 

 

Yes you should be able to get to both when using a subdomain.    Humm......    what does your config look like now?

Link to comment
Share on other sites

My config now looks like this

upstream backend {
        server 192.168.1.159:19999;
        keepalive 64;
}

# redirect all traffic to https
server {
listen 80;
server_name _;
return 301 https://$host$request_uri;
}

# main server block
server {
listen 443 ssl default_server;
        root /config/www;
        index index.html index.htm index.php;

        server_name _;

        ssl_certificate /config/keys/letsencrypt/fullchain.pem;
        ssl_certificate_key /config/keys/letsencrypt/privkey.pem;
        ssl_dhparam /config/nginx/dhparams.pem;
        ssl_ciphers 'ECDHE-RSA-AES128   -GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
        ssl_prefer_server_ciphers on;

        client_max_body_size 0;
location / {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
                proxy_set_header Host $host;
                proxy_set_header X-Forwarded-Proto $remote_addr;
                proxy_set_header X-Forwarded-Protocol $scheme;
                proxy_redirect off;
                auth_basic "Restricted";
                auth_basic_user_file /config/nginx/.htpasswd;
                include /config/nginx/proxy.conf;
                proxy_pass http://192.168.1.159:8096;
        }

I have other services too but didn't feel the need to include them

Link to comment
Share on other sites

pir8radio

My config now looks like this

 

I have other services too but didn't feel the need to include them

 

and when you use emby connect its setup to go to https://emby.yourdomain.com port 443 or is it just using 80 and http then getting redirected?     Config looks fine though, that said, if you are still having the issue, it looks like it was NOT related to the /emby issue that some others were having.  Thanks for testing.   Hum....     

Link to comment
Share on other sites

and when you use emby connect its setup to go to https://emby.yourdomain.com port 443 or is it just using 80 and http then getting redirected?     Config looks fine though, that said, if you are still having the issue, it looks like it was NOT related to the /emby issue that some others were having.  Thanks for testing.   Hum....     

 

 

Yeah it's using 80 and http then redirects, from what I understand. I'm not really an expert in this so I have just copy/pasted what seemed to work. I actually don't use any of the emby apps so all my users just use the browser and goes to http://emby.mydomain.com or https://emby.mydomain.com But all http request gets redirected to https. If I were to use emby apps and use emby connect I guess I would have to forward port 8096/8920 to 443 to get that to work. But that haven't really been needed yet. And this way the only port I need to forward is 443

 

But the thing I don't understand is, I don't really use emby connect in that sense.. Because my users only goes to that address and "gets proxied to my" internal emby instance. The only thing that ties them to emby connect is that they are guest users which have to be signed up to emby connect to get an invite. Or am I totally wrong here? When I/they go to emby.mydomain.com they don't get the option to sign in with emby connect, it's just a manual sign in page IIRC. At least that's what I get when I tried to test things.  I would understand If tried to sign in with emby connect, that would just give me "server can't be reached" because the ports are not forwarded to 443. But I can get to emby just fine it just throws an "invalid username or password" error for users who are signed up with emby connect. Which I don't understand.

Edited by strike
Link to comment
Share on other sites

 

Im trying (and failing) to move my emby system over to docker. 

 

I've gotten docker installed, and emby installed, and running through docker and available on the home network

 

What I'm struggling with is getting emby to auto start when the host machine boots

 

Its a debian system running under vmware fusion for the moment as it give me flexibility to play around  /take snapshots / restore etc, but I plan to port to raspbian on pi2 once I've worked out the installation kinks

 

Ive tried the following to no avail

 

# Install Emby Current User
sudo docker run -it --rm -v /usr/local/bin:/target \
    emby/embyserver instl
 
sudo docker run -it --rm -v /etc/systemd/system:/target  \
    emby/embyserver instl service
 
sudo systemctl enable embyserver@${USERNAME}
 
I get the following in response to the last command
Failed to enable unit: File embyserver@.service: No such file or directory
 
Anybody done this successfully / have any insight?

 

 

@@feardamhan your only issue is autostart, right?

Link to comment
Share on other sites

feardamhan

Sorry there is a typo in the documentation there should be hyphen between emby and server.

@@hurricanehrndz not sure if you were saying that to me or others?

 

I did experiment with using a hyphen but only in the final command, not the preceeding ones. Should I replace it everywhere?

Link to comment
Share on other sites

hurricanehrndz

@@hurricanehrndz not sure if you were saying that to me or others?

 

I did experiment with using a hyphen but only in the final command, not the preceeding ones. Should I replace it everywhere?

This should be the command, verify the /etc/systemd/system/emby-server@.service exists.

sudo systemctl enable emby-server@${USERNAME}

Edited by hurricanehrndz
Link to comment
Share on other sites

hurricanehrndz

 

This should be the command, verify the /etc/systemd/system//emby-server@.service exists.

sudo systemctl enable emby-server@${USERNAME}

Additionally, you might need to add

DefaultDependencies=no


Under unit for the service file. These are issue that will eventually be resolved.

Link to comment
Share on other sites

feardamhan

 

Additionally, you might need to add

DefaultDependencies=no
Under unit for the service file. These are issue that will eventually be resolved.
 

 

Not quite working.

 

The service doesn't appear to be created.

 

pi@debian8:~$ sudo docker run -it --rm -v /etc/systemd/system:/target \

> emby/embyserver instl service

[sudo] password for pi:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0.

[fix-attrs.d] applying ownership & permissions fixes...

[fix-attrs.d] done.

[cont-init.d] executing container initialization scripts...

[cont-init.d] 01-conf-onetime: executing...

[cont-init.d] 01-conf-onetime: exited 0.

[cont-init.d] 02-user-onetime: executing...

[cont-init.d] 02-user-onetime: exited 0.

[cont-init.d] 03-upgrade-onetime: executing...

[cont-init.d] 03-upgrade-onetime: exited 0.

[cont-init.d] 04-fix_dllmaps-onetime: executing...

[cont-init.d] 04-fix_dllmaps-onetime: exited 0.

[cont-init.d] done.

[services.d] starting services

[services.d] done.

instl exited 0

[cont-finish.d] executing container finish scripts...

[cont-finish.d] done.

[s6-finish] syncing disks.

[s6-finish] sending all processes the TERM signal.

[s6-finish] sending all processes the KILL signal and exiting.

 

pi@debian8:~$ ls -l /etc/systemd/system

total 28

lrwxrwxrwx 1 root root 40 Sep 4 23:46 dbus-org.freedesktop.Avahi.service -> /lib/systemd/system/avahi-daemon.service

drwxr-xr-x 2 root root 4096 Sep 4 23:43 getty.target.wants

drwxr-xr-x 2 root root 4096 Sep 12 21:03 multi-user.target.wants

drwxr-xr-x 2 root root 4096 Sep 4 23:43 network-online.target.wants

drwxr-xr-x 2 root root 4096 Sep 4 23:46 printer.target.wants

drwxr-xr-x 2 root root 4096 Sep 12 21:03 sockets.target.wants

lrwxrwxrwx 1 root root 31 Sep 4 23:46 sshd.service -> /lib/systemd/system/ssh.service

drwxr-xr-x 2 root root 4096 Sep 4 23:44 sysinit.target.wants

lrwxrwxrwx 1 root root 35 Sep 4 23:43 syslog.service -> /lib/systemd/system/rsyslog.service

drwxr-xr-x 2 root root 4096 Sep 4 23:43 timers.target.wants

pi@debian8:~$

Link to comment
Share on other sites

hurricanehrndz

PS you're using the wrong docker image if running a rpi

 

Sent from my ONEPLUS A3000 using Tapatalk

Link to comment
Share on other sites

hurricanehrndz

PS I'm going to make some performance tweaks, I will have an update for you in 3 hrs

 

Sent from my ONEPLUS A3000 using Tapatalk

Link to comment
Share on other sites

feardamhan

PS you're using the wrong docker image if running a rpi

 

Sent from my ONEPLUS A3000 using Tapatalk

 

 

I not using the PI yet. I'm using a Debian 9.1 box in a VM to get my head around the setup. Using Debian as its closest to raspbian which I intend to run the final system on. Reason it might seem that way from the 'log' is that the user I setup on my Debian VM is called 'pi'

 

don't let the debian8 hostname throw you off either....it actually is Debian 9.1

 

pi@debian8:~$ cat /etc/debian_version

9.1
Link to comment
Share on other sites

hurricanehrndz

 

I not using the PI yet. I'm using a Debian 9.1 box in a VM to get my head around the setup. Using Debian as its closest to raspbian which I intend to run the final system on. Reason it might seem that way from the 'log' is that the user I setup on my Debian VM is called 'pi'

 

don't let the debian8 hostname throw you off either....it actually is Debian 9.1

 

pi@debian8:~$ cat /etc/debian_version

9.1

 

Cool, I'm building the fixes now, they should be up shortly. I'll check back in once done. Thank you for your feedback and contribution. It is always pleasant to have users willing to work with us to figure things out rather than just abandoned the software.

Link to comment
Share on other sites

feardamhan

Cool, I'm building the fixes now, they should be up shortly. I'll check back in once done. Thank you for your feedback and contribution. It is always pleasant to have users willing to work with us to figure things out rather than just abandoned the software.

 

More than happy to be of some small assistance. You guys do great work!

  • Like 1
Link to comment
Share on other sites

hurricanehrndz

More than happy to be of some small assistance. You guys do great work!

I wont be able to get this done tonight. A lot more work needed to go into the images because opensuse changed there file format. I hope to be done by tomorrow.

Link to comment
Share on other sites

I don't know what you guys did but the latest version fixed my issue (unable to login with users signed up with emby connect) :)

Thanks!

Edited by strike
Link to comment
Share on other sites

hurricanehrndz

I don't know what you guys did but the latest version fixed my issue (unable to login with users signed up with emby connect) :)

Thanks!

Luke might have done some fixes to the code. We are happy to hear that it is working for you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...