How to Install OpenProject on a VPS with Docker Compose: Self-Hosted Project Management

 


You know the scene: a project tracked in a spreadsheet that five people edit at once, until one column quietly disappears and nobody owns up to it. Or the important task that sinks in a group chat because nobody wrote its deadline down anywhere official. When a project is tiny, these improvised methods still work. Once a team grows, work starts slipping through the cracks: who is doing what, what is already done, and when things are due all live in different places.

OpenProject pulls that scattered picture into one shared workspace: task lists, Kanban boards, Gantt charts, time tracking, and a project wiki in a single web app. Its community edition is free and open source, and you can run it yourself on a VPS. This guide follows the method OpenProject's own documentation recommends: Docker Compose from the opf/openproject-docker-compose repository, branch stable/17. By the end, your OpenProject runs behind an Nginx reverse proxy with HTTPS, not exposed directly to the internet on a raw port.

Prerequisites

  • A Linux VPS with Docker Engine and the Docker Compose v2 plugin. This guide uses docker compose (with a space), not the legacy docker-compose.
  • A domain already pointing at your VPS IP, for example projects.example.com. Replace it with your own domain throughout.
  • SSH access to the VPS with sudo rights.
  • Git installed on the VPS (sudo apt install git on Ubuntu/Debian if needed).
  • Nginx and Certbot if you want HTTPS — both are covered in step 5.
  • At least 4 GB of RAM. OpenProject runs several services at once (the app, workers, PostgreSQL, memcached, and a collaboration server), so a 1–2 GB VPS will feel cramped.

Check Docker and Compose first:

docker --version
docker compose version

Expected result: both commands print version numbers without errors.

Step 1: clone the official Compose repository

OpenProject's documentation does not ask you to write a docker-compose.yml from scratch. Its official repository already contains the Compose file, a sample .env, and control scripts. Clone the stable branch:

cd /opt
sudo git clone https://github.com/opf/openproject-docker-compose.git --depth=1 --branch=stable/17 openproject
cd /opt/openproject

Expected result: /opt/openproject contains docker-compose.yml, .env.example, and a compose folder.

One important note from the documentation: do not edit docker-compose.yml directly, because it gets overwritten whenever you pull updates from the repository. Put customizations in a separate docker-compose.override.yml instead. For this guide, .env alone is enough, so you never need to touch the Compose file.

Step 2: prepare the .env file and the data folder

Copy the sample .env, then create the data folder as documented:

sudo cp .env.example .env
sudo mkdir -p /var/openproject/assets
sudo chown 1000:1000 -R /var/openproject/assets

The chown 1000:1000 is not an arbitrary number: the OpenProject container runs as UID/GID 1000, so the assets folder on the host must belong to that UID for the app to write attachments into it.

Now generate an application secret. Rails uses this value to derive session keys and tokens, so treat it like a password: long, random, and never shared:

openssl rand -hex 32

Note down the output. Then open .env for editing:

sudo nano .env

Set or confirm these values:

PORT=127.0.0.1:8080
OPENPROJECT_HOST__NAME=projects.example.com
OPENPROJECT_HTTPS=true

What each one does:

  • PORT=127.0.0.1:8080 binds OpenProject to loopback only. The app cannot be reached directly from the internet; all traffic must pass through the reverse proxy from step 5. The default 0.0.0.0 leaves the app open to the public, which is not what you want on a production server.
  • OPENPROJECT_HOST__NAME (note the double underscore) is the public domain where OpenProject is reached. OpenProject uses it to build links in emails and in the interface.
  • OPENPROJECT_HTTPS=true tells OpenProject it sits behind a proxy that already handles TLS. OpenProject does not terminate SSL itself; that job belongs to the reverse proxy.

Save the file (Ctrl+O, Enter, Ctrl+X in nano).

Step 3: start the stack for the first time

Start the containers in the background while pulling the latest images, using the secret from step 2:

SECRET_KEY_BASE=<paste-the-secret-from-step-2> OPENPROJECT_HTTPS=false docker compose up -d --build --pull always

Why OPENPROJECT_HTTPS=false here when .env already says true? Because this is a first-start check: the official documentation recommends disabling HTTPS mode on the first startup, confirming the app comes up at http://localhost:8080, and only then switching to the production setup. A variable written on the command line overrides the .env value for that run only.

This is not instant. The seeder container fills the database on first run, and the app needs a few minutes before it is ready. Watch the logs:

docker compose logs -f web

Wait until the logs stop showing errors and no service keeps restarting, then press Ctrl+C to leave the log view. Check the status of all services:

docker compose ps

Expected result: the web, worker, cron, db, cache, and proxy services are running. If one service restarts in a loop, inspect that service specifically, for example docker compose logs --tail=100 db.

Test from inside the VPS:

curl -I http://127.0.0.1:8080

Expected result: an HTTP/1.1 200 OK response, or a 302 redirect to the login page.

Note that http://projects.example.com will not work yet — nothing points the domain at the app until step 5 is done. For this early check, the loopback test above is enough. Log in with the default credentials from the official documentation: username admin, password admin. As soon as you are in, change the admin password and create accounts for your team; never leave admin/admin alive on a 



Step 4: lock down the admin account and create your first project

Before inviting anyone, do three things:

  1. Click the admin avatar, open My account, and replace the admin password with a strong one.
  2. Go to Administration → Users and permissions → Users, create an account for each team member, and give them a fitting role (Member, for instance, rather than Project admin, if they do not need to change project settings).
  3. Create your first project from Projects → New project, fill in its name and identifier, then add team members to it.

Inside the project, start with the Work packages module: create a few tasks, assign owners and due dates, then view them on the Kanban board and the Gantt chart. If those views render correctly, the installation foundation is solid; the rest is team habit, not server work.

Step 5: put an Nginx reverse proxy with HTTPS in front

OpenProject now listens on loopback only, so place Nginx in front of it. Create a new site file:

sudo nano /etc/nginx/sites-available/openproject

Fill it in, replacing projects.example.com with your domain:

server {
    listen 80;
    server_name projects.example.com;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        client_max_body_size 0;
    }
}

Enable the site and test the configuration:

sudo ln -s /etc/nginx/sites-available/openproject /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

Expected result: nginx -t answers syntax is ok and test is successful. Then issue a free TLS certificate with Certbot:

sudo certbot --nginx -d projects.example.com

Follow Certbot's prompts and choose the HTTP-to-HTTPS redirect. Once the certificate is live, restart the stack in production HTTPS mode (this time without overriding the .env value):

SECRET_KEY_BASE=<the-same-secret-as-step-3> docker compose up -d --build --pull always

Important: reuse the same secret as the first start. Changing SECRET_KEY_BASE invalidates all sessions and remembered 2FA tokens, forcing every user to log in again.

Open https://projects.example.com and log in again. If the login page loads over HTTPS with no certificate warning, your production installation is done.

Troubleshooting

The web container keeps restarting.
Read its logs (docker compose logs --tail=100 web) before changing anything. Common causes: the database was not ready when the app first started — this usually resolves itself once db is healthy — or the VPS ran out of RAM with all of OpenProject's services running together. Check with free -h and docker stats.

A "pull access denied for openproject/proxy" warning during pull.
The official documentation calls this a warning you can ignore: the proxy image is built locally, not pulled from a registry. As long as the other images pull and the stack runs, ignore the message.

Pages load but attachments fail to upload.
Check the ownership of /var/openproject/assets — it must be 1000:1000. If the folder was created as root without chown, the container cannot write into it and uploads will fail.

SSL errors or redirect loops after adding Nginx.
Usually OPENPROJECT_HTTPS disagrees with the proxy: if Nginx already handles TLS, the value must be true; if you still reach the app over plain HTTP, it must be false. Match it to reality, then restart the stack.

You lost the secret after the stack is running.
There is no supported way to read the secret back out of a running container. Store it in a password manager from step 2 onward. If it is truly gone, you can set a new secret, but every session will be invalidated and users must log in again — treat that as a last resort, not a routine.

Summary table

ComponentRoleLocation / note
webThe OpenProject applicationReached through Nginx at https://projects.example.com
worker and cronBackground jobs and scheduled workSeparate services in the same stack
dbPostgreSQL databaseData lives in the pgdata volume
cacheMemcached for application cachingInternal service, not exposed publicly
proxyInternal Caddy proxy inside the stackForwards traffic to web; it does not replace your Nginx
/var/openproject/assetsProject attachments and filesMust be owned by UID/GID 1000
.envStack configurationNever commit to a public repo; it holds secrets
SECRET_KEY_BASERails session key derivationKeep it identical across restarts; changing it ends all sessions

Final checklist

  • Every service in docker compose ps is running without a restart loop.
  • curl -I http://127.0.0.1:8080 returns 200 or 302 from inside the VPS.
  • The default admin/admin password is changed and team accounts are created.
  • https://projects.example.com loads with a valid certificate and no browser warning.
  • One project, a few tasks, and one attachment were created as a flow test.
  • SECRET_KEY_BASE is stored in a password manager, not only in terminal history.
  • /var/openproject/assets and the database volume are included in your backup plan.

Routine maintenance is simple: occasionally pull repository updates (git pull origin stable/17), take a backup with the official control script (docker compose -f docker-compose.yml -f docker-compose.control.yml run backup) before upgrading, then restart the stack with --pull always. Never edit docker-compose.yml directly — put adjustments in docker-compose.override.yml so updates do not wipe them out.

How does your team track tasks today — spreadsheets, group chats, or another app? And which OpenProject feature do you need first: the Kanban board, the Gantt chart, or time tracking? Tell us in the comments, and if any step above fails on your VPS, paste the error message so it can be discussed together.

Baca juga: Rnevio's article “How to Install Docker and Docker Compose on an Ubuntu VPS” covers the foundation this guide builds on, while the companion guide in this batch is available at the Radicale guide for self-hosted calendars and contacts on a VPS.

Diskusi

Ada pertanyaan atau pengalaman yang ingin dibagikan?

0komentar

Komentar ditinjau sebelum ditampilkan. Mari berdiskusi dengan sopan dan sesuai topik.