Setup with Docker (Advanced)

The advanced setup is not that different from the simple setup, but may not be suitable for certain environments. Specifically, it uses different containers for the application running with PHP, and the web server. The docker-compose file also includes configuration for Redis, which increases performance.

Docker images used in this setup are named linkace/linkace:latest or linkace/linkace:0.0.42.

This setup is recommended when having full access to Docker, e.g. on a VPS or root server.

Base Requirements

  • Shell access to your server.
  • Docker version 19 or greater.
  • docker-compose is recommended for the setup, must support compose version 3.
  • Please consider using utf8mb4_bin as the database collation. Other collations like utf8mb4_general_ci may cause issues with different Unicode characters.
If you are using an ARM v7 operating system, please make sure that you have the latest version of libseccomp2 (> 2.4.4) installed. Otherwise, you will run into issues with our Docker images. A guide can be found on linuxserver.io.

Setup with Docker

1. Copy all needed files

Copy the following files from the repository to the directory you want to use for the application. You don’t need any other files to run LinkAce.

  • docker-compose.production.yml
  • .env.docker.production

2. Modify the files

  • Rename the .env.docker.production to .env.
  • Rename the docker-compose.production.yml to docker-compose.yml.

By default, you have change the following variables before starting the setup:

  • DB_PASSWORD - Please set a secure password here
  • REDIS_PASSWORD - Please set a secure password here
  • SESSION_DRIVER - Change the setting from file to redis (like SESSION_DRIVER=redis)
  • CACHE_DRIVER - Change the setting from file to redis

3. Start the application

After you completed the above steps, run the following command to start up the container setup:

docker-compose up -d

4. Set a secure key

After you started the Docker containers, you are almost ready to run the setup. Before the setup, we have to generate a secret key.

Please note that linkace_app_1 is the name of your LinkAce container here. It may differ from your name. You will find the name of your container in the output of the previous command, but will most likely end with _app_1.
docker exec linkace_app_1 php artisan key:generate

5. Start the built-in setup

Open the URL which points to your Docker container in your browser now. You configure the database and your user account in this process.

Please make sure to follow the post-installation steps to fully enable all features, including automated backups and link checks.

The advanced Docker configuration page provides some guides for specific use cases for Docker.