Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
/ AstroLauncher Public archive

An easy to use Astroneer Dedicated Server installer and launcher

License

Notifications You must be signed in to change notification settings

ricky-davis/AstroLauncher

Repository files navigation

Contributors Forks Downloads Stargazers Issues MIT License


AstroLauncher - Dedicated Server Launcher

An all-in-one server management tool for Astroneer Dedicated Servers.

AstroLauncher Bugs · Request Feature

Table of Contents

Overview

This tool is perfect for you if you are hosting your own dedicated server for Astroneer. It has many features to make hosting a lot easier like automatic restarts, advanced logging, and a webinterface.

What does it do?

  1. Automatic initial download and updating of your server to the latest version!
  2. Verifies your network settings to check for Port Forwarding/NAT Loopback
  3. Automatically sets up the base Config files
  4. Fixes the double server problem in the server list
  5. Starts, and automatically restarts the server
  6. Displays when users join/leave the server
  7. Keeps a log of everything in the logs folder
  8. Ability to send all logs to a Discord webhook!
  9. Auto Restart every X hours
  10. Backup Retention for X hours
  11. Web Interface w/ login to monitor server data, force saves and restarts, and manage users (kick, ban, whitelist, admin)

INI File options

Below are the descriptions and defaults for the INI file options. Do not copy/paste this into the INI file, allow the INI file to be automatically generated. Every option must be present and set, and there must be no comments or extra options.

# Enables/Disables Auto Update for the Launcher
AutoUpdateLauncherSoftware = True

# Enables/Disables Auto Update for the Server.
AutoUpdateServerSoftware = True

# Allows the launcher and server to auto update every time the server restarts
UpdateOnServerRestart = True

# Disable the server console popup window.
HideServerConsoleWindow = False

# Disable the Launcher console popup window.
HideLauncherConsoleWindow = False



# Specifies how often the launcher will check for players joining/leaving
ServerStatusFrequency = 2

# Specifies how often the launcher will check for server registration status
PlayfabAPIFrequency = 2

# How many times to allow Playfab to fail before restarting the server
HeartBeatFailRestartServer = 8



# Disable Backup Retention
DisableBackupRetention = False

# How many hours of saves should the launcher retain
BackupRetentionPeriodHours= 72

# Location to backup the save files to
BackupRetentionFolderLocation = Astro\Saved\Backup\LauncherBackups



# Enable auto restart
EnableAutoRestart = False

# Timestamp you want to synchronize with. 00:00 or "midnight" work for midnight. Disable with "False". No quotes.
# Example: If set to 03:35, with AutoRestartEveryHours set to 6, it will restart at 03:35, 09:35, 15:35, and 21:35 every day
AutoRestartSyncTimestamp = 00:00

# After the first restart specified above, how often do you want to restart?
AutoRestartEveryHours = 24



# Disable the Port Forward / NAT Loopback check on startup
DisableNetworkCheck = False

# Always Overwrite the PublicIP setting in AstroServerSettings.ini
OverwritePublicIP = True

# Enable/Disable showing server FPS in console. This will probably spam your console when playing are in your server
ShowServerFPSInConsole = True

# When launched in Administrator Mode, Astro Launcher will attempt to automatically configure the firewall settings
AdminAutoConfigureFirewall = True

# How long to keep server logs before removing them. This does not control debug logs.
LogRetentionDays = 7



# Discord Webhook URL to display AstroLauncher console data in a discord channel
DiscordWebHookURL: str = ""

# Discord Webhook Log Level, all / cmd / chat
DiscordWebHookLevel: str = "cmd"

# This is the URL the webserver serves to interact with the webhook.
RODataURL: str = secrets.token_hex(16)



# Disable the Web Management Server
DisableWebServer = False

# Set the port you want the Web Management Server to run on
WebServerPort = 5000

# Automatically generated SHA256 password hash for the admin panel in the webserver
WebServerPasswordHash =

# The Base URL that the Web Server hosts at. '/astroneer' would be https://example.com/astroneer/ . Must start with and end with a /
WebServerBaseURL = /

# Enable HTTPS for the webserver. If no/wrong Cert/Key files are specified, defaults to False
EnableWebServerSSL = False

# Port you want to use if SSL works
SSLPort = 443

# Paths to Cert and Key files
SSLCertFile =
SSLKeyFile =



# CPU Affinity - Specify logical cores to run on. Automatically chooses if empty.
# ex:
#  CPUAffinity=0,1,3,5,9
CPUAffinity =

Getting Started

Recommended: Most people will want to just run the .exe, check out the Latest Release for a download of the executable.


To get a local "from-source" copy up and running follow these simple steps:

Prerequisites

  • Python 3.7
  • pip / pipenv

Installation

  1. Clone the AstroLauncher repository
git clone https://github.com/ricky-davis/AstroLauncher.git
  1. Install python modules using pip or pipenv
pip install -r requirements.txt
pipenv install

Usage

Run the server launcher using the following command

pipenv run python AstroLauncher.py



If not placed in the same directory as the server files, you can specify a server folder location like so

python AstroLauncher.py --path "steamapps\common\ASTRONEER Dedicated Server"
pipenv run python AstroLauncher.py -p "steamapps\common\ASTRONEER Dedicated Server"

Building an EXE

  1. If you want to turn this project into an executable, make sure to install pyinstaller using one of the following methods
pip install pyinstaller
pipenv install -d
  1. Run pyinstaller with the all-in-one flag
pyinstaller AstroLauncher.py -F --add-data "assets;./assets" --icon=assets/astrolauncherlogo.ico

or just run the BuildEXE.py which automatically cleans up afterwards

python BuildEXE.py
  1. Move the executable (in the new dist folder) to the directory of your choice. (If you want you can now delete the dist and build folders, as well as the .spec file)
  2. Run AstroLauncher.exe
AstroLauncher.exe -p "steamapps\common\ASTRONEER Dedicated Server"

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

If you have any questions you can join the Astroneer discord (discord.gg/Astroneer) and ask in the #self_host_talk channel

Project Link: https://github.com/ricky-davis/AstroLauncher