How to Manually Install Redmine 6.0.6 on Ubuntu 24.04
This guide explains how to manually install and configure Redmine 6.0.6 on Ubuntu 24.04. The commands below perform the same main installation steps as the Redmine Ansible playbook.
1. Requirements
Before starting, make sure you have:
- Ubuntu 24.04 server
- sudo/root access
- Internet access
- A server IP address
- At least a few GB of free disk space
This installation uses:
- Redmine 6.0.6
- MariaDB
- Ruby
- Bundler
- Puma
- Apache2
2. Update Ubuntu
First, update the Ubuntu package list.
sudo apt update
Upgrade installed packages if required:
sudo apt upgrade -y
3. Repair Ubuntu Package Configuration
The Ansible playbook first checks whether Ubuntu has any interrupted package installations. Run:
sudo dpkg --configure -a
Then repair broken packages:
sudo apt --fix-broken install -y
4. Install Required Packages
Redmine requires Ruby, MariaDB, Apache and several development libraries. Install the packages used by the playbook:
sudo apt install -y \
apache2 \
build-essential \
curl \
git \
imagemagick \
libdb-dev \
libffi-dev \
libgdbm-dev \
libmagickwand-dev \
libmariadb-dev \
libmariadb-dev-compat \
libreadline-dev \
libssl-dev \
libyaml-dev \
mariadb-client \
mariadb-server \
ruby \
ruby-dev \
tar \
zlib1g-dev
Verify Ruby was installed:
ruby --version
Verify MariaDB:
mariadb --version
5. Start and Enable MariaDB
MariaDB is the database server that Redmine will use.
sudo systemctl enable --now mariadb
Check that MariaDB is running:
sudo systemctl status mariadb
Look for: active (running).
Press q to leave the status screen.
6. Create the Redmine Database
The Ansible playbook creates a database called: redmine.
Open the MariaDB console:
sudo mariadb
At the MariaDB prompt, run:
CREATE DATABASE redmine CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Create the Redmine database user:
CREATE USER 'redmine'@'127.0.0.1' IDENTIFIED BY 'ChangeThisRedminePassword123!';
Give the Redmine user permission to use the database:
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'127.0.0.1';
Reload the database privileges:
FLUSH PRIVILEGES;
Exit MariaDB:
EXIT;
database.yml.7. Download Redmine 6.0.6
Create a temporary directory:
sudo mkdir -p /tmp/redmine-extract
Download Redmine 6.0.6:
cd /tmp
sudo curl -L -o redmine-6.0.6.tar.gz https://www.redmine.org/releases/redmine-6.0.6.tar.gz
Extract Redmine:
sudo tar -xzf /tmp/redmine-6.0.6.tar.gz -C /tmp/redmine-extract
Check that the Redmine directory exists:
ls -la /tmp/redmine-extract
8. Create the Redmine User
The playbook creates a dedicated Linux user called redmine.
Create the group:
sudo groupadd redmine
If Ubuntu reports that the group already exists, that is okay.
Create the Redmine user and home directory:
sudo useradd -r -m -d /opt/redmine -g redmine -s /bin/bash redmine
Create the Redmine installation directory:
sudo mkdir -p /opt/redmine
9. Copy Redmine to /opt/redmine
Copy the extracted Redmine files into the installation directory:
sudo cp -a /tmp/redmine-extract/redmine-6.0.6/. /opt/redmine/
Give the Redmine user ownership of the files:
sudo chown -R redmine:redmine /opt/redmine
10. Configure Redmine Database Connection
Create the Redmine database configuration file:
sudo nano /opt/redmine/config/database.yml
Paste the following:
production:
adapter: mysql2
database: redmine
host: 127.0.0.1
port: 3306
username: redmine
password: "ChangeThisRedminePassword123!"
encoding: utf8mb4
variables:
tx_isolation: "READ-COMMITTED"
Save the file:
- Press Ctrl + O
- Press Enter
- Press Ctrl + X
Secure the file so that only the Redmine user can read it:
sudo chown redmine:redmine /opt/redmine/config/database.yml
sudo chmod 600 /opt/redmine/config/database.yml
11. Add Puma
Puma is the web server that runs the Redmine Ruby application. The playbook adds Puma to Gemfile.local.
sudo nano /opt/redmine/Gemfile.local
Add:
gem 'puma'
Save with Ctrl + O, press Enter, then press Ctrl + X.
Make sure the Redmine user owns the file:
sudo chown redmine:redmine /opt/redmine/Gemfile.local
12. Install Bundler
Bundler manages the Ruby libraries required by Redmine.
sudo gem install bundler --no-document
Check that Bundler is available:
bundle --version
13. Configure Bundler
Change to the Redmine user:
sudo -u redmine -H bash
Change to the Redmine directory:
cd /opt/redmine
Configure Bundler so development and test dependencies are not installed:
bundle config set --local without 'development test'
14. Install Redmine Ruby Dependencies
Run Bundler to install the Ruby dependencies:
RAILS_ENV=production bundle install --jobs 4 --retry 3
This step may take several minutes.
15. Generate the Redmine Secret Token
Still logged in as the Redmine user, run:
RAILS_ENV=production bundle exec rake generate_secret_token
16. Run the Redmine Database Migration
Redmine needs to create its database tables.
RAILS_ENV=production bundle exec rake db:migrate
Wait until the command finishes successfully.
17. Create Required Redmine Directories
Create the directories required by Redmine:
mkdir -p /opt/redmine/files
mkdir -p /opt/redmine/log
mkdir -p /opt/redmine/tmp
mkdir -p /opt/redmine/tmp/pids
mkdir -p /opt/redmine/public/plugin_assets
Exit the Redmine user shell:
exit
Make sure all Redmine files have the correct ownership:
sudo chown -R redmine:redmine /opt/redmine
18. Configure Puma
Create the Puma configuration:
sudo nano /opt/redmine/config/puma.rb
Paste:
directory "/opt/redmine"
environment "production"
workers 0
threads 0, 5
bind "tcp://127.0.0.1:3000"
pidfile "/opt/redmine/tmp/pids/puma.pid"
state_path "/opt/redmine/tmp/pids/puma.state"
stdout_redirect "/opt/redmine/log/puma.stdout.log", "/opt/redmine/log/puma.stderr.log", true
Save and exit Nano:
- Ctrl + O
- Enter
- Ctrl + X
Set ownership:
sudo chown redmine:redmine /opt/redmine/config/puma.rb
19. Create the Redmine Systemd Service
Systemd will allow Redmine to start automatically when Ubuntu boots.
Create the service file:
sudo nano /etc/systemd/system/redmine.service
Paste:
[Unit]
Description=Redmine Rails Application
After=network.target mariadb.service
Wants=mariadb.service
[Service]
Type=simple
User=redmine
Group=redmine
WorkingDirectory=/opt/redmine
Environment=RAILS_ENV=production
Environment=RAILS_SERVE_STATIC_FILES=true
Environment=PATH=/usr/local/bin:/usr/bin:/bin
ExecStart=/usr/local/bin/bundle exec puma -C /opt/redmine/config/puma.rb
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Save the file and exit Nano.
20. Reload Systemd
Tell Ubuntu that a new systemd service has been created:
sudo systemctl daemon-reload
21. Start Redmine
Enable Redmine so that it starts automatically after a reboot:
sudo systemctl enable redmine
Start Redmine:
sudo systemctl start redmine
Check the service:
sudo systemctl status redmine
The expected result is: Active: active (running)
22. Check Redmine Port 3000
The playbook configures Puma to listen internally on port 3000.
sudo ss -ltnp | grep :3000
You should see Redmine/Puma listening on:
127.0.0.1:3000
This means Puma is running locally and Apache will forward web traffic to it.
23. Configure Apache
Apache will act as the web server and reverse proxy for Redmine.
Enable the required Apache modules:
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod headers
24. Configure Apache ServerName
Create the Apache ServerName configuration:
sudo nano /etc/apache2/conf-available/servername.conf
Add:
ServerName 127.0.0.1
Save and exit Nano.
Enable the configuration:
sudo a2enconf servername
25. Create the Redmine Apache Site
Create the Apache configuration:
sudo nano /etc/apache2/sites-available/redmine.conf
Paste:
<VirtualHost *:80>
ServerName _
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
RequestHeader set X-Forwarded-Proto "http"
ErrorLog ${APACHE_LOG_DIR}/redmine_error.log
CustomLog ${APACHE_LOG_DIR}/redmine_access.log combined
</VirtualHost>
Save and exit Nano.
26. Enable the Redmine Apache Site
sudo a2ensite redmine.conf
27. Configure Apache Ports
The supplied playbook deliberately does not configure Apache to use port 443 because the Wazuh Dashboard is already using that port.
Apache is configured to listen on ports 80 and 8443.
Open the Apache ports configuration:
sudo nano /etc/apache2/ports.conf
Replace the contents with:
Listen 80
Listen 8443
Save and exit Nano.
28. Disable the Elasticsearch SSL Apache Site
The supplied playbook disables the Elasticsearch SSL Apache site if it exists.
Run:
sudo a2dissite elasticsearch-le-ssl.conf
If Ubuntu says that the site does not exist, you can safely continue.
29. Test Apache Configuration
Before restarting Apache, always test the configuration.
sudo apache2ctl configtest
The expected result is:
Syntax OK
30. Restart Apache
Enable Apache:
sudo systemctl enable apache2
Restart Apache:
sudo systemctl restart apache2
Check Apache:
sudo systemctl status apache2
The expected result is: active (running).
31. Verify All Important Services
Check MariaDB:
sudo systemctl is-active mariadb
Check Redmine:
sudo systemctl is-active redmine
Check Apache:
sudo systemctl is-active apache2
All three should return:
active
32. Check Listening Ports
Run:
sudo ss -ltnp
According to the supplied playbook, the important Redmine-related ports are:
| Port | Purpose |
|---|---|
| 80 | Apache HTTP |
| 3000 | Redmine/Puma internal application port |
| 8443 | Apache alternate listener |
| 3306 | MariaDB |
| 443 | Not used by Apache in this playbook because Wazuh uses it |
33. Open Redmine in a Web Browser
Find the IP address of your Ubuntu server:
hostname -I
You should receive an address similar to:
192.168.1.100
Open a web browser and enter:
http://YOUR_SERVER_IP/
For example:
http://192.168.1.100/
Apache receives the request on port 80 and forwards it to Redmine/Puma on the internal port 3000.
34. Troubleshooting Redmine
Redmine service is not running
sudo systemctl status redmine
View the detailed Redmine logs:
sudo journalctl -u redmine -n 100 --no-pager
You can also check the Puma logs:
sudo tail -n 100 /opt/redmine/log/puma.stderr.log
sudo tail -n 100 /opt/redmine/log/puma.stdout.log
Apache is not working
Check the Apache configuration:
sudo apache2ctl configtest
Check Apache:
sudo systemctl status apache2
View the Redmine Apache error log:
sudo tail -n 100 /var/log/apache2/redmine_error.log
Redmine cannot connect to MariaDB
Check MariaDB:
sudo systemctl status mariadb
Test the Redmine database login:
mariadb -h 127.0.0.1 -u redmine -p redmine
Enter the Redmine database password when requested.
35. Installation Summary
If the installation was successful, the setup should look like this:
| Component | Configuration |
|---|---|
| Operating System | Ubuntu 24.04 |
| Application | Redmine 6.0.6 |
| Application directory | /opt/redmine |
| Database | MariaDB |
| Database name | redmine |
| Database user | redmine |
| Ruby application server | Puma |
| Puma port | 3000 |
| Web server | Apache2 |
| Apache HTTP | Port 80 |
| Apache alternate port | 8443 |
| HTTPS port 443 | Not configured for Apache because Wazuh uses port 443 |
Redmine should now be running on the Ubuntu 24.04 server. Access it using
http://YOUR_SERVER_IP/.Note: This article is based on the supplied Redmine 6.0.6 Ansible playbook. The manual commands reproduce the installation flow defined by that playbook rather than providing a separate alternative deployment method.

