Nextcloud ready for Talk

“Meetings with colleagues, customers and partners – have a personal conversation with one click. Keep conversations private with Nextcloud Talk” on your own Nextcloud server, based on Ubuntu 18.04, NGINX 1.15 and your own TURN server … based on the Nextcloud installation guide with few amendments only. Don’t wait any longer…

First switch into sudo mode and install coturn as your TURN server:

sudo -s
apt install coturn

Modify the coturn configuration file

vi /etc/default/coturn

by removing the leading ‘#’ at the beginning of “TURNSERVER_ENABLED=1”

# Uncomment it if you want to have the turnserver running as
# an automatic system service daemon

Now move the default turnserver.conf and create a new one:

mv /etc/turnserver.conf /etc/turnserver.conf.bak && vi /etc/turnserver.conf

Paste the following rows


Create your personal secret by issuing

openssl rand -hex 32

and replace the exemplarily static-auth-secret 1212121212121212121212121212121212121212121212121212121212121212 with your generated one and the dummy url ( with your Nextcloud url.

Open the ports 3478 and 5349 (UDP/TCP) in both, your ufw

ufw allow 3478/tcp && ufw allow 3478/udp && ufw allow 5349/tcp && ufw allow 5349/udp

and your router.

Then restart your TURN Server and NGINX

service coturn restart && service nginx restart

and enable the Nextcloud Talk app in your Nextcloud.

Fill in your Nextcloud URL followed by the port ( twice and paste your generated secret to the turn server section. That’s it!

Enjoy your personal data in your secured and hardened Nextcloud-Server!

Don’t forget to backup your Nextcloud

Find more instructions here: Nextcloud Backup and Restore

Carsten Rieger

Carsten Rieger

Carsten Rieger is a senior system engineer in full-time and also working as an IT freelancer. He is working with linux environments for more than 13 years, an Open Source enthusiast and highly motivated on linux installation and troubleshooting. Mostly working with Debian/Ubuntu Linux, Nginx and Apache web server, MariaDB/MySQL/PostgreSQL, PHP, Cloud infrastructure (e.g. Nextcloud) and other open source projects (e.g. Roundcube) and in voluntary work for the Dr. Michael & Angela Jacobi Stiftung for more than 6 years.

10 Responses

  1. Alx says:

    Thanks a lot!!

  2. Lars says:

    Danke ich wusste das da was falsch war. Ports 🙂

  3. Alex D. says:

    Just Wanted to say thanks! I am you follower. Your blog made live easier for me!

  4. Henry says:

    It doesn’t work for me.
    What should the nginx configuration be?
    I would also like to use the talk over port 443, but I don’t know how it works.

    • Sorry, I don’t get your question right? If your Nextcloud is up and running using SSL already, then you won’t have to modify any of your nginx conf files.

  5. I have previously tried to configure Nextcloud Talk support on my server without any success. I will try your steps and see if this time it works. Many thanks for your article!

    Is configuring Nextcloud Talk dependent on the way you installed your Nextcloud server in the first place? I have installed Nextcloud server via its snap package, which I know is a bit more restricted than the traditional install since you cannot manually tweak any configuration file within Nextcloud itself.

    Another question: Do you know if there is a customized COTURN snap package with all Nextcloud-specific configurations already built-in?

    • How to configure the Talk app doesn’t depend on the way you did install your Nextcloud server. You just have to adjust the url and port according to your coturn server installation. I don’t know anything about snap packages, please ask the community Happy weekend, Carsten

      • So I tried your steps on my nextcloud-snap install and it worked 🙂 Thank you!

        The only difference from this post was that the key files (those that you should specify in coturn’s config file under cert= and pkey=) are located at


Leave a Reply

Your email address will not be published. Required fields are marked *