Change the port Bitbucket listens on
Administer Bitbucket Data Center and Server
- Users and groups
- Advanced repository management
- External user directories
- Global permissions
- Setting up your mail server
- Integrate with Atlassian applications
- Connect Bitbucket to an external database
- Migrating Bitbucket Server to another server
- Run Bitbucket in AWS
- Specify the Bitbucket base URL
- Configuring the application navigator
- Managing apps
- View and configure the audit log
- Update your license key
- Configuration properties
- Change Bitbucket's context path
- Data recovery and backups
- Disable HTTP(S) access to Git repositories
- Smart Mirroring
- Export and import projects and repositories
- Git Large File Storage
- Git Virtual File System (GVFS)
- Enable SSH access to Git repositories
- Use diff transcoding
- Change the port Bitbucket listens on
- Lockout recovery process
- Proxy and secure Bitbucket
- High availability for Bitbucket
- Diagnostics for third-party apps
- Enabling JMX counters for performance monitoring
- Enable debug logging
- Scaling Bitbucket Server
- Add a shortcut link to a repository
- Administer code search
- Adding additional storage for your repository data
- Add a system-wide announcement banner
- Configuring Project links across Applications
- Improving instance stability with rate limiting
- Use a CDN with Atlassian Data Center applications
- Managing personal access tokens
- Connecting to a 3rd party application using Application Links
- Setting a system-wide default branch name
- Automatically decline inactive pull requests
- Encrypt database password
- Data pipeline
On this page
Related content
- Installing Jira applications on Windows from Zip File
- Installing Jira applications on Windows
- Important directories and files
- Changing Jira application TCP ports
- Running the setup wizard
- Installing Jira applications on Linux
- Setting your Jira application home directory
- Jira application home directory
- Installing Jira applications on Linux from Archive File
- Advanced Jira application configuration
You can change the port that Bitbucket Data Center and Server listens on from the default '7990
' to a different value if another application is already running on that port.
You can use netstat to identify free ports on your machine.
To change the port Bitbucket listens on
- Navigate to your home directory.
Open the
shared/bitbucket.properties
file, add thesever.port
property (or edit it if a line for theserver.port
property already exists), and set the value to the port number Bitbucket will run on. For example, to set to the port to8080
you would add:server.port=8080
Then save the file.
Restart Bitbucket so the change takes effect. See Start and stop Bitbucket.
Important considerations
If you are using a firewall, ensure that it is configured to allow HTTP or HTTPS traffic over the connector port you have chosen.
If you are running Bitbucket on a Linux server and want to bind to privileged ports (those below 1024, for example port 80), you will need to start Bitbucket as root to successfully bind to the port. However; we don't recommend that you start Bitbucket as root and instead do one of the following:
- Bind Bitbucket to a port over 1024 and configure a load balancer in front of the server to redirect traffic from port 80 to the higher port. Learn more about load balance configuration options
- Bind Bitbucket to a port over 1024 and configure
iptables
to redirect traffic from port 80 to the higher port - Use
setcap
to allow privileged port access forjava
processes. For more information, see Running Bitbucket Server on a privileged port without root
Related content
- Installing Jira applications on Windows from Zip File
- Installing Jira applications on Windows
- Important directories and files
- Changing Jira application TCP ports
- Running the setup wizard
- Installing Jira applications on Linux
- Setting your Jira application home directory
- Jira application home directory
- Installing Jira applications on Linux from Archive File
- Advanced Jira application configuration