Skip to content

Commit

Permalink
Merge pull request #13 from nextcloud/fix/9/fix-credential-screen
Browse files Browse the repository at this point in the history
fix the initial credential screen
  • Loading branch information
LukasReschke authored Dec 1, 2021
2 parents 3f67259 + fe3079e commit 9ee27cb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
1 change: 0 additions & 1 deletion php/src/Controller/DockerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ public function StartContainer(Request $request, Response $response, $args) : Re
// set AIO_TOKEN
$config['AIO_TOKEN'] = bin2hex(random_bytes(24));
$this->configurationManager->WriteConfig($config);
$this->configurationManager->SetIsContainerUpateAvailable(false);

// Stop domaincheck since apache would not be able to start otherwise
$this->StopDomaincheckContainer();
Expand Down
10 changes: 0 additions & 10 deletions php/src/Data/ConfigurationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ public function GetToken() : string {
return $this->GetConfig()['AIO_TOKEN'];
}

public function GetIsContainerUpateAvailable() : bool {
return isset($this->GetConfig()['isContainerUpateAvailable']) ? $this->GetConfig()['isContainerUpateAvailable'] : false;
}

public function SetIsContainerUpateAvailable(bool $value) : void {
$config = $this->GetConfig();
$config['isContainerUpateAvailable'] = $value;
$this->WriteConfig($config);
}

public function SetPassword(string $password) : void {
$config = $this->GetConfig();
$config['username'] = 'admin';
Expand Down
4 changes: 0 additions & 4 deletions php/src/Docker/DockerActionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,8 @@ private function isContainerUpdateAvailable(string $id) : string
public function isAnyUpdateAvailable() {
$id = 'nextcloud-aio-apache';

if ($this->configurationManager->GetIsContainerUpateAvailable()) {
return true;
}

if ($this->isContainerUpdateAvailable($id) !== "") {
$this->configurationManager->SetIsContainerUpateAvailable(true);
return true;
} else {
return false;
Expand Down
29 changes: 23 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,21 @@ Included are:

## How to use this?
1. Install Docker on your Linux installations using:

```
curl -fsSL get.docker.com | sudo sh
```
2. Run the following command:
2. Make sure that the docker group has the correct groupid:

```
sudo groupmod -g 998 docker
```
3. Make sure to pull the latest image:

```
sudo docker pull nextcloud/all-in-one:latest
```
4. Run the following command in order to start the container:

```
sudo docker run -it \
Expand All @@ -32,13 +43,19 @@ sudo docker run -it \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest
```
3. After the initial startup, you should be able to open the Nextcloud AIO Interface now on port 8080 of this server.<br>
5. After the initial startup, you should be able to open the Nextcloud AIO Interface now on port 8080 of this server.<br>
E.g. https://internal.ip.of.this.server:8080<br>
If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatially by opening the Nextcloud AIO Interface via:<br>
https://your-domain-that-points-to-this-server.tld:8443

Explanation of used ports:
### Which ports are mandatory to be open?
Only those (if you acces the Mastercontainer Interface internally via port 8080):
- `443/TCP` for the Nextcloud container
- `3478/TCP` and `3478/UPD` for the Talk container

- `80`: redirects to Nextcloud (HTTP) (is used for getting the certificate via ACME http-challenge for mastercontainer)
- `8080`: Master Container Interface with self-signed certificate (HTTPS) (works always, also if only access via IP-address is possible, e.g. `https://internal.ip.address:8080/`)
- `8443`: Master Container Interface with valid automatic certificate via Let's Encrypt! (HTTPS) (Only works if you access the container via a public domain, e.g. `https://public.domain.com:8443/` and not via IP-address.)
### Explanation of used ports:
- `8080/TCP`: Mastercontainer Interface with self-signed certificate (works always, also if only access via IP-address is possible, e.g. `https://internal.ip.address:8080/`)
- `80/TCP`: redirects to Nextcloud (is used for getting the certificate via ACME http-challenge for the Mastercontainer)
- `8443/TCP`: Mastercontainer Interface with valid certificate (only works if port 80 and 8443 are open and you point a domain to your server. It generates a valid certificate then automatically and access via e.g. `https://public.domain.com:8443/` is possible.)
- `443/TCP`: will be used by the Nextcloud container later on and needs to be open
- `3478/TCP` and `3478/UPD`: will be used by the Turnserver inside the Talk container and needs to be open

0 comments on commit 9ee27cb

Please sign in to comment.