Skip to content

ruslanys/docker-megacmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MegaCMD Docker image

Docker Automated build Docker Pulls

How it works

  1. Run container with Mega CMD server and mounted configuration and data directories.
  2. Obtain session using your login and password.
  3. Execute necessary commands.

Start a Daemon

Because of the issue #623 we need to have an unique UUID at /etc/machine-id. Otherwise, mega-sync will not work.

We have 2 options:

  1. Bypass the machine-id from the host.
docker run -d --name megacmd --restart always \
    -v /etc/machine-id:/etc/machine-id:ro \
    -v /opt/MEGA/config:/root/.megaCmd \
    -v /opt/MEGA/data:/root/MEGA \
    ruslanys/megacmd
  1. Generate a new UUID for the container.
docker run -d --name megacmd --restart always \
    -v /opt/MEGA/config:/root/.megaCmd \
    -v /opt/MEGA/data:/root/MEGA \
    ruslanys/megacmd
docker exec -it megacmd bash
cat /proc/sys/kernel/random/uuid > /etc/machine-id

Commands Execution

docker exec -it megacmd mega-login $username $password
docker exec -it megacmd mega-sync /root/MEGA /