Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6fbaf70
Changed track UI loading & other changes
Pringlez May 14, 2017
4efc5b5
Fixed a number of issues
Pringlez May 22, 2017
6bf1821
Update for 1.14 AC patch
Pringlez May 24, 2017
7c0f032
Fix for content path
Pringlez May 24, 2017
a50aaba
Small fix for 'contentPath' for cars
Pringlez Jun 12, 2017
17dfd57
Add uuid dependency
hmehta Nov 7, 2017
8069717
Add API for templates
hmehta Nov 7, 2017
4ad2c82
Add default server configuration template
hmehta Nov 7, 2017
eb079e3
Add TemplateService
hmehta Nov 7, 2017
5de09d7
Add TemplatesCtrl controller
hmehta Nov 7, 2017
9b0c625
Add Templates HTML
hmehta Nov 7, 2017
27faf6f
Merge pull request #8 from hmehta/add-template-support
Pringlez Nov 23, 2017
2311cbf
Add Laguna Seca track included in AC v1.16
hmehta Dec 21, 2017
33094ec
Update for v1.16
hmehta Dec 21, 2017
89f2cd8
Implement content management for tracks and cars
hmehta Nov 7, 2017
e6c0143
Merge pull request #9 from hmehta/v1.16
Pringlez Jan 2, 2018
18dc289
Merge pull request #10 from hmehta/hmehta-manage-tracks-and-cars
Pringlez Jan 14, 2018
368881d
Updating README & other small updates
Pringlez Jan 14, 2018
72bf3d9
Make entry list editable in-place
hmehta Apr 3, 2018
6841520
Add Restrictor support
hmehta Apr 3, 2018
580f727
Display last 2000 lines of acServer logs in Web UI
hmehta Apr 3, 2018
221994a
Add support for sTracker on Linux
hmehta Apr 3, 2018
acb7d8d
Merge pull request #13 from hmehta/hmehta-linux-stracker-support
Pringlez Apr 15, 2018
6e2f908
Merge pull request #12 from hmehta/hmehta-show-server-logs
Pringlez Apr 15, 2018
a2c4015
Merge pull request #11 from hmehta/hmehta-enhance-entry-list
Pringlez Apr 15, 2018
eb328fe
Intial commit for docker build file
Pringlez May 1, 2018
d8f0bd1
Updated docker file to fix pm2 start issues
Pringlez May 2, 2018
0d098fc
Removing NVM from docker image, app should start on boot now.
Pringlez May 3, 2018
c6c550c
Update readme's & docker file
Pringlez May 3, 2018
6294944
Changes to docker file to include meta data
Pringlez May 4, 2018
5da7466
Removing steamcmd install from the image
Pringlez May 5, 2018
31b93f8
Updating readme's
Pringlez May 5, 2018
87ad246
Update to docker build file & readme's
Pringlez May 7, 2018
cf3d0c4
Update to readme's
Pringlez May 7, 2018
99a5a82
Change to docker file & readme's
Pringlez May 15, 2018
45ee912
Updating readme's for recent found issue
Pringlez May 30, 2018
1a7bb18
added fs-copy-file-sync
May 31, 2018
0b1e877
Updating screenshots
Pringlez May 31, 2018
12ac5a8
Merge pull request #14 from TylerBre/master
Pringlez May 31, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM ubuntu:xenial

MAINTAINER John Walsh <pringlez@github.com>

ENV DEBIAN_FRONTEND=noninteractive

# Install System Updates & Packages
RUN groupadd -r gsa && useradd -r -d /home/gsa -g gsa gsa
RUN apt-get update \
&& apt-get install -y curl \
&& apt-get install -y lib32gcc1 \
&& apt-get install -y python-software-properties \
&& apt-get -y autoclean

# Args & Env Vars
ARG ACMANAGER_PORT=42555
ENV ACMANAGER_PORT=${ACMANAGER_PORT}

# Args & Meta
ARG VCS_REF
LABEL org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/Pringlez/ACServerManager"

# Install NodeJS, NPM & PM2
RUN apt-get install python-software-properties
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install nodejs
RUN npm install pm2 -g

# Install ACManager Files & Dependencies
RUN mkdir -p /home/gsa/server /home/gsa/acmanager
WORKDIR /home/gsa/acmanager
COPY . /home/gsa/acmanager
RUN npm install
RUN ./generate-frontend-content.sh
RUN chown -R gsa:gsa /home/gsa
RUN chmod -R 777 /home/gsa/acmanager

# Volumes & Ports
VOLUME /home/gsa/server
EXPOSE ${ACMANAGER_PORT}

# Starts ACServerManager
USER gsa
CMD ["pm2-runtime", "server.js"]
122 changes: 107 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,36 @@
# ACServerManager
Web based server manager for Assetto Corsa directly manipulating the ini files on the server as an alternative to the windows app and having to copy files to your server.
![ac-logo](https://www.assettocorsa.net/wp-content/themes/AssettoCorsa/00-Style-Dev/ico/mstile-150x150.png)

Web based server manager for Assetto Corsa Server, that directly manipulating the ini files on the server as an alternative to the windows app and having to copy files to your server.

Start and stop the server, and stracker directly from the application, meaning you can make changes to the server configuration and restart the server directly from your browser or mobile phone.

Docker image available, see details below.

## ACServerManager on Windows
This is the installation guide for a Windows machine, to review the Linux installation guide go [here](https://github.com/jo3stevens/ACServerManager/blob/master/README_Linux.md).

## Updates
01/05/2018
* Dockerized! - Adding Docker build file to allow ACServerManager run in a container.

25/12/2017
* Add support for uploading tracks (both single and multi-layout) and cars
* Add support for removing existing tracks and cars
* Bumping version of ACManager to 1.0.0!

21/12/2017
* Update for 1.16 AC patch
* Added local car / skins generation script for v1.16 AC original + DLC content

24/05/2017
* Update for 1.14 AC patch
* Fixed a number of saving issues
* Added local car & track content option

27/01/2017:
* Update to UI layout
* Added restart feature for AC & sTracker server
* Added restart feature for ACServer & sTracker server

17/10/2015:
* Bug fix when switching between two tracks with multiple track configs
Expand All @@ -19,8 +40,8 @@ This is the installation guide for a Windows machine, to review the Linux instal
22/08/2015:
* Finished adding all the new settings from 1.2 including tyres and weather

## Prep
NOTE: If you've been using the new windows server manager that came with 1.2 then you may not need this step as when you package the server files it does the same thing.
## Installation Details
Note, if you've been using the new windows server manager that came with 1.2 then you may not need this step as when you package the server files it does the same thing.

The application needs some additional files added to the server/content/tracks and server/content/cars folders to be able to choose track configurations and car skins.

Expand All @@ -33,6 +54,8 @@ For cars it will copy the skins/* folder structure but not the files; this is ju
## Install Node.js
To install Node.js, follow the installation guide on its home page [here](https://nodejs.org).

I recommend using node version **v8.5.0** or newer, because of the upload content feature. Please see [comment](https://github.com/jo3stevens/ACServerManager/pull/36#issuecomment-393233010) for more information.

## Install ACServerManager
Create a directory called 'acmanager', go into that directory and click [here](https://github.com/jo3stevens/ACServerManager/archive/master.zip) to download the latest version. Extract
the contents of the zip file into the directory.
Expand All @@ -42,12 +65,14 @@ To configure your manager's settings, open the 'settings.js' file. You'll see a
to your Assetto Corsa Server directory. You can configure your username, password & port settings for ACServerManager, also
if you use sTracker, point the 'sTrackerPath' variable to your installation.

* serverPath: The path to your server folder containing acServer.exe
* sTrackerPath: The path to your stracker folder container stracker.exe (If you don't run stracker just leave this as an empty string ('') to disable it
* serverPath: The path to your Assetto Corsa server directory
* contentPath: The path to your Assetto Corsa content directory, use this if hosting on the same machine for gaming. Leave blank if hosting on Linux.
* useLocalContent: If set to true, then ACServerManager will look for local car / track content
* sTrackerPath: The path to your sTracker directory that contains stracker.exe (If you don't run stracker just leave this as an empty string ('') to disable it
* username/password: Set these values if you want basic authentication on the application
* port: The port that the application will listen on (Be sure to open up this port on firewalls)
* port: The port that the application will listen on (Be sure to open up this port on your firewall)

Note: I've currently set the Assetto Corsa Server installation to one directory up in 'server', change if necessary.
**Note:** The Assetto Corsa Server installation directory is set to '../server', change if necessary.

## Firewall
If your machine has a firewall enabled (i.e) windows firewall, you'll need to open / allow the ACServerManager port defined in your settings.js file.
Expand All @@ -59,30 +84,97 @@ npm install
```
To run ACServerManager, execute the 'start.bat' file. If you see no errors, ACServerManager should now be running.

## Docker Image
You can use the docker image easily run the entire ACServerManager inside a container. The build currently grabs the latest version of steamcmd & installs all the necessary files, dependencies & executables on top of a ubuntu:xenial (16.04) image.

[![](https://images.microbadger.com/badges/image/pringlez/acserver-manager.svg)](https://microbadger.com/images/pringlez/acserver-manager "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/pringlez/acserver-manager.svg)](https://microbadger.com/images/pringlez/acserver-manager "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/commit/pringlez/acserver-manager.svg)](https://microbadger.com/images/pringlez/acserver-manager "Get your own commit badge on microbadger.com")

Pull the latest image:
```
docker pull pringlez/acserver-manager
```
To run the container:
```
sudo docker run -d --name acserver-manager --restart unless-stopped --net=host -e PUID=<UID> -e PGID=<GID> -e TZ=<timezone> -v </path/to/acserver>:/home/gsa/server pringlez/acserver-manager
```

Then just visit your server's address + ACServerManager port in your browser!

**Note:** If you want to change the port number the application runs on, you can build your own local image using the example below & pass in the desired port number in the parameter.

If you need to login to the running docker container:
```
docker exec -it acserver-manager /bin/bash
```

### Parameters
The parameters you need to include are the following:

* --net=host - Shares host networking with container, required.
* --restart unless-stopped - This will restart your container if it crashes
* -v /home/gsa/server - Volume mount the ACServer installation directory (Required)
* -e PGID for for GroupID - see below for explanation
* -e PUID for for UserID - see below for explanation
* -e TZ for timezone information, Europe/London

### User / Group Identifiers
Sometimes when using data volumes (-v flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user PUID and group PGID. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" <sup>TM</sup>.

In this instance PUID=1001 and PGID=1001. To find yours use id user as below:
```
$ id <dockeruser>
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
```

#### Config Saving Issues
If you have issues saving the configuration settings in ACServerManager application, while it's running in the docker container. Try 'chmod 777' your ACServer directory. This should allow the application inside the container access the mounted ACServer volume.

### Building an Image
You can however build a local image if want to include any new changes to ACServerManager.

You need to specify the ports you'll be using for the ACServerManager. The docker build will expose the ports you specify.

Build a local docker image by:
```
docker build --build-arg ACMANAGER_PORT=42555 --build-arg VCS_REF=`git rev-parse --short HEAD` -t pringlez/acserver-manager .
```

## Using ACServerManager
* Browse to the application using your servers IP and the chosen port (or any DNS configured)
* Click the 'Start' button under Assetto Corsa Server section
* If using sTracker wait until the AC server has started and then click 'Start' in the sTracker Server section
* If using sTracker wait until the ACServer has started and then click 'Start' in the sTracker Server section

The server should now be running. You'll be able to see any server output in the command window and it will be logged to a file in the 'ACServerManager/log' folder.

You can change any of settings and it will be applied directly to server_cfg.ini and entry_list.ini on the server. After making a change just stop and start the server from the Server Status page to apply the changes to Assetto Corsa Server.

Note, the server may fail to start in some cases if the Assetto Corsa Server cannot connect to the master server. Make sure you portforward / open
**Note:** The server may fail to start in some cases if the Assetto Corsa Server cannot connect to the master server. Make sure you portforward / open
the necessary ports for the server to function correctly.

## Screenshots
### Server Status
![Server Status](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-1.JPG)
![Server Status](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-1.jpg)

### Server Configuration
![Server Config](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-2.JPG)
![Server Config](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-2.jpg)

### Entry List
![Entry List](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-3.JPG)
![Entry List](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-3.jpg)

### Rules
![Rules](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-4.JPG)
![Rules](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-4.jpg)

### Advanced
![Advanced](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-5.JPG)
![Advanced](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-5.jpg)

### Templates
![Templates](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-6.jpg)

### Tracks
![Tracks](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-7.jpg)

### Cars
![Cars](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-8.jpg)

### Help
![Help](http://deltahosting.dyndns.org:8080/acmanager/screen-cap-9.jpg)
Loading