Skip to content

A dockerized version of AltServer-Linux with Wi-Fi sync capability.

License

Notifications You must be signed in to change notification settings

darderik/Altserver-docker

 
 

Repository files navigation

Altserver-docker

A dockerized version of AltServer-Linux with Wi-Fi sync capability.

Run the server

prerequisites

The only dependency is docker, but it is important to note two things:

  • You might not be able to refresh apps if usbmuxd is running in the host system, the docker guest already includes it and binds to the usb interface. Make sure your host system is NOT running it.
  • You might need to be running the avahi-daemon in the host system.

docker compose (recommended)

To start up the application, run the docker-compose stack:

docker compose up -d --build

Using docker run

Just run run.sh, or manually in your terminal:

docker build . -t altserver-docker && \
docker stop altserver || true && \
docker rm altserver || true && \
sudo docker run -d \
  -v "./lib:/root/.config/Provision/lib" \
  -v "./logs:/altserver/logs" \
  -v "./bin:/altserver/bin" \
  -v "/dev/bus/usb:/dev/bus/usb" \
  -v "/var/lib/lockdown:/var/lib/lockdown" \
  -v "/var/run:/var/run" \
  -v "/sys/fs/cgroup:/sys/fs/cgroup:ro" \
  --name altserver \
  --network host \
  --privileged \
  altserver-docker 

Logs

Logs will be stored in the directory where the container is ran inside ./logs

Optional environment variables

Overriding architectures for libraries and binaries

It's possible to override which architecture of altserver, netmuxd, anisette-server and provision libraries (for anisette) are downloaded by setting the following environment variables in the docker compose file:

  environment:
    - OVERRIDE_ALTSERVER_ARCH=x86_64
    - OVERRIDE_NETMUXD_ARCH=x86_64
    - OVERRIDE_ANISETTE_ARCH=x86_64
    - OVERRIDE_PROVISION_LIBS_ARCH=x86_64

or alternatively adding them in the docker run command before the image name:

  -e OVERRIDE_ALTSERVER_ARCH=x86_64 \
  -e OVERRIDE_NETMUXD_ARCH=x86_64 \
  -e OVERRIDE_ANISETTE_ARCH=x86_64 \
  -e OVERRIDE_PROVISION_LIBS_ARCH=x86_64 \

You can check for which architectures are available by checking the releases of each project:

  • AltServer-Linux
  • netmuxd
  • Provision (this is the anisette-server)
  • The libraries are pulled from the apple music android apk, so the only available options are arm64-v8a, armeabi-v7a, x86, x86_64

Overriding whether provision libraries are decompressed from the repo or downloaded

It's possible to allow provision to download the libraries it needs from the apple music android apk by setting the following environment variable in the docker compose file:

  environment:
    - ALLOW_PROVISION_TO_DOWNLOAD_LIBS=true

or alternatively adding it in the docker run command before the image name:

  -e ALLOW_PROVISION_TO_DOWNLOAD_LIBS=true \

When this variable is present, the libraries will be downloaded by provision, if it's not present, the libraries will be decompressed from the repo.

Provision libraries

Provision automatically pulls the libraries it requires (libCoreADI.so and libstoreservicescore.so) from the apple music android apk, but this requires a 60+MB download it does automatically, so I decided to include these in the root of the repo already and have the docker-entrypoint.sh decompress them where Provision normally would. This is optional and can be overridden by setting the ALLOW_PROVISION_TO_DOWNLOAD_LIBS environment variable to true.

Updating lib.tar.xz

To update lib.tar.xz just run:

bash scripts/provision-deps-manual-download.sh

from the root of the repo.

Credits

I authored this repo but I did NOT author the projects it depends on. In particular:

And some other projects which inspired me to create this repo:

Contributing

Feel free to open an issue or a PR if you have any suggestions or improvements to this repo. I'm always open to feedback and contributions!

About

A dockerized version of AltServer-Linux with Wi-Fi sync capability.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 85.9%
  • Dockerfile 14.1%