A comprehensive bash script for easily installing and managing FiveM servers on Linux. This enhanced installer provides an improved user experience with better logging, custom installation paths, and more configuration options.
- Easy Installation: Set up a FiveM server with just one command
- Enhanced Logging: Detailed logs for easy troubleshooting
- Custom Installation Paths: Choose where to install your server
- TxAdmin Integration: Deploy with TxAdmin or use cfx-server-data
- Auto-start Option: Configure crontab for automatic startup
- Database Support: Optional MariaDB/MySQL and phpMyAdmin installation
- User-friendly Interface: Clear menu options and guidance
- Automatic Updates: Keep your FiveM server up to date easily
Run the installer with a single command:
bash <(curl -s https://raw.githubusercontent.com/Dolyyyy/fiveminstaller/refs/heads/main/setup.sh)
Note: This script requires root permissions to install properly.
By default, the script runs in interactive mode, guiding you through the installation process with menus:
- Choose between installing a new server or updating an existing one
- Select installation path (defaults to
/home/FiveM
or user's home directory) - Choose deployment type (TxAdmin or cfx-server-data)
- Select FiveM version (latest, recommended, or custom)
- Configure optional features like auto-start and database
For automated installations, you can use various command line options:
bash <(curl -s https://raw.githubusercontent.com/Dolyyyy/fiveminstaller/refs/heads/main/setup.sh) \
--non-interactive \
--dir /path/to/install \
--crontab \
--version latest
Option | Description |
---|---|
-h, --help |
Display help message |
--non-interactive |
Skip all prompts, using default values or provided options |
-v, --version <URL|latest> |
Choose artifacts version (default: latest) |
-u, --update <path> |
Update the artifacts in the specified directory |
--no-txadmin |
Use cfx-server-data instead of TxAdmin |
-c, --crontab |
Enable automatic startup via crontab |
--kill-port |
Forcefully stop any process on the TxAdmin port (40120) |
--delete-dir |
Forcefully delete the installation directory if it exists |
-d, --dir <path> |
Specify a custom installation path |
Option | Description |
---|---|
-p, --phpmyadmin |
Install MariaDB/MySQL and phpMyAdmin |
--security |
Use security mode for phpMyAdmin (requires user and password) |
--simple |
Use simple mode for phpMyAdmin installation |
--db_user <name> |
Specify database username |
--db_password <password> |
Set database password |
--generate_password |
Generate a secure password automatically |
--reset_password |
Reset the database password if it exists |
--remove_db |
Remove and reinstall MySQL/MariaDB |
--remove_pma |
Remove and reinstall phpMyAdmin |
bash <(curl -s https://raw.githubusercontent.com/Dolyyyy/fiveminstaller/refs/heads/main/setup.sh)
bash <(curl -s https://raw.githubusercontent.com/Dolyyyy/fiveminstaller/refs/heads/main/setup.sh) -d /opt/my-fivem-server
bash <(curl -s https://raw.githubusercontent.com/Dolyyyy/fiveminstaller/refs/heads/main/setup.sh) -u /path/to/fivem
bash <(curl -s https://raw.githubusercontent.com/Dolyyyy/fiveminstaller/refs/heads/main/setup.sh) \
--non-interactive \
--phpmyadmin \
--simple
After successful installation, the script will:
- Start the TxAdmin interface automatically
- Provide a PIN for initial access (valid for 5 minutes)
- Show the URL for the web interface
- Create scripts for managing the server:
start.sh
: Start the FiveM serverstop.sh
: Stop the FiveM serverattach.sh
: Access the live console
- Save all installation information to
installation_info.txt
All installation logs are saved to /tmp/fivem_install.log
for troubleshooting.
Common issues:
- Port 40120 already in use: Use
--kill-port
to forcefully stop processes on that port - Directory already exists: Use
--delete-dir
to remove existing installation - Installation fails: Check the logs for detailed error messages
- OS: Ubuntu/Debian-based Linux distribution
- RAM: 4+ GB recommended (2GB minimum)
- CPU: 2+ cores recommended
- Storage: 4+ GB free space
- Network: Static IP recommended
- Root access or sudo privileges
- Original script by Twe3x
- Enhanced by Dolyyyy
- phpMyAdmin installer by JulianGransee
This project is licensed under the MIT License - see the LICENSE file for details.