This page last changed on Oct 18, 2006 by ivan@atlassian.com.
Reasons For Hosting Confluence As A Service
If you are hosting Confluence on a Windows-based server, installation as a Windows Service offers these advantages:
- Automated Confluence recovery after server restart
- Improved troubleshooting through logging server output to file
The guide below applies only to Confluence 2.2.0 onwards on Windows. Windows users running older versions should use the Start Confluence automatically on Windows as a Service (Pre 2.2) guide.
Installing Confluence Standalone As A Service
From your Windows-based server running Confluence 2.2 standalone or later:
- Open a command prompt in the <CONFLUENCE-INSTALL>/bin directory
- Confirm that the JAVA_HOME variable is set to the JDK base directory with the command
Note that any directory in the path with spaces (eg. C:\Program Files must be converted to its eight-character equivalent (eg. C:\Progra~1)
- Install the service with default settings with the command
service.bat install Confluence
- In addition, to have the service start automatically when the server starts, run
- If you have a less than a 512 meg of memory, skip this step. For users with large Confluence installs, you can increase the maximum memory Confluence can use (default will already be 256MB). For example, you can set the maximum memory to 512 megs using
- If you do not have any JVM parameters you pass to your freestanding version of Confluence, you can skip this step. If you do, add them to the service using
- For any further configuration, check out the Tomcat Windows Service How-To guide
- Go to Control Panel -> Administrative Tools -> Services -> Apache Tomcat Confluence and right click on Properties to verify the settings are correct
- If you wish to run the service a non-administrator user for security, or if you are using network drives for backups, attachments or indexes, you can run the service as another user. To change users, open the Apache Tomcat Confluence properties, go to the "Log On" tab and enter their username and password. Go to Control Panel -> User Accounts and confirm that the user has write permissions for the %CATALINA_HOME%, index and database directories. Note that any network drives must be specified by UNC and not letter mappings (eg. \\backupserver\jira not z:\jira)
Confluence is now be installed as a service, but will not automatically start up until the next server reboot
- Start the Confluence service with the command
Controlling Confluence As A Service
The Confluence service can be controlled from the command prompt
- Stop Confluence with
- Uninstall the Confluence service with
service.bat remove Confluence
Troubleshooting Confluence While Running As A Service
When investigating memory issues or bugs, it may be useful to view Confluence's Garbage Collection information. To turn on the verbose garbage collection, use the command
Related Topics
Start Confluence automatically on system startup
|