# \[SOLVED\] Mattermost-push-proxy - Readme Instructions incomplete?

**URL:** <https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220>\
**Category:** Troubleshooting\
**Created:** [December 8, 2017, 9:23pm UTC](https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220 "2017-12-08T21:23:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![oscott](https://avatars.discourse-cdn.com/v4/letter/o/eada6e/32.png) [@oscott](https://forum.mattermost.com/u/oscott)\
**Post date:** [December 8, 2017, 9:23pm UTC](https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220/1 "2017-12-08T21:23:40Z")

</div>

Hey there, I followed the setup instructions for

mattermost-push-proxy from

> **[mattermost/mattermost-push-proxy](https://github.com/mattermost/mattermost-push-proxy)**
>
> Contribute to mattermost/mattermost-push-proxy development by creating an account on GitHub.

But am unable to connect to 127.0.0.1 over 8066

When I check out the logs I see

/bin/sh: 1: exec: bin/mattermost-push-proxy: not found

Which makes sense because mattermost-push-proxy isn’t in bin!

Did I miss something obvious in the instructions? There was no mention of making / building the application. Does that need to be done? If so are there instructions on that? I tried but kept hitting errors.

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![lindy65](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/lindy65/32/1811_2.png) [@lindy65](https://forum.mattermost.com/u/lindy65)\
**Post date:** [December 11, 2017, 6:27am UTC](https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220/2 "2017-12-11T06:27:11Z")

</div>

Hi @oscott,

Thanks for your feedback,

Not sure whether these mobile app docs will help with regards your question of building the app?:

- [https://docs.mattermost.com/mobile/mobile-overview.html](https://docs.mattermost.com/mobile/mobile-overview.html)
- [https://docs.mattermost.com/mobile/mobile-compile-yourself.html](https://docs.mattermost.com/mobile/mobile-compile-yourself.html)

Let us know if you still have questions and we can troubleshoot further.

---

<div class="post-metadata">

**Author:** ![ronaldjhp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/ronaldjhp/32/1878_2.png) [@ronaldjhp](https://forum.mattermost.com/u/ronaldjhp)\
**Post date:** [January 14, 2018, 1:09am UTC](https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220/3 "2018-01-14T01:09:08Z")

</div>

Hi @oscott, did you resolve this issue? I am also having the same issue:

/bin/sh: 1: exec: bin/mattermost-push-proxy: not found

Thank you for your time.

---

<div class="post-metadata">

**Author:** ![Dev2](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Dev2](https://forum.mattermost.com/u/Dev2)\
**Post date:** [February 4, 2018, 11:30am UTC](https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220/4 "2018-02-04T11:30:21Z")

</div>

I’m having the same issue. Step 6. in the GitHub instructions lined above in the OP. The issue is getting Upstart daemon to start /etc/init/matter-most-push-proxy.conf.

Commenting out the line

```
exec bin/mattermost-push-proxy | logger

```

Allows the process to start but it obviously necessary for running the proxy.

@ronaldjhp @oscott

Edit:

I figured it out – it kept saying start: Job failed to start but I ran:

```
cut -d: -f1 /etc/passwd

```

Realized I had no user called ubuntu. I made one up called mattermost-proxy-push and used that beside the

```
setuid mattermost-push-proxy

```

command in the script. If the lads had of fleshed out Step 2 a bit more I might not have made this error.

---

<div class="post-metadata">

**Author:** ![lindy65](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/lindy65/32/1811_2.png) [@lindy65](https://forum.mattermost.com/u/lindy65)\
**Post date:** [February 6, 2018, 8:44am UTC](https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220/5 "2018-02-06T08:44:42Z")

</div>

Thanks for posting back your resolution @Dev2!

I’m pleased the issue is resolved!

Would you be interested in making a pull request to improve the documentation where you find it lacking in explanation?

---

<div class="post-metadata">

**Author:** ![Dev2](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Dev2](https://forum.mattermost.com/u/Dev2)\
**Post date:** [February 7, 2018, 10:42am UTC](https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220/6 "2018-02-07T10:42:26Z")

</div>

@lindy65 Maybe just going with the guides own recommendation and issuing a step of creating a user called mattermost-push-proxy and updating the script to include that user handle and leaving out the “ubuntu for simplicity” would be a better approach. I thought ubuntu was a default account already created for such purposes on ubuntu. This would replace a conceptual example with a working one.

I should wait till I at least have push notifications fully working before giving a pull request.

---

<div class="post-metadata">

**Author:** ![lindy65](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/lindy65/32/1811_2.png) [@lindy65](https://forum.mattermost.com/u/lindy65)\
**Post date:** [February 8, 2018, 6:55am UTC](https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220/7 "2018-02-08T06:55:42Z")

</div>

Thanks for the feedback @Dev2,

Let us know if you need any help once you get to the stage of submitting a pull request 🙂

---

<div class="post-metadata">

**Author:** ![ronaldjhp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/ronaldjhp/32/1878_2.png) [@ronaldjhp](https://forum.mattermost.com/u/ronaldjhp)\
**Post date:** [February 10, 2018, 4:03am UTC](https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220/8 "2018-02-10T04:03:13Z")

</div>

Hey @Dev2,  
-Did you resolve the issue?  
-What are you getting executing this :  
curl [http://127.0.0.1:8066/api/v1/send\_push](http://127.0.0.1:8066/api/v1/send_push) -X POST -H “Content-Type: application/json” -d ‘{ “message”:“test”, “badge”: 1, “platform”:“apple”, “server\_id”:“MATTERMOST\_DIAG\_ID”, “device\_id”:“IPHONE\_DEVICE\_ID”}’

Thanks.

---

<div class="post-metadata">

**Author:** ![Dev2](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Dev2](https://forum.mattermost.com/u/Dev2)\
**Post date:** [February 18, 2018, 9:34pm UTC](https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220/9 "2018-02-18T21:34:49Z")

</div>

@ronaldjhp

I’m on **Ubuntu 14.04** though as per the instructions at the top:

I initially got connection refused but ufw was blocking port so I ran

```
sudo ufw allow 8066

```

That unblocked the port but now I get

```
{"id":"api.context.404.app_error","message":"Sorry, we could not find the page.","detailed_error":"There doesn't appear to be an api call for the url='/api/v1/send_push'. Typo? are you missing a team_id or user_id as part of the url?","status_code":404}

```

I’m **guessing** next I have to create that API using maybe something like this:

[AirNotifier](https://github.com/airnotifier/airnotifier) or [PHP GitHub Gist – Manual Way](https://gist.github.com/joashp/b2f6c7e24127f2798eb2)

Worth noting you can’t be using **Ubuntu 16.04** as that dist uses systemd and not Upstart daemon so would need a different script in case you’re getting a command not found error.

That would involve something like:

```
[Unit]
Description=Mattermost Push Proxy

[Service]
StartLimitInterval=200
StartLimitBurst=5
WorkingDirectory=/home/ubuntu/mattermost-push-proxy
User=mattermost-push-proxy
ExecStart=/bin/mattermost-push-proxy

[Install]
WantedBy=multi-user.target

```

in  
`/etc/systemd/sytem/mattermost-push-proxy.service`

using commands

```
sudo systemctl enable nginx.service
systemctl status nginx.service
sudo systemctl daemon-reload
sudo systemctl start nginx.service

```

to try and debug – let me know if anyone gets that going updating the guide to include Ubuntu 16.04 would be nice.

---

<div class="post-metadata">

**Author:** ![fromage9747](https://avatars.discourse-cdn.com/v4/letter/f/858c86/32.png) [@fromage9747](https://forum.mattermost.com/u/fromage9747)\
**Post date:** [October 1, 2018, 10:35am UTC](https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220/10 "2018-10-01T10:35:38Z")

</div>

Hi Dev2,

I am using Ubuntu 16.04 and trying to create the service daemon but not having success.

I currently have the following:

> [Unit]  
> Description=Mattermost Push Proxy  
> [Service]  
> StartLimitInterval=200  
> StartLimitBurst=5  
> WorkingDirectory=/opt/mattermost-push-proxy  
> User=mattermost-push-proxy  
> ExecStart=/bin/mattermost-push-proxy  
> [Install]  
> WantedBy=multi-user.target

It fails to start with the following:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/2/2f9dfa75677a08eec88718870adc29016cf33d9c.png)

I can confirm that running this manually works:

> 2018/10/01 03:37:38 INFO Loading /opt/mattermost-push-proxy/config/mattermost-push-proxy.json  
> 2018/10/01 03:37:38 INFO Push proxy server is initializing…  
> 2018/10/01 03:37:38 INFO Initializing apple notification server for type=apple  
> 2018/10/01 03:37:38 ERROR Apple push notifications not configured. Missing ApplePushCertPrivate. for type=apple  
> 2018/10/01 03:37:38 INFO Initializing apple notification server for type=apple\_rn  
> 2018/10/01 03:37:38 ERROR Apple push notifications not configured. Missing ApplePushCertPrivate. for type=apple\_rn  
> 2018/10/01 03:37:38 INFO Initializing Android notificaiton server for type=android  
> 2018/10/01 03:37:38 INFO Initializing Android notificaiton server for type=android\_rn  
> 2018/10/01 03:37:38 INFO Server is listening on :8066

I am only using Android for notifications, hence the warning about no apple keys found.

---

<div class="post-metadata">

**Author:** ![philipborbon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/philipborbon/32/3140_2.png) [@philipborbon](https://forum.mattermost.com/u/philipborbon)\
**Post date:** [August 20, 2019, 1:46am UTC](https://forum.mattermost.com/t/solved-mattermost-push-proxy-readme-instructions-incomplete/4220/11 "2019-08-20T01:46:05Z")

</div>

Following works using `systemd`.

```auto
[Unit]
Description=Mattermost Push Proxy

[Service]
StartLimitInterval=200
StartLimitBurst=5
WorkingDirectory=/home/ubuntu/mattermost-push-proxy
User=mpush
ExecStart=/home/ubuntu/mattermost-push-proxy/bin/mattermost-push-proxy | logger

[Install]
WantedBy=multi-user.target

```
