Overview
Light Store can be installed using Docker & docker-compose.
This is the recommended installation method as it provides:
- OS-agnostic deployment
- Pre-configured components (PostgreSQL, Redis, Adminer, etc.)
- Isolated environment
- Easy updates and maintenance
Installing Docker
TIP
Skip this section if you already have Docker and docker compose
installed.
You'll need Docker and docker-compose installed on your system. Choose your platform below:
- Linux: Follow the Docker Engine Installation Guide for your specific distribution
- Windows: Install Docker Desktop for Windows
- MacOS: Install Docker Desktop for Mac
Windows Users
You can also use WSL2 to run Docker natively in a Linux environment instead of Docker Desktop.
Existing Installation
If you have an old Docker version installed, remove it first:
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
1. Set up Docker's apt repository
# Add Docker's official GPG key
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
2. Install Docker packages
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
3. Verify installation
sudo docker run hello-world
Installing Light Store
Now that Docker is set up, you can proceed with installing Light Store:
Download the Light Store package from BuiltByBit
Extract the package:
bashunzip Light\ Store\ v*.*.zip cd Light\ Store\ v*.*
Start the containers:
bashdocker compose up -d --build
Run the installation command inside the container:
bashdocker compose exec -it app php artisan app:install --env=docker
Follow the prompts.
No Interactive Shell
If you can't get access to an interactive shell, you may also run:
bashdocker compose exec -it app php artisan app:install --env=docker --url=https://yoururl.com
Configure the URL:
- For HTTP: Use
http://your-server-ip:8001
(default port) - For HTTPS: Check our Nginx with SSL guide for setting up HTTPS for the store
Custom Port
The default port (8001) can be modified in
docker-compose.yml
if needed.- For HTTP: Use
Set up the queue service:
bashsudo nano /etc/systemd/system/lightstore.service
Add the following content to the file:
ini[Unit] Description=Light Store Queue Worker After=docker.service Requires=docker.service [Service] User=root Group=root Restart=always ExecStart=/usr/bin/docker exec store-app-1 php artisan queue:work StartLimitInterval=180 StartLimitBurst=30 RestartSec=5s [Install] WantedBy=multi-user.target
Enable and start the queue service:
bashsudo systemctl daemon-reload sudo systemctl enable lightstore sudo systemctl start lightstore
Queue Status
You can check the queue service status using:
bashsudo systemctl status lightstore
Managing Your Installation
Here are some useful commands for managing your Light Store installation:
# (Re)start store
docker compose up -d --build
# The --build flag may be ommited if no code changes have been made.
# However, it is recommended to re-build each time, in case changes were made.
# Stop store
docker compose down
# View logs
docker compose logs -f app
Upgrading
Upgrading the store is simple using Docker
- Download the new zip from the BuiltByBit page
- Shut down the store:bash
docker compose down
- On the remote machine, delete the old folder (containing the
docker-compose.yml
file)WARNING
Deleting this directory will not delete your data. Your app data is stored in Docker volumes. As long as said volumes are not deleted, the data will persist.
- Upload the new zip and unzip, like in the installation procedure
- Run compose up to startbash
docker compose up -d --build