Report this

What is the reason for this report?

How to upload an assetlinks.json file to my Discourse 1-Click Droplet

Posted on February 2, 2021

So I have a Discourse forum called mathbymiles.com that I got from Digital Ocean as a 1-click droplet.

Now I am trying to package the site into a PWA with pwabuilder, and one of the first steps is in the guide to uploading an Google Play app is to put the file assetlinks.json at the location https://mathbymiles/.well-known/assetlinks.json.

How do I do this? As a noob, I have no idea. I have the generated assetlinks.json file, but I don’t how to “put it” in that location.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.

To put the assetlinks.json file at that location, you’ll need to access your droplet and create the file in the corresponding directory. If the directory does not exist, you should create it. You can follow these general steps:

  1. Access your droplet via SSH.
  2. Change the directory to the root of your Discourse forum. If your site is in a path like /var/www/discourse, you would use the command: cd /var/www/discourse.
  3. To create the .well-known directory, you would use the command: mkdir .well-known. Please note the ‘.’ before ‘well-known’ which signifies a hidden directory.
  4. Navigate into the .well-known directory using: cd .well-known.
  5. Now you can create the assetlinks.json file here and modify it as required.

The process of creating and modifying a file can be done with an editor like nano or vim, for example:

  1. nano assetlinks.json

Then paste in the content of your file. Save and close the file.

I’d recommend reading our guide on basic Linux commands to understand how you can navigate and operate within your droplet:

https://www.digitalocean.com/community/tutorials/basic-linux-navigation-and-file-management

Please note that paths and commands may vary slightly depending on the configuration and setup of your server.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.