OpenProject is an open-source project management tool that works well on a Raspberry Pi (RPi) via Docker, provided you're using a 64-bit OS (like Raspberry Pi OS 64-bit) and a model with at least 4GB RAM (e.g., Pi 4 or Pi 5). This tutorial assumes you already have Docker installed and running on your RPi. If not, you can install it quickly with:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
Log out and back in after the last command to apply group changes. We'll use the official all-in-one Docker container for a quick setup. This is ideal for testing or small-scale use, but for production, consider the Docker Compose method for better scalability.
Prerequisites
- Raspberry Pi with 64-bit Raspberry Pi OS (Lite version recommended for efficiency).
- At least 4GB RAM and a microSD card (16GB+ Class 10 or better).
- Docker installed and running.
- Access to your RPi's terminal (via SSH or directly).
- Optional: An external drive (e.g., USB SSD) for persistent storage to avoid filling your SD card.
Step 0: Check the Latest OpenProject Version
OpenProject releases Docker images regularly. Check the latest stable version on Docker Hub:
docker search openproject/openproject
Or visit Docker Hub in a browser and look for the arm64 tag (e.g., 16 as of late 2024). Use the highest number available that's tagged for ARM64.
Step 1: Verify Docker is Running
Ensure Docker is active:
sudo systemctl status docker
If not running, start it:
sudo systemctl start docker
Step 2: Create Directories for Persistent StorageCreate folders to store OpenProject’s database and assets (to persist data across container restarts). To prevent data loss on container restarts, create directories for the database and assets. Use an external drive if possible (e.g., mounted at /mnt/usb).
sudo mkdir -p /var/lib/openproject/{pgdata,assets}
sudo chown -R 1000:1000 /var/lib/openproject
If using an external drive (e.g., mounted at /mnt/usb):
sudo mkdir -p /mnt/usb/openproject/{pgdata,assets}
sudo chown -R 1000:1000 /mnt/usb/openproject
Step 3: Pull and Run the OpenProject Docker Container
Run the following command to pull and start the OpenProject container. Replace:
- 192.168.1.100 with your Raspberry Pi’s IP address (find it with hostname -I).
- secret with a strong key (generate with openssl rand -hex 32).
- 16 with the latest version (check Docker Hub for arm64 tags; as of late 2024, 16 is recent).
docker run -d \ -p 8080:80 \ --name openproject \ -e OPENPROJECT_SECRET_KEY_BASE=secret \ -e OPENPROJECT_HOST__NAME=192.168.1.100:8080 \ -e OPENPROJECT_HTTPS=false \ -e OPENPROJECT_DEFAULT__LANGUAGE=en \ -v /var/lib/openproject/pgdata:/var/openproject/pgdata \ -v /var/lib/openproject/assets:/var/openproject/assets \ openproject/openproject:16
- -p 8080:80: Maps port 8080 on your Pi to the container’s port 80.
- -e: Sets environment variables (host, no HTTPS, English language).
- -v: Links persistent storage.
- -d: Runs in the background.
The image will download (may take a few minutes). Check progress:
docker logs -f openproject
Wait for messages like "Database configuration done" and "Memcached configuration done."
Step 4: Access OpenProject
- Open a browser on any device on your network.
- Navigate to http://<your-pi-ip>:8080 (e.g., http://192.168.1.100:8080).
- Log in with:
- Username: admin
- Password: admin
- Change the password immediately after logging in.
Step 5: Verify Installation
If the web interface loads and you can log in, the installation is successful. Configure settings (e.g., email) via Admin > Emails & Notifications.
Troubleshooting
- Port Conflict: If 8080 is in use, change to another port (e.g., -p 8081:80) and update OPENPROJECT_HOST__NAME.
- ARM64 Issues: Ensure your OS is 64-bit (uname -m should return aarch64). Use an -arm64 tagged image if available.
- Slow Startup: Raspberry Pi’s limited resources may slow initialization. Monitor with docker stats.
If you encounter errors, share the output of docker logs openproject for further assistance. For advanced setups (e.g., separate database), consider Docker Compose as mentioned previously, but this single-container method is simplest for getting started.
This setup gives you a fully functional OpenProject instance for local project management. For more config options, check the official docs.
No comments:
Post a Comment